@@ -9,5 +9,49 @@ module.exports = {
9
9
jest : true ,
10
10
} ,
11
11
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
+ } ,
13
57
} ;
0 commit comments