forked from Airtable/blocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
160 lines (154 loc) · 5.04 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
const path = require('path');
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:react/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: path.join(__dirname, './tsconfig.json'),
sourceType: 'module',
},
plugins: [
'airtable',
'@airtable/blocks',
'react',
'react-hooks',
'import',
'jsdoc',
'@typescript-eslint',
],
settings: {
react: {
version: '16.8',
},
jsdoc: {
ignorePrivate: true,
tagNamePreference: {
private: 'internal',
},
},
},
rules: {
'array-callback-return': 'error',
'block-scoped-var': 'error',
'consistent-return': 'error',
'consistent-this': ['error', 'that'],
curly: 'error',
'default-case': 'error',
eqeqeq: 'error',
'guard-for-in': 'error',
'handle-callback-err': 'error',
'new-parens': 'error',
'no-array-constructor': 'error',
'no-async-promise-executor': 'error',
'no-buffer-constructor': 'error',
'no-caller': 'error',
'no-case-declarations': 'error',
'no-catch-shadow': 'error',
'no-console': 'error',
'no-constant-condition': 'error',
'no-debugger': 'error',
'no-div-regex': 'error',
'no-duplicate-imports': 'error',
'no-empty': 'error',
'no-eq-null': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-label': 'error',
'no-extra-semi': 'error',
'no-global-assign': 'error',
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
'no-iterator': 'error',
'no-label-var': 'error',
'no-labels': 'error',
'no-lone-blocks': 'error',
'no-loop-func': 'error',
'no-mixed-requires': 'error',
'no-multi-str': 'error',
'no-native-reassign': 'error',
'no-new-object': 'error',
'no-new-require': 'error',
'no-new-wrappers': 'error',
'no-octal-escape': 'error',
'no-path-concat': 'error',
'no-proto': 'error',
'no-prototype-builtins': 'error',
'no-redeclare': 'error',
'no-regex-spaces': 'error',
'no-script-url': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-shadow-restricted-names': 'error',
'no-shadow': 'error',
'no-sparse-arrays': 'error',
'no-template-curly-in-string': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-undef': 'off',
'no-unneeded-ternary': 'error',
'no-unreachable': 'error',
'no-unsafe-negation': 'error',
'no-unused-expressions': 'error',
'no-unused-vars': 'off',
'no-useless-call': 'error',
'no-useless-computed-key': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-void': 'error',
'no-with': 'error',
'one-var-declaration-per-line': 'error',
'prefer-spread': 'error',
quotes: 'off',
radix: 'error',
'require-yield': 'off',
yoda: 'error',
'airtable/background-image-url-double-quotes': 'warn',
'airtable/is-returns-boolean': 'warn',
'airtable/no-missing-async-suffix': 'warn',
'airtable/no-missing-await': 'warn',
'airtable/no-process-domain': 'warn',
'airtable/noopener-noreferrer': 'off',
'@airtable/blocks/no-throw-new': 'error',
'@airtable/blocks/no-node-modules-invariant': 'error',
'@airtable/blocks/no-error-interpolation': ['error', {spawnError: 0, invariant: 1}],
'jsdoc/check-tag-names': [
'error',
{
definedTags: [
'hidden',
'reactComponent',
'noInheritDoc',
'docsPath',
'groupPath',
'component',
'hook',
],
},
],
'jsdoc/newline-after-description': 'error',
'jsdoc/no-types': 'error',
'import/first': 'error',
'import/order': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react/display-name': 'off',
'react/jsx-boolean-value': ['error', 'always'],
'react/jsx-fragments': ['error', 'element'],
'react/no-unescaped-entities': 'off',
'react/prop-types': ['error'],
'react/react-in-jsx-scope': 'error',
'@typescript-eslint/no-unused-vars': ['error', {vars: 'all', args: 'none'}],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
},
};