diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 2b82680..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - root: true, - env: { - es2020: true, - }, - extends: ["eslint:recommended", "prettier"], - rules: { - "no-unused-vars": "off", - "no-undef": "off", - }, - ignorePatterns: ["src/*/libs"], -}; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..9cdf74e --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,16 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; +import eslintConfigPrettier from "eslint-config-prettier"; + +export default [ + { languageOptions: { globals: globals.browser } }, + { ignores: ["src/*/libs"] }, + pluginJs.configs.recommended, + eslintConfigPrettier, + { + rules: { + "no-unused-vars": "off", + "no-undef": "off", + }, + }, +]; diff --git a/package-lock.json b/package-lock.json index 3ee12df..ef134c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,8 +5,10 @@ "packages": { "": { "devDependencies": { + "@eslint/js": "9.2.0", "eslint": "9.2.0", "eslint-config-prettier": "9.1.0", + "globals": "15.1.0", "prettier": "3.2.5" } }, @@ -66,6 +68,18 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/js": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.2.0.tgz", @@ -598,9 +612,9 @@ } }, "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.1.0.tgz", + "integrity": "sha512-926gJqg+4mkxwYKiFvoomM4J0kWESfk3qfTvRL2/oc/tK/eTDBbrfcKnSa2KtfdxB5onoL7D3A3qIHQFpd4+UA==", "dev": true, "engines": { "node": ">=18" diff --git a/package.json b/package.json index f2f67d8..edaf2b5 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,10 @@ "format": "prettier . --write" }, "devDependencies": { + "@eslint/js": "9.2.0", "eslint": "9.2.0", "eslint-config-prettier": "9.1.0", + "globals": "15.1.0", "prettier": "3.2.5" } }