-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy patheslint.config.js
More file actions
43 lines (39 loc) · 1 KB
/
eslint.config.js
File metadata and controls
43 lines (39 loc) · 1 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
41
42
43
import js from '@eslint/js'
import globals from 'globals'
/** @type {import("eslint").Linter.FlatConfig[]} */
export default [
// Centralize ignores here (ESLint v9 no longer supports `.eslintignore`).
{
ignores: ['dist/**', 'node_modules/**', 'coverage/**', 'badges/**']
},
// Equivalent of `extends: "eslint:recommended"` in flat-config land.
js.configs.recommended,
// Project-wide JS settings (ESM + Node).
{
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.es2022,
...globals.node
}
}
},
// Vitest globals for tests/config files.
{
files: ['**/__tests__/**/*.js', '**/*.test.js', 'vitest.config.js'],
languageOptions: {
globals: {
...globals.es2022,
...globals.node,
vi: 'readonly',
describe: 'readonly',
test: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly'
}
}
}
]