Skip to content

Commit 948ca9d

Browse files
committed
Upgraded to eslint 9.8, publish actions v4
1 parent 4ca8997 commit 948ca9d

File tree

6 files changed

+444
-181
lines changed

6 files changed

+444
-181
lines changed

.eslintignore

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

.eslintrc.json

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

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
id-token: write
1313

1414
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
1717
with:
1818
node-version: '20.x'
1919
registry-url: 'https://registry.npmjs.org'

eslint.config.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
const { configs } = require('@eslint/js');
2+
const jest = require('eslint-plugin-jest');
3+
const globals = require('globals');
4+
5+
module.exports = [
6+
configs.recommended,
7+
{
8+
languageOptions: {
9+
ecmaVersion: 'latest',
10+
sourceType: 'commonjs',
11+
globals: { ...globals.node, ...globals.jest, Atomics: 'readonly', SharedArrayBuffer: 'readonly' }
12+
},
13+
rules: {
14+
semi: 'error',
15+
quotes: ['error', 'single'],
16+
indent: ['error', 4, { 'SwitchCase': 1 }],
17+
'no-unused-vars':
18+
[
19+
'warn',
20+
{
21+
'varsIgnorePattern': '^_',
22+
'args': 'after-used',
23+
'argsIgnorePattern': '^_'
24+
}
25+
]
26+
},
27+
ignores: ['coverage/', '**/*.json']
28+
},
29+
{
30+
languageOptions: {
31+
globals: { ...globals.jest }
32+
},
33+
files: ['test/*.test.js'],
34+
...jest.configs['flat/recommended'],
35+
rules: {
36+
...jest.configs['flat/recommended'].rules
37+
}
38+
}
39+
];

0 commit comments

Comments
 (0)