diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index f61de17..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - "env": { - "browser": true, - "es6": true, - "node": true - }, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 5 - }, - "globals": { - "define": "readonly", - "JZZ": "readonly" - } -}; \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..d49ec1a --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,35 @@ +import globals from "globals"; +import js from "@eslint/js"; + +export default [ + js.configs.recommended, + { + ignores: ["**/.instrumented/*"] + }, + { + files: ["javascript/*.js", "test/*.js"], + languageOptions: { + ecmaVersion: 2015, + globals: { + ...globals.browser, + ...globals.node, + define: "readonly", + JZZ: "readonly" + } + }, + rules: { + "no-unused-vars": ["error", { caughtErrors: "none"}] + } + }, + { + files: ["test/*.js"], + languageOptions: { + globals: { + describe: "readonly", + it: "readonly", + before: "readonly", + after: "readonly" + } + } + } +]; \ No newline at end of file