Skip to content

Commit 5f56fa0

Browse files
committed
chore: upgrade all devDependencies and migrate to eslint 10 flat config
- Upgrade eslint 8.31 → 10.1 with new flat config (eslint.config.js) - Upgrade @vercel/ncc 0.36 → 0.38.4 - Replace eslint-config-airbnb-base + eslint-plugin-import with @eslint/js + @stylistic/eslint-plugin - Remove stale overrides (word-wrap, semver) that patched eslint 8 transitive deps - Remove obsolete eslint-disable comments from source files - Add { cause } to rethrown error in rsyncCli.js - Resolves all 3 npm audit vulnerabilities (flatted, minimatch, js-yaml)
1 parent d346ae8 commit 5f56fa0

9 files changed

Lines changed: 844 additions & 2633 deletions

File tree

.eslintrc.js

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

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
const js = require('@eslint/js');
2+
const stylistic = require('@stylistic/eslint-plugin');
3+
const globals = require('globals');
4+
5+
module.exports = [
6+
js.configs.recommended,
7+
{
8+
plugins: {
9+
'@stylistic': stylistic
10+
},
11+
languageOptions: {
12+
ecmaVersion: 2020,
13+
sourceType: 'commonjs',
14+
globals: {
15+
...globals.node,
16+
...globals.commonjs,
17+
...globals.es2020,
18+
Atomics: 'readonly',
19+
SharedArrayBuffer: 'readonly'
20+
}
21+
},
22+
rules: {
23+
// Stylistic rules (migrated from airbnb-base)
24+
'@stylistic/comma-dangle': ['error', 'never'],
25+
'@stylistic/indent': ['error', 2, { SwitchCase: 1 }],
26+
'@stylistic/semi': ['error', 'always'],
27+
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
28+
'@stylistic/arrow-parens': ['error', 'always'],
29+
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
30+
'@stylistic/comma-spacing': ['error', { before: false, after: true }],
31+
'@stylistic/key-spacing': ['error', { beforeColon: false, afterColon: true }],
32+
'@stylistic/keyword-spacing': ['error', { before: true, after: true }],
33+
'@stylistic/eol-last': ['error', 'always'],
34+
'@stylistic/no-trailing-spaces': 'error',
35+
'@stylistic/space-before-blocks': 'error',
36+
'@stylistic/space-infix-ops': 'error',
37+
'@stylistic/arrow-spacing': ['error', { before: true, after: true }],
38+
39+
// JS rules (migrated from airbnb-base)
40+
'no-console': 'off',
41+
'no-var': 'error',
42+
'prefer-const': 'error',
43+
'prefer-arrow-callback': 'error',
44+
'prefer-template': 'error',
45+
'object-shorthand': ['error', 'always'],
46+
'no-shadow': 'error',
47+
'no-use-before-define': ['error', { functions: true, classes: true, variables: true }],
48+
'camelcase': ['error', { properties: 'never' }],
49+
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }]
50+
}
51+
}
52+
];

0 commit comments

Comments
 (0)