From d660c25089206a9bd6b6d903fb2dcd15bb17c842 Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Sat, 12 Oct 2024 18:45:28 +0700 Subject: [PATCH] feat: update eslint --- .eslintrc.json | 28 ---------------------------- eslint.config.mjs | 11 +++++++++++ package.json | 3 +-- 3 files changed, 12 insertions(+), 30 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 eslint.config.mjs diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 9d6a62b..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "eslint:recommended", - "parserOptions": { "ecmaVersion": 6, "sourceType": "module" }, - "rules": { - "block-scoped-var": "error", - "consistent-return": "error", - "eqeqeq": "error", - "guard-for-in": "error", - "no-bitwise": "error", - "no-caller": "error", - "no-extra-parens": "off", - "no-extend-native": "error", - "no-loop-func": "error", - "no-new": "error", - "no-param-reassign": "error", - "no-return-assign": "error", - "no-sequences": "error", - "no-unused-expressions": "error", - "no-use-before-define": "error", - "no-undef": "error", - "no-eq-null": "error", - "radix": ["error", "always"], - "indent": ["error", 2, { "SwitchCase": 1 }], - "quotes": ["error", "double"], - "semi": ["error", "always"], - "strict": ["error", "global"] - } -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..1baba1b --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,11 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; +import pluginReact from "eslint-plugin-react"; + + +export default [ + {files: ["**/*.{js,mjs,cjs,jsx}"]}, + {languageOptions: { globals: globals.browser }}, + pluginJs.configs.recommended, + pluginReact.configs.flat.recommended, +]; \ No newline at end of file diff --git a/package.json b/package.json index 5b9b29b..7bec000 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "test": "spago test --offline" }, "devDependencies": { - "eslint": "^9.12.0", - "purescript-psa": "^0.9.0" + "eslint": "^9.12.0" } }