-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.eslintrc.cjs
48 lines (48 loc) · 1.03 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
47
48
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:unicorn/recommended',
'prettier'
],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs', 'package/*'],
overrides: [
{
files: ['*.svelte'],
processor: 'svelte3/svelte3'
}
],
rules: {
'linebreak-style': ['error', 'unix'],
'max-lines-per-function': ['error', 50],
complexity: ['error', 10],
'max-depth': ['error', 3],
'max-nested-callbacks': ['error', 3],
'max-params': ['error', 3],
'unicorn/prefer-at': ['error', { checkAllIndexAccess: true }],
'unicorn/prevent-abbreviations': 'off',
'unicorn/filename-case': [
'error',
{
case: 'kebabCase',
ignore: ['.*\\.svelte\\.d\\.ts', '.*\\.spec\\.ts']
}
],
'no-undef': 'off'
},
settings: {
'svelte3/typescript': () => require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest'
},
env: {
browser: true,
es2021: true,
node: true
}
};