-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
60 lines (60 loc) · 1.8 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
module.exports = {
env: {
es6: true,
},
extends: ['eslint:recommended', 'airbnb', 'plugin:prettier/recommended'],
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react-native', 'prettier', 'react-hooks'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'airtable',
message: 'Do not use the airtable module outside of airtable.js',
},
{
name: './airtable',
message: 'Do not use airtable.js outside of request.js',
},
{
name: '../../lib/airtable',
message: 'Do not use airtable.js outside of request.js',
},
{
name: '../../../lib/airtable',
message: 'Do not use airtable.js outside of request.js',
},
],
},
],
'no-underscore-dangle': ['error', { allowAfterThis: true }],
'no-use-before-define': ['error', { variables: false }],
'no-const-assign': 'warn',
'no-this-before-super': 'warn',
'no-undef': 'warn',
'no-unreachable': 'warn',
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'constructor-super': 'warn',
'global-require': 'off',
'valid-typeof': 'warn',
'prettier/prettier': ['warn'],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/destructuring-assignment': 'off',
'react/forbid-prop-types': ['error', { forbid: ['any'] }],
'react/jsx-closing-bracket-location': 'off',
'react/jsx-curly-newline': 'off',
'react/jsx-wrap-multilines': 'off',
'react/jsx-props-no-spreading': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
};