-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy patheslint.config.js
More file actions
40 lines (38 loc) · 918 Bytes
/
eslint.config.js
File metadata and controls
40 lines (38 loc) · 918 Bytes
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
import { FlatCompat } from '@eslint/eslintrc';
const compat = new FlatCompat({
recommendedConfigs: {
'eslint:recommended': {
rules: {
'no-unused-vars': [
'error',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true },
],
},
},
},
});
export default [
{
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 2015,
sourceType: 'module',
globals: {
browser: true,
node: true,
},
},
rules: {
indent: ['error', 2, { SwitchCase: 1 }],
'brace-style': ['error', '1tbs'],
quotes: ['error', 'single'],
'no-console': 'off',
'no-shadow': 'off',
'no-use-before-define': ['error', { functions: false }],
'no-underscore-dangle': 'off',
'no-constant-condition': 'off',
'space-after-function-name': 'off',
'consistent-return': 'off',
},
},
];