Skip to content

Commit

Permalink
[pkg] Update eslint to version 9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Apr 9, 2024
1 parent 2405c17 commit b119b41
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 23 deletions.
19 changes: 0 additions & 19 deletions .eslintrc.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
'use strict';

const pluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
const globals = require('globals');
const js = require('@eslint/js');

module.exports = [
js.configs.recommended,
{
ignores: ['.nyc_output/', '.vscode/', 'coverage/', 'node_modules/'],
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
...globals.mocha,
...globals.node
},
sourceType: 'module'
},
rules: {
'no-console': 'off',
'no-unused-vars': ['error', { caughtErrors: 'none' }],
'no-var': 'error',
'prefer-const': 'error'
}
},
pluginPrettierRecommended
];
2 changes: 1 addition & 1 deletion lib/websocket-server.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$" }] */
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$", "caughtErrors": "none" }] */

'use strict';

Expand Down
2 changes: 1 addition & 1 deletion lib/websocket.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$" }] */
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$", "caughtErrors": "none" }] */

'use strict';

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"scripts": {
"test": "nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js",
"integration": "mocha --throw-deprecation test/*.integration.js",
"lint": "eslint --ignore-path .gitignore . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""
"lint": "eslint . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""
},
"peerDependencies": {
"bufferutil": "^4.0.1",
Expand All @@ -57,9 +57,10 @@
"devDependencies": {
"benchmark": "^2.1.4",
"bufferutil": "^4.0.1",
"eslint": "^8.0.0",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"globals": "^15.0.0",
"mocha": "^8.4.0",
"nyc": "^15.0.0",
"prettier": "^3.0.0",
Expand Down

0 comments on commit b119b41

Please sign in to comment.