generated from furystack/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
73 lines (73 loc) · 2.41 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
67
68
69
70
71
72
73
module.exports = {
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'plugin:jsdoc/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier', 'jsdoc'],
env: { browser: true, node: true, es6: true, jest: true },
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
// jsdoc: { exemptEmptyFunctions: false },
},
rules: {
'arrow-parens': ['error', 'always'],
'no-unused-vars': 'off',
'no-console': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'off', // Use Typescript own check for this
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
accessibility: 'explicit',
overrides: {
accessors: 'explicit',
constructors: 'no-public',
methods: 'explicit',
properties: 'off',
parameterProperties: 'explicit',
},
},
],
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/array-type': ['error', { default: 'array-simple', readonly: 'array-simple' }],
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'prettier/prettier': 'error',
'require-jsdoc': 1,
'object-shorthand': 'error',
'dot-notation': 'error',
'no-caller': 'error',
'no-useless-concat': 'error',
radix: 'error',
yoda: 'error',
'prefer-arrow-callback': 'error',
'prefer-rest-params': 'error',
'no-var': 'error',
'prefer-const': 'error',
'prefer-spread': 'error',
'no-shadow': 'error',
'@typescript-eslint/no-useless-constructor': 'error',
'prefer-template': 'error',
'prefer-destructuring': ['error', { array: false, object: true }],
'default-case': 'error',
'jsdoc/require-param-type': 'off',
'jsdoc/require-returns-type': 'off',
},
overrides: [
{
files: ['packages/**/test/**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-object-literal-type-assertion': 'off',
'dot-notation': 'off',
},
},
],
}