Skip to content

Commit b119b41

Browse files
committed
[pkg] Update eslint to version 9.0.0
1 parent 2405c17 commit b119b41

File tree

5 files changed

+33
-23
lines changed

5 files changed

+33
-23
lines changed

.eslintrc.yaml

-19
This file was deleted.

eslint.config.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
'use strict';
2+
3+
const pluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
4+
const globals = require('globals');
5+
const js = require('@eslint/js');
6+
7+
module.exports = [
8+
js.configs.recommended,
9+
{
10+
ignores: ['.nyc_output/', '.vscode/', 'coverage/', 'node_modules/'],
11+
languageOptions: {
12+
ecmaVersion: 'latest',
13+
globals: {
14+
...globals.browser,
15+
...globals.mocha,
16+
...globals.node
17+
},
18+
sourceType: 'module'
19+
},
20+
rules: {
21+
'no-console': 'off',
22+
'no-unused-vars': ['error', { caughtErrors: 'none' }],
23+
'no-var': 'error',
24+
'prefer-const': 'error'
25+
}
26+
},
27+
pluginPrettierRecommended
28+
];

lib/websocket-server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$" }] */
1+
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$", "caughtErrors": "none" }] */
22

33
'use strict';
44

lib/websocket.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$" }] */
1+
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$", "caughtErrors": "none" }] */
22

33
'use strict';
44

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"scripts": {
4141
"test": "nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js",
4242
"integration": "mocha --throw-deprecation test/*.integration.js",
43-
"lint": "eslint --ignore-path .gitignore . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""
43+
"lint": "eslint . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""
4444
},
4545
"peerDependencies": {
4646
"bufferutil": "^4.0.1",
@@ -57,9 +57,10 @@
5757
"devDependencies": {
5858
"benchmark": "^2.1.4",
5959
"bufferutil": "^4.0.1",
60-
"eslint": "^8.0.0",
60+
"eslint": "^9.0.0",
6161
"eslint-config-prettier": "^9.0.0",
6262
"eslint-plugin-prettier": "^5.0.0",
63+
"globals": "^15.0.0",
6364
"mocha": "^8.4.0",
6465
"nyc": "^15.0.0",
6566
"prettier": "^3.0.0",

0 commit comments

Comments
 (0)