Skip to content

Commit

Permalink
chore: upgrade eslint to 9 resolve #3
Browse files Browse the repository at this point in the history
  • Loading branch information
jsun969 committed Sep 20, 2024
1 parent d84267b commit 9b04ae5
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 347 deletions.
32 changes: 0 additions & 32 deletions .eslintrc.cjs

This file was deleted.

48 changes: 48 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import js from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [
js.configs.recommended,
eslintPluginPrettierRecommended,
...tseslint.configs.recommended,
],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 'latest',
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{ ignoreRestSiblings: true },
],
'@typescript-eslint/consistent-type-imports': [
'warn',
{ disallowTypeAnnotations: false },
],
'no-console': 'warn',
eqeqeq: 'warn',
'prefer-const': 'warn',
'no-var': 'warn',
},
},
);
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,27 @@
"zustand-mutative": "^1.0.3"
},
"devDependencies": {
"@eslint/js": "^9.10.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint": "^9.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"lint-staged": "^15.2.7",
"msw": "^2.3.1",
"postcss": "^8.4.39",
"prettier": "^3.3.2",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.6",
"simple-git-hooks": "^2.11.1",
"tailwindcss": "^3.4.4",
"typescript": "^5.2.2",
"typescript-eslint": "^8.6.0",
"vite": "^5.3.1",
"vitest": "^2.1.1"
},
Expand Down
Loading

0 comments on commit 9b04ae5

Please sign in to comment.