Skip to content

Commit

Permalink
Migrated from eslint 8 to eslint 9
Browse files Browse the repository at this point in the history
  • Loading branch information
vrza committed Oct 24, 2024
1 parent c5f05f6 commit 01b4284
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 42 deletions.
51 changes: 12 additions & 39 deletions .eslintrc → eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,56 +1,29 @@
{
"rules": {
"indent": [2, "tab"],
module.exports = [{
languageOptions: {
ecmaVersion: 8,
sourceType: "commonjs",
},

rules: {
indent: [2, "tab"],
"linebreak-style": [2, "unix"],

"semi": [2, "always"],

semi: [2, "always"],
"no-shadow": 1,

"no-unused-vars": 1,

/* We use _method for private methods */
"no-underscore-dangle": 0,

/* eslint expects us to put "use strict" in every function? */
"strict": 0,

/* eslint doesn't like "use strict" because of concatenation issues,
* but it's not a problem with node. */
"global-strict": 0,

/* Don't care whether it's "quote" or 'quote' */
"quotes": 0,

quotes: 0,
/* We do ,obj in multi-line arrays literals */
"comma-spacing": 0,

/* We have a space before a tab in the first line of a multi-line array literal */
"no-mixed-spaces-and-tabs": 0,

/* Complains about while(true) */
"no-constant-condition": 0,

/* We don't space our multiplications */
"space-infix-ops": 0,

/* It's okay to make functions in a loop if you're using let and const */
"no-loop-func": 0,

/* We sometimes use 'function() { new X() }` in a test to test
* for exceptions thrown in the constructor. */
"no-new": 0
},
"env": {
"es6": true,
"node": true
},
"globals": {
"it": true,
"describe": true,
* for exceptions thrown in the constructor. */
"no-new": 0,
},
"parserOptions": {
"ecmaVersion": 8
}
}
}];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"nan": "^2.20.0"
},
"devDependencies": {
"eslint": "^8.57.0",
"eslint": "^9.13.0",
"mocha": "^10.5.1"
},
"contributors": [
Expand Down
2 changes: 0 additions & 2 deletions tests/blake2.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,7 @@ describe('blake2', function() {
describe('binding', function() {
it('throws Error if called without "new"', function() {
assert.throws(function() {
/* eslint-disable new-cap */
binding.Hash('blake2b');
/* eslint-enable new-cap */
}, /must be called with new/);
});
});

0 comments on commit 01b4284

Please sign in to comment.