-
Notifications
You must be signed in to change notification settings - Fork 31
/
.eslintrc.js
59 lines (59 loc) · 1.78 KB
/
.eslintrc.js
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
module.exports = {
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
extraFileExtensions: ['.svelte'], // This is a required setting in `@typescript-eslint/parser` v4.24.0
},
plugins: [
'@typescript-eslint',
],
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
// Parse the `<script>` in `.svelte` as TypeScript by adding the following configuration.
parserOptions: {
parser: '@typescript-eslint/parser',
},
rules: {
'@typescript-eslint/indent': 'off',
'no-label-var': 'off',
'import/first': 'off',
'import/no-cycle': 'off',
'import/no-mutable-exports': 'off',
},
},
],
rules: {
camelcase: 'off',
'no-undef': 'off',
'prefer-destructuring': 'off',
'no-param-reassign': 'warn',
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
}],
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'no-return-await': 'off',
'operator-linebreak': ['error', 'after'],
'object-curly-newline': ['error', {
multiline: true,
minProperties: 5,
consistent: true,
}],
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/explicit-module-boundary-types': ['error', { allowArgumentsExplicitlyTypedAsAny: true }],
},
};