-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy patheslint.config.js
More file actions
40 lines (40 loc) · 1.07 KB
/
eslint.config.js
File metadata and controls
40 lines (40 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// ESLint v9+ flat config for Node.js CommonJS
/** @type {import('eslint').FlatConfig} */
module.exports = [
{
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 2021,
sourceType: 'script',
globals: {
require: 'readonly',
module: 'readonly',
__dirname: 'readonly',
process: 'readonly',
exports: 'readonly',
Buffer: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
// Jest globals
describe: 'readonly',
test: 'readonly',
expect: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
jest: 'readonly',
},
},
rules: {
'no-unused-vars': ['warn', { args: 'none', ignoreRestSiblings: true }],
'no-console': 'off',
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'indent': ['error', 2],
'comma-dangle': ['error', 'always-multiline'],
},
},
];