generated from kota-yata/Sveltekitemp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
107 lines (107 loc) · 3.79 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2019
},
env: {
browser: true,
es2017: true,
node: true
},
rules: {
semi: ['error', 'always'],
curly: ['error', 'multi-line', 'consistent'],
'default-case-last': 'error',
'dot-location': ['error', 'property'],
'dot-notation': ['error', { allowPattern: '^[a-z]+([-_][a-z]+)+$' }],
eqeqeq: ['error', 'always'],
'no-alert': 'error',
'no-constructor-return': 'error',
'no-eval': 'error',
'no-implicit-coercion': 'error',
'no-implicit-globals': 'warn',
'no-invalid-this': 'error',
'no-multi-spaces': 'error',
'no-labels': 'warn',
'no-lone-blocks': 'error',
'no-loop-func': 'error',
'no-multi-str': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'warn',
'no-param-reassign': ['error', { props: false }],
'no-return-assign': ['error', 'always'],
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-unused-expressions': 'warn',
'no-useless-call': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'no-useless-escape': 'warn',
'no-void': 'error',
'no-with': 'error',
yoda: ['error', 'never'],
'no-undef-init': 'error',
'array-bracket-newline': ['warn', 'consistent'],
'array-bracket-spacing': ['error', 'never'],
'block-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
camelcase: ['warn', { properties: 'always', ignoreImports: false }],
'comma-spacing': ['error', { before: false, after: true }],
'comma-style': ['error', 'last'],
'computed-property-spacing': ['error', 'never'],
'eol-last': ['error', 'always'],
'func-call-spacing': ['error', 'never'],
'func-name-matching': 'warn',
'function-call-argument-newline': ['error', 'consistent'],
'function-paren-newline': 'off',
'implicit-arrow-linebreak': 'off',
indent: ['error', 2],
'jsx-quotes': ['error', 'prefer-single'],
'key-spacing': ['error', { beforeColon: false, afterColon: true, mode: 'strict' }],
'keyword-spacing': ['error', { before: true, after: true }],
'linebreak-style': ['error', 'unix'],
'lines-between-class-members': ['error', 'never'],
'max-len': [
'error',
{
code: 180,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true
},
],
'multiline-ternary': ['error', 'never'],
'new-parens': ['error', 'always'],
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 5 }],
'no-multiple-empty-lines': ['error', { max: 3, maxEOF: 0 }],
'no-nested-ternary': 'error',
'no-tabs': 'error',
'no-trailing-spaces': 'error',
'no-whitespace-before-property': 'error',
'nonblock-statement-body-position': 'off',
'object-curly-newline': ['error', { multiline: true }],
'object-curly-spacing': ['error', 'always'],
quotes: ['error', 'single', { allowTemplateLiterals: true }],
'semi-spacing': ['error', { before: false, after: true }],
'sort-vars': 'error',
'space-before-blocks': 'error',
'space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'always' }],
'space-in-parens': ['error', 'never'],
'arrow-body-style': ['error', 'as-needed'],
'arrow-spacing': 'error',
'no-var': 'error',
}
};