-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
50 lines (49 loc) · 1.28 KB
/
eslint.config.js
File metadata and controls
50 lines (49 loc) · 1.28 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
44
45
46
47
48
49
50
import globals from 'globals';
import { defineConfig } from 'eslint/config';
export default defineConfig([
{
files: ['**/*.{js,mjs,cjs,jsx,ts,tsx}'],
ignores: ['node_modules/', 'src/assets/js/vendor/'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
semi: ['error', 'always'],
quotes: ['error', 'single'],
'no-console': 'off',
'no-unused-vars': 'error',
'no-debugger': 'off',
'no-undef': 'error',
'no-empty': 'off',
'no-mixed-spaces-and-tabs': 'off',
'no-var': 'error',
'prefer-const': 'error',
'prefer-arrow-callback': 'warn',
'prefer-template': 'warn',
eqeqeq: ['error', 'always'],
camelcase: ['warn', { properties: 'always' }],
},
},
{
files: ['**/*.test.{js,mjs,cjs,jsx,ts,tsx}', '**/*.spec.{js,mjs,cjs,jsx,ts,tsx}'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
describe: 'readonly',
it: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
vi: 'readonly',
},
},
},
]);