Skip to content

Commit 5677973

Browse files
committed
dep(eslint): upgrade to v10
- net: dropped 178 dependencies, added 30 - dropped packages that don't support eslint 10: - eslint-config-semistandard - eslint-config-standard - eslint-plugin-import - eslint-plugin-n - eslint-plugin-promise - added @eslint/js, @stylistic/eslint-plugin, globals - add @Stylistic and rule tweaks to preserve legacy config. - 3 small lint fixes in packet.js: - removed a setter's redundant return - removed a useless chunkLength = 0 init - removed stale eslint-disable-next-line no-extend-native directives
1 parent f4d88a2 commit 5677973

5 files changed

Lines changed: 666 additions & 2968 deletions

File tree

.eslintrc

Lines changed: 0 additions & 16 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import js from '@eslint/js';
2+
import stylistic from '@stylistic/eslint-plugin';
3+
import globals from 'globals';
4+
5+
export default [
6+
js.configs.recommended,
7+
{
8+
files : [ '**/*.js' ],
9+
languageOptions: {
10+
ecmaVersion: 'latest',
11+
sourceType : 'commonjs',
12+
globals : {
13+
...globals.node,
14+
},
15+
},
16+
plugins: {
17+
'@stylistic': stylistic,
18+
},
19+
rules: {
20+
'no-unused-vars': [ 'error', {
21+
args : 'none',
22+
caughtErrors : 'none',
23+
ignoreRestSiblings: true,
24+
} ],
25+
'@stylistic/semi' : [ 'error', 'always' ],
26+
'@stylistic/space-before-function-paren': [ 'error', {
27+
anonymous : 'never',
28+
named : 'never',
29+
asyncArrow: 'never',
30+
catch : 'always',
31+
} ],
32+
'@stylistic/no-multi-spaces' : 'error',
33+
'@stylistic/array-bracket-spacing': [ 'error', 'always' ],
34+
'@stylistic/key-spacing' : [ 'error', {
35+
align: {
36+
beforeColon: true,
37+
afterColon : true,
38+
on : 'colon',
39+
},
40+
} ],
41+
'@stylistic/comma-dangle': [ 'error', 'always-multiline' ],
42+
},
43+
},
44+
];

0 commit comments

Comments
 (0)