-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
63 lines (62 loc) · 2.42 KB
/
config.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
'use strict';
module.exports = {
extends: ['airbnb', 'airbnb/hooks', 'prettier'],
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
},
rules: {
// Do not enforce reassignment to properties of object parameters.
'no-param-reassign': [2, { props: false }],
// Temporary warning comments are ok.
'no-warning-comments': [
1,
{ terms: ['todo', 'fixme', 'xxx'], location: 'start' },
],
// Allow underscore dangle for known offending variables.
'no-underscore-dangle': [
2,
{ allow: ['__REDUX_DEVTOOLS_EXTENSION__', '__webpack_hash__'] },
],
// Allow variables to be snake_case (for compatibility with Python backends).
'camelcase': 0,
// Allow console.error statements in the code.
'no-console': [2, { allow: ['error'] }],
// Only forbid "any" proptype, not array or object.
'react/forbid-prop-types': [2, { forbid: ['any'] }],
// Disable requirement to not use bind.
'react/jsx-no-bind': [0],
// We do not want files whose content might change to have to be renamed.
'react/jsx-filename-extension': [2, { extensions: ['.js'] }],
// We enforce extact props with TypeScript, not PropTypes or Flow.
'react/prefer-exact-props': [0],
// Disabled until Airbnb configuration resolves https://github.com/airbnb/javascript/issues/2505.
'react/function-component-definition': [0],
// Allow devDependencies to be used in Storybook stories.
'import/no-extraneous-dependencies': [
2,
{
devDependencies: [
'**/tests/**',
'**/stories/**',
'**/storybook/**',
'spec/**',
'**/__tests__/**',
'**/__mocks__/**',
'**/*{.,_}{test,spec,story,stories}.*',
'**/jest.config.*',
'**/setupTests.*',
'**/webpack.config.*',
'**/rollup.config.*',
'**/tailwind.config.*',
'**/gulpfile.*',
],
optionalDependencies: false,
},
],
// Do not enforce that single-export files should use export default.
'import/prefer-default-export': [0],
},
};