From 4b4a1f46881262829f75938da73f9592947240f0 Mon Sep 17 00:00:00 2001 From: Sema Date: Wed, 3 Jul 2024 23:46:38 -0400 Subject: [PATCH] eslint.config.mjs --- .eslintrc.js | 38 -------------------------------------- eslint.config.mjs | 37 +++++++++++++++++++++++++++++++++++++ package.json | 12 ++++++------ 3 files changed, 43 insertions(+), 44 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 b9ad5db..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - "env": { - "browser": true, - "es6": true, - "node": true - }, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 5 - }, - "overrides": [ - { - "files": ["test/*"], - "parserOptions": { "ecmaVersion": 2017 }, - "globals": { - "before": "readonly", - "after": "readonly", - "describe": "readonly", - "it": "readonly" - }, - "rules": { - "no-console" : "off" - } - }, - { - "files": ["javascript/*"], - "globals": { - "JZZ": "readonly", - "define": "readonly" - }, - "rules": { - "no-console" : "off", - "no-empty" : ["warn", { "allowEmptyCatch": true }], - "no-prototype-builtins" : "off" - } - } - ] -}; \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..43fd6bf --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,37 @@ +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-empty" : ["warn", { "allowEmptyCatch": true }], + "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 7ae9c61..9b9fc6c 100644 --- a/package.json +++ b/package.json @@ -18,18 +18,18 @@ ], "author": "jazz-soft (https://jazz-soft.net/)", "dependencies": { - "jzz": "^1.8.4", - "jzz-midi-smf": "^1.9.2" + "jzz": "^1.8.5", + "jzz-midi-smf": "^1.9.4" }, "devDependencies": { - "eslint": "^9.3.0", + "eslint": "^9.6.0", "grunt": "^1.6.1", "grunt-contrib-jshint": "^3.2.0", "grunt-contrib-uglify": "^5.2.2", - "jsdom": "^24.0.0", + "jsdom": "^24.1.0", "jzz-synth-tiny": "^1.4.0", - "mocha": "^10.4.0", - "nyc": "^15.1.0", + "mocha": "^10.6.0", + "nyc": "^17.0.0", "web-midi-test": "^1.2.8" }, "runkitExampleFilename": "runkit.js",