generated from kabaluyot/daks.ts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
66 lines (66 loc) · 1.61 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
60
61
62
63
64
65
66
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
'@nuxtjs/eslint-config-typescript',
'prettier',
'prettier/vue',
'plugin:prettier/recommended',
'plugin:nuxt/recommended',
],
plugins: ['prettier'],
// add your custom rules here
rules: {
'prettier/prettier': 'error',
semi: 0,
'space-before-function-paren': ['error', 'never'],
'no-unused-vars': 'off', // disable default
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: false,
},
],
'@typescript-eslint/member-delimiter-style': 0,
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/explicit-function-return-type': 'off', // disable default
'@typescript-eslint/no-explicit-any': 'error',
camelcase: 'off',
'@typescript-eslint/naming-convention': [
'warn',
{
selector: 'variable',
format: ['camelCase'],
},
],
},
overrides: [
{
// enable the rule specifically for TypeScript files
files: ['*.ts', '*.tsx', '*.vue'],
rules: {
'@typescript-eslint/explicit-function-return-type': ['error'],
},
},
{
// allow explicit any in these files and missing return type
files: [
'state.ts',
'getters.ts',
'repository.ts',
'*.repository.ts',
'test/**/*',
'*.d.ts',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': ['off'],
},
},
],
}