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

chore(eslint): migrate eslint configuration .eslintrc.js to eslint.config.mjs #205

Merged
merged 8 commits into from
Dec 21, 2024
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

35 changes: 0 additions & 35 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
v20.9.0
36 changes: 36 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import globals from "globals";
import tseslint from "typescript-eslint";
import reactPlugin from "eslint-plugin-react";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";

export default tseslint.config(
{
ignores: ["dist"],
},
reactPlugin.configs.flat.recommended,
tseslint.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.es2021,
},
parser: tseslint.parser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
},
plugins: {
react: reactPlugin,
"@typescript-eslint": tseslint.plugin,
},
rules: {
"react/no-did-update-set-state": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"@typescript-eslint/no-explicit-any": "off",
},
},
eslintPluginPrettierRecommended
);
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,22 @@
"@types/jest": "^26.0.15",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"assert": "^2.0.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "^9.0.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"globals": "^15.11.0",
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.4.3",
"prettier": "^3.0.1",
"react": "^18",
"react-dom": "^18",
"rimraf": "^6.0.1",
"ts-jest": "^29.0.5",
"typescript": "^5.1.6"
"typescript": "^5.1.6",
"typescript-eslint": "^8.18.0"
},
"peerDependencies": {
"react": ">=16.13.1"
Expand Down
Loading
Loading