Skip to content

Commit

Permalink
eslint.config.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Jun 16, 2024
1 parent 454308f commit e857e3d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 39 deletions.
36 changes: 0 additions & 36 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ web-midi-api
test*
coverage
Gruntfile.js
eslint.config.mjs
*.html
*.bat
!test
38 changes: 38 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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" : ["error", { "allowEmptyCatch": true }],
"no-prototype-builtins": "off",
"no-unused-vars": ["error", { caughtErrors: "none"}]
}
},
{
files: ["test/*.js"],
languageOptions: {
ecmaVersion: 2017,
globals: {
describe: "readonly",
it: "readonly",
before: "readonly",
after: "readonly"
}
}
}
];
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
],
"author": "jazz-soft (https://jazz-soft.net/)",
"dependencies": {
"@types/webmidi": "^2.0.10",
"@types/webmidi": "^2.1.0",
"jazz-midi": "^1.7.9"
},
"devDependencies": {
"eslint": "^9.2.0",
"eslint": "^9.5.0",
"grunt": "^1.6.1",
"grunt-contrib-jshint": "^3.2.0",
"grunt-contrib-uglify": "^5.2.2",
"midi-test": "^1.3.1",
"mocha": "^10.4.0",
"nyc": "^15.1.0",
"nyc": "^17.0.0",
"web-audio-test": "^0.0.8",
"web-midi-test": "^1.2.8"
},
Expand Down

0 comments on commit e857e3d

Please sign in to comment.