diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index e83826d48..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "env": { - "browser": true, - "es6": true, - "jasmine": true - }, - "extends": "eslint:recommended", - "globals": { - "Atomics": "readonly", - "SharedArrayBuffer": "readonly", - "flatpickr": "readonly", - "$": "readonly" - }, - "parser": "@babel/eslint-parser", - "parserOptions": { - "ecmaVersion": 2018, - "requireConfigFile": false, - "ecmaFeatures": { - "legacyDecorators": true - } - }, - "rules": { - "no-console": "off", - "no-extra-semi": "off", - "semi": ["error", "always"], - "comma-dangle": ["error", "always-multiline"], - "quotes": ["error", "single"], - "no-var": "error" - } -} diff --git a/Makefile b/Makefile index 1928916ee..208433535 100644 --- a/Makefile +++ b/Makefile @@ -107,7 +107,7 @@ frontend-%: node_modules well-known --frontend-%; --frontend-watch: --frontend-build .PHONY: --frontend-lint ---frontend-lint: .eslintrc.json +--frontend-lint: eslint.config.js npx -- eslint frontend/src $(FIX) @echo Hooray! There are no hints. diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000..0eda2b201 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,33 @@ +import js from "@eslint/js"; +import globals from "globals"; +import babelParser from "@babel/eslint-parser"; + +export default [ + js.configs.recommended, + { + files: ["**/*.js"], + plugins: {}, + languageOptions: { + ecmaVersion: 2018, + globals: { + ...globals.browser, + ...globals.es6, + ...globals.node, + ...globals.jasmine, + Atomics: "readonly", + SharedArrayBuffer: "readonly", + flatpickr: "readonly", + $: "readonly", + }, + parser: babelParser, + }, + rules: { + "no-console": "off", + "no-extra-semi": "off", + "semi": ["error", "always"], + "comma-dangle": ["error", "always-multiline"], + "quotes": ["error", "single"], + "no-var": "error", + }, + }, +]; \ No newline at end of file