Skip to content

Commit dae85e8

Browse files
committed
Add overrides to make the config more permissive than Airbnb’s
1 parent 6010073 commit dae85e8

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

config.js

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,49 @@ module.exports = {
99
jest: true,
1010
},
1111
plugins: ['react'],
12-
rules: {},
12+
rules: {
13+
// Do not enforce reassignment to properties of object parameters.
14+
'no-param-reassign': [2, { props: false }],
15+
// Temporary warning comments are ok.
16+
'no-warning-comments': [
17+
1,
18+
{ terms: ['todo', 'fixme', 'xxx'], location: 'start' },
19+
],
20+
// Allow underscore dangle for known offending variables.
21+
'no-underscore-dangle': [
22+
2,
23+
{ allow: ['__REDUX_DEVTOOLS_EXTENSION__', '__webpack_hash__'] },
24+
],
25+
// Allow variables to be snake_case (for compatibility with Python backends).
26+
'camelcase': 0,
27+
// Allow console.error statements in the code.
28+
'no-console': [2, { allow: ['error'] }],
29+
// Only forbid "any" proptype, not array or object.
30+
'react/forbid-prop-types': [2, { forbid: ['any'] }],
31+
// Disable requirement to not use bind.
32+
'react/jsx-no-bind': [0],
33+
// We do not want files whose content might change to have to be renamed.
34+
'react/jsx-filename-extension': [2, { extensions: ['.js'] }],
35+
// Allow devDependencies to be used in Storybook stories.
36+
'import/no-extraneous-dependencies': [
37+
2,
38+
{
39+
devDependencies: [
40+
'**/tests/**',
41+
'**/stories/**',
42+
'spec/**',
43+
'**/__tests__/**',
44+
'**/__mocks__/**',
45+
'**/*{.,_}{test,spec,story}.{js,jsx}',
46+
'**/jest.config.js',
47+
'**/webpack.config.*',
48+
'**/rollup.config.*',
49+
'**/gulpfile.*',
50+
],
51+
optionalDependencies: false,
52+
},
53+
],
54+
// Do not enforce that single-export files should use export default.
55+
'import/prefer-default-export': [0],
56+
},
1357
};

0 commit comments

Comments
 (0)