Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deps #14

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
env:
NODE_VERSION: "20"
with:
node-version: "${{ env.NODE_VERSION }}"
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
Expand All @@ -27,7 +27,7 @@ jobs:
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Setup pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-pnpm-modules
with:
Expand Down
29 changes: 21 additions & 8 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
// @ts-check

import js from "@eslint/js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// @ts-expect-error https://github.com/import-js/eslint-plugin-import/issues/2948
import imp from "eslint-plugin-import";
import prettier from "eslint-plugin-prettier";
// support will be added soon: https://github.com/jsx-eslint/eslint-plugin-react/pull/3727
import react from "eslint-plugin-react";
// import reactRecommended from "eslint-plugin-react/configs/recommended.js";
// support will be added soon: https://github.com/facebook/react/pull/28773
// import hooksPlugin from "eslint-plugin-react-hooks";
import reactHooks from "eslint-plugin-react-hooks";
import simpleImpSort from "eslint-plugin-simple-import-sort";
import ts from "typescript-eslint";

/** @type {any} Not type safe sadly */
// const hookRules = hooksPlugin.configs.recommended.rules;

export default ts.config(
{ ignores: ["node_modules", "dist"] },
{
files: ["**/*.{j,t}s?(x)"],
extends: [js.configs.recommended, ...ts.configs.recommended],
extends: [
js.configs.recommended,
...ts.configs.recommended,
// reactRecommended, // not compatible currently
// reactHooks.configs.recommended, // not compatible currently
],
plugins: {
prettier,
import: imp,
"simple-import-sort": simpleImpSort,
// "react-hooks": hooksPlugin,
"react-hooks": reactHooks,
react,
},
rules: {
// ...hookRules,
Expand Down Expand Up @@ -59,6 +64,14 @@ export default ts.config(
],
"import/no-duplicates": "warn",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
},
},
{
Expand Down
55 changes: 30 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"serve": "vite preview",
"lint": "pnpm lint:cc && pnpm lint:es && pnpm lint:ts",
"lint:cc": "madge -c --extensions ts,tsx --ts-config tsconfig.json --no-spinner src/",
Expand All @@ -18,32 +18,37 @@
"test": "vitest --run --coverage"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "18.3.1",
"react-dom": "18.3.1"
},
"devDependencies": {
"@eslint/js": "^9.1.1",
"@testing-library/react": "^15.0.2",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.7",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "^1.5.0",
"eslint": "9.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"jsdom": "^24.0.0",
"madge": "^7.0.0",
"prettier": "^3.2.5",
"sass": "^1.75.0",
"@eslint/js": "9.2.0",
"@testing-library/react": "15.0.7",
"@types/jest": "29.5.12",
"@types/node": "20.12.12",
"@types/react": "18.3.2",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react": "4.2.1",
"@vitest/coverage-v8": "1.6.0",
"eslint": "9.2.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-simple-import-sort": "12.1.0",
"jsdom": "24.0.0",
"madge": "7.0.0",
"prettier": "3.2.5",
"sass": "1.77.1",
"spy4js": "4.0.0-beta.1",
"typescript": "^5.4.5",
"typescript-eslint": "^7.7.0",
"vite": "^5.2.10",
"vitest": "^1.5.0"
"typescript": "5.4.5",
"typescript-eslint": "7.9.0",
"vite": "5.2.11",
"vitest": "1.6.0"
},
"engines": {
"node": ">= 20.13 < 21",
"pnpm": ">= 9.1.1"
}
}
Loading
Loading