-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
46 lines (46 loc) · 1.07 KB
/
.eslintrc.cjs
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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [ '@typescript-eslint', 'svelte3' ],
globals: {
'NodeJS': true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
env: {
browser: true,
node: true,
},
overrides: [
{
files: [ '*.svelte' ],
processor: 'svelte3/svelte3',
},
],
settings: {
'svelte3/typescript': true,
},
'rules': {
// enforce the use of semicolons
'semi': [ 'error', 'always' ],
// enforce the use of single quotes
'quotes': [ 'error', 'single' ],
// disallow the use of alert, prompt and confirm
'no-alert': 'error',
// enforce a maximum line length
'max-len': [ 'error', { 'code': 120, 'ignoreRegExpLiterals': true } ],
// enforce consistent indentation
'indent': [ 'error', 2 ],
// disallow the use of var
'no-var': 'error',
// enforce the use of const and let
'prefer-const': 'error',
'no-explicit-any': 'off'
}
};