Merge pull request #40 from timofei-iatsenko/chore/eslint-9
update eslint to 9
This commit is contained in:
commit
ef759e37a9
7 files changed
+1003
-367
No files matched your search
@@ -1,27 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
env: { browser: true, es2020: true },
|
|
||||||
extends: [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"plugin:react-hooks/recommended",
|
|
||||||
"plugin:storybook/recommended"
|
|
||||||
],
|
|
||||||
ignorePatterns: ["dist", ".eslintrc.cjs"],
|
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
plugins: ["react-refresh"],
|
|
||||||
rules: {
|
|
||||||
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
|
|
||||||
"react-hooks/exhaustive-deps": "off",
|
|
||||||
"@typescript-eslint/no-redeclare": "off",
|
|
||||||
"no-labels": "off"
|
|
||||||
},
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
files: ["**/*.stories.*"],
|
|
||||||
rules: {
|
|
||||||
"import/no-anonymous-default-export": "off"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
import typescriptEslint from "typescript-eslint";
|
||||||
|
import reactRefresh from "eslint-plugin-react-refresh";
|
||||||
|
import react from "eslint-plugin-react";
|
||||||
|
import reactHooks from "eslint-plugin-react-hooks";
|
||||||
|
import eslintConfigPrettier from "eslint-config-prettier";
|
||||||
|
import globals from "globals";
|
||||||
|
import js from "@eslint/js";
|
||||||
|
import storybook from "eslint-plugin-storybook";
|
||||||
|
|
||||||
|
export default typescriptEslint.config(
|
||||||
|
js.configs.recommended,
|
||||||
|
...typescriptEslint.configs.recommended,
|
||||||
|
react.configs.flat.recommended,
|
||||||
|
react.configs.flat["jsx-runtime"],
|
||||||
|
eslintConfigPrettier,
|
||||||
|
...storybook.configs["flat/recommended"],
|
||||||
|
{
|
||||||
|
ignores: ["dist/**", "public/**"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
plugins: {
|
||||||
|
"react-refresh": reactRefresh,
|
||||||
|
"react-hooks": reactHooks,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
react: {
|
||||||
|
version: "detect",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
|
||||||
|
"react-hooks/exhaustive-deps": "off",
|
||||||
|
"@typescript-eslint/no-redeclare": "off",
|
||||||
|
"no-labels": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.stories.*"],
|
||||||
|
rules: {
|
||||||
|
"import/no-anonymous-default-export": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
+13
-7
@@ -22,23 +22,29 @@
|
|||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.15.0",
|
||||||
"storybook": "^8.1.10",
|
"storybook": "^8.1.10",
|
||||||
"@storybook/react": "^8.1.10",
|
"@storybook/react": "^8.1.10",
|
||||||
"@storybook/react-vite": "^8.1.10",
|
"@storybook/react-vite": "^8.1.10",
|
||||||
"@types/react": "^18.2.43",
|
"@types/react": "^18.2.43",
|
||||||
"@types/react-dom": "^18.2.17",
|
"@types/react-dom": "^18.2.17",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
||||||
"@typescript-eslint/parser": "^6.14.0",
|
"@typescript-eslint/parser": "^8.15.0",
|
||||||
"@vitejs/plugin-react": "^4.2.1",
|
"@vitejs/plugin-react": "^4.2.1",
|
||||||
"eslint": "^8.55.0",
|
"eslint": "^9.15.0",
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.5",
|
"eslint-plugin-react": "^7.37.2",
|
||||||
"eslint-plugin-storybook": "^0.8.0",
|
"eslint-plugin-react-hooks": "^5.0.0",
|
||||||
|
"eslint-plugin-react-refresh": "^0.4.14",
|
||||||
|
"eslint-plugin-storybook": "^0.11.1",
|
||||||
|
"globals": "^15.12.0",
|
||||||
"prettier": "3.3.1",
|
"prettier": "3.3.1",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
|
"typescript-eslint": "^8.15.0",
|
||||||
"vite": "^5.0.8"
|
"vite": "^5.0.8"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.0.0 || >=20.0.0"
|
"node": "^18.0.0 || >=20.0.0"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
||||||
}
|
}
|
||||||
Loaded 3 of 7 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user