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 18, 2024
1 parent 6040cad commit 064bd48
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 46 deletions.
39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

36 changes: 36 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
];
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
],
"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",
"jzz-gui-player": "^1.7.4",
"jzz-midi-gm": "^1.3.7",
"jzz-synth-tiny": "^1.4.0",
"mocha": "^10.4.0",
"nyc": "^15.1.0",
"test-midi-files": "^1.0.8"
"nyc": "^17.0.0",
"test-midi-files": "^1.0.9"
},
"runkitExampleFilename": "runkit.js",
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions test/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('functions', function() {
smf.validate();
trk.smfBPM(90).smfTimeSignature('3/4').smfSMPTE(JZZ.SMPTE())
.smf(0, 'xx').smf(0, 'xxx').smf(5, '')
.smf(32, 'x').smf(32, 'xx').smf(32, '\1')
.smf(32, 'x').smf(32, 'xx').smf(32, '\x01')
.smf(33, 'x').smf(33, 'xx')
.smf(81, '').smf(81, 'x').smf(81, 'xxxx')
.smf(84, 'xxxxx').smf(84, 'xxxxxx')
Expand Down Expand Up @@ -159,9 +159,9 @@ describe('functions', function() {
.dataIncr(3).rpn(4, 0x7f, 0x7f).dataDecr(4)
;
var dump = smf.dump();
dump = dump.substring(0, 9) + '\3' + dump.substring(10);
dump = dump.substring(0, 9) + '\x03' + dump.substring(10);
dump = dump.replace('MTrk', 'MThd')
dump = dump.replace('\xf0\7\xf7\xf7\xf7\xf7\xf7\xf7\xf7', '\xf1\0\0\xf3\0\0\xf2\0\0');
dump = dump.replace('\xf0\x07\xf7\xf7\xf7\xf7\xf7\xf7\xf7', '\xf1\x00\x00\xf3\x00\x00\xf2\x00\x00');
smf = JZZ.MIDI.SMF(dump);
smf.validate();
//console.log(smf.validate());
Expand Down

0 comments on commit 064bd48

Please sign in to comment.