-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.eslintrc.js
110 lines (107 loc) · 3.85 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
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
108
109
110
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'@react-native',
'plugin:jsdoc/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
],
plugins: ['@typescript-eslint', 'jsdoc', 'jest'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
},
rules: {
'prettier/prettier': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
'react-native/no-color-literals': 'off',
'react-native/no-inline-styles': 'off',
'react-native/sort-styles': 'off',
'react/react-in-jsx-scope': 'off',
'no-trailing-spaces': [
'error',
{
ignoreComments: true,
},
],
// JEST
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
// JsDoc
'jsdoc/check-access': 'warn', // Recommended
'jsdoc/check-alignment': 'warn', // Recommended
'jsdoc/check-examples': 'off',
'jsdoc/check-indentation': 'off',
'jsdoc/check-line-alignment': 'off',
'jsdoc/check-param-names': 'warn', // Recommended
'jsdoc/check-property-names': 'warn', // Recommended
'jsdoc/check-syntax': 'off',
'jsdoc/check-tag-names': 'warn', // Recommended
'jsdoc/check-types': 'warn', // Recommended
'jsdoc/check-values': 'warn', // Recommended
'jsdoc/empty-tags': 'warn', // Recommended
'jsdoc/implements-on-classes': 'warn', // Recommended
'jsdoc/match-description': 'off',
'jsdoc/multiline-blocks': 'warn', // Recommended
// 'jsdoc/newline-after-description': 'warn', // Recommended
'jsdoc/no-bad-blocks': 'off',
'jsdoc/no-defaults': 'off',
'jsdoc/no-missing-syntax': 'off',
'jsdoc/no-multi-asterisks': 'warn', // Recommended
'jsdoc/no-restricted-syntax': 'off',
'jsdoc/no-types': 'off',
'jsdoc/no-undefined-types': 'warn', // Recommended
'jsdoc/require-asterisk-prefix': 'off',
'jsdoc/require-description': 'off',
'jsdoc/require-description-complete-sentence': 'off',
'jsdoc/require-example': 'off',
'jsdoc/require-file-overview': 'off',
'jsdoc/require-hyphen-before-param-description': 'off',
'jsdoc/require-jsdoc': 'warn', // Recommended
'jsdoc/require-param': 'warn', // Recommended
'jsdoc/require-param-description': 'warn', // Recommended
'jsdoc/require-param-name': 'warn', // Recommended
'jsdoc/require-param-type': 'warn', // Recommended
'jsdoc/require-property': 'warn', // Recommended
'jsdoc/require-property-description': 'warn', // Recommended
'jsdoc/require-property-name': 'warn', // Recommended
'jsdoc/require-property-type': 'warn', // Recommended
'jsdoc/require-returns': 'warn', // Recommended
'jsdoc/require-returns-check': 'warn', // Recommended
'jsdoc/require-returns-description': 'warn', // Recommended
'jsdoc/require-returns-type': 'warn', // Recommended
'jsdoc/require-throws': 'off',
'jsdoc/require-yields': 'warn', // Recommended
'jsdoc/require-yields-check': 'warn', // Recommended
'jsdoc/sort-tags': 'off',
'jsdoc/tag-lines': 'warn', // Recommended
'jsdoc/valid-types': 'warn', // Recommended
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
},
],
},
ignorePatterns: ['**/node_modules/', '**/lib/', '**/scripts/'],
env: {
'jest/globals': true,
'jest': true,
'commonjs': true,
'node': true,
},
};