From 113fde61e5309de897bed07916ab824187da82a4 Mon Sep 17 00:00:00 2001 From: Sema Date: Mon, 24 Jun 2024 23:06:19 -0400 Subject: [PATCH] eslint.config.mjs --- .eslintrc.js | 26 -------------------------- eslint.config.mjs | 36 ++++++++++++++++++++++++++++++++++++ package.json | 4 ++-- 3 files changed, 38 insertions(+), 28 deletions(-) delete mode 100644 .eslintrc.js create mode 100644 eslint.config.mjs diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 23c5678..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = { - "env": { - "browser": true, - "node": true - }, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 5 - }, - "overrides": [ - { - "files": ["test/*"], - "globals": { - "describe": "readonly", - "it": "readonly" - } - }, - { - "files": ["javascript/*"], - "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..c26011d --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,36 @@ +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-prototype-builtins": "off", + "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 diff --git a/package.json b/package.json index 205c538..696143b 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,10 @@ ], "author": "jazz-soft (https://jazz-soft.net/)", "dependencies": { - "jzz": "^1.8.4" + "jzz": "^1.8.5" }, "devDependencies": { - "eslint": "^9.4.0", + "eslint": "^9.5.0", "grunt": "^1.6.1", "grunt-contrib-jshint": "^3.2.0", "grunt-contrib-uglify": "^5.2.2",