diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index f8973fd..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = { - "env": { - "browser": true, - "es6": true, - "node": true - }, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 5 - }, - "overrides": [ - { - "files": ["test/*"], - "globals": { - "describe": "readonly", - "it": "readonly" - } - }, - { - "files": ["javascript/*"], - "globals": { - "define": "readonly", - "JZZ": "readonly" - }, - "rules": { - "no-console" : "off", - "no-empty" : ["warn", { "allowEmptyCatch": true }], - "no-prototype-builtins" : "off" - } - } - ] -}; \ No newline at end of file diff --git a/.npmignore b/.npmignore index 23a9b30..1ffa32d 100644 --- a/.npmignore +++ b/.npmignore @@ -1,8 +1,8 @@ .* minified -test +test* data coverage Gruntfile.js -test* +eslint.config.mjs !test 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 e0b4a0e..aaa2854 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jzz-midi-gm", - "version": "1.3.7", + "version": "1.3.8", "description": "General MIDI / GM2 / GS / XG instrument names", "main": "javascript/JZZ.midi.GM.js", "scripts": { @@ -18,15 +18,15 @@ ], "author": "jazz-soft (https://jazz-soft.net/)", "dependencies": { - "jzz": "^1.8.4" + "jzz": "^1.8.5" }, "devDependencies": { - "eslint": "^9.3.0", + "eslint": "^9.5.0", "grunt": "^1.6.1", "grunt-contrib-jshint": "^3.2.0", "grunt-contrib-uglify": "^5.2.2", "mocha": "^10.4.0", - "nyc": "^15.1.0" + "nyc": "^17.0.0" }, "repository": { "type": "git",