@@ -12,18 +12,13 @@ module.exports = {
1212 extends : 'fbjs' ,
1313
1414 // Stop ESLint from looking for a configuration file in parent folders
15- ' root' : true ,
15+ root : true ,
1616
17- plugins : [
18- 'jest' ,
19- 'no-for-of-loops' ,
20- 'react' ,
21- 'react-internal' ,
22- ] ,
17+ plugins : [ 'jest' , 'no-for-of-loops' , 'react' , 'react-internal' ] ,
2318
24- parser : 'espree ' ,
19+ parser : 'babel-eslint ' ,
2520 parserOptions : {
26- ecmaVersion : 2017 ,
21+ ecmaVersion : 8 ,
2722 sourceType : 'script' ,
2823 ecmaFeatures : {
2924 experimentalObjectRestSpread : true ,
@@ -40,8 +35,8 @@ module.exports = {
4035 'dot-location' : [ ERROR , 'property' ] ,
4136 'dot-notation' : ERROR ,
4237 'eol-last' : ERROR ,
43- ' eqeqeq' : [ ERROR , 'allow-null' ] ,
44- ' indent' : OFF ,
38+ eqeqeq : [ ERROR , 'allow-null' ] ,
39+ indent : OFF ,
4540 'jsx-quotes' : [ ERROR , 'prefer-double' ] ,
4641 'keyword-spacing' : [ ERROR , { after : true , before : true } ] ,
4742 'no-bitwise' : OFF ,
@@ -51,9 +46,9 @@ module.exports = {
5146 'no-shadow' : ERROR ,
5247 'no-unused-expressions' : ERROR ,
5348 'no-unused-vars' : [ ERROR , { args : 'none' } ] ,
54- 'no-use-before-define' : [ ERROR , { functions : false , variables : false } ] ,
49+ 'no-use-before-define' : OFF ,
5550 'no-useless-concat' : OFF ,
56- ' quotes' : [ ERROR , 'single' , { avoidEscape : true , allowTemplateLiterals : true } ] ,
51+ quotes : [ ERROR , 'single' , { avoidEscape : true , allowTemplateLiterals : true } ] ,
5752 'space-before-blocks' : ERROR ,
5853 'space-before-function-paren' : OFF ,
5954 'valid-typeof' : [ ERROR , { requireStringLiterals : true } ] ,
@@ -65,6 +60,12 @@ module.exports = {
6560 'no-var' : ERROR ,
6661 strict : ERROR ,
6762
63+ // Enforced by Prettier
64+ // TODO: Prettier doesn't handle long strings or long comments. Not a big
65+ // deal. But I turned it off because loading the plugin causes some obscure
66+ // syntax error and it didn't seem worth investigating.
67+ 'max-len' : OFF ,
68+
6869 // React & JSX
6970 // Our transforms set this automatically
7071 'react/jsx-boolean-value' : [ ERROR , 'always' ] ,
@@ -78,7 +79,10 @@ module.exports = {
7879 'react/react-in-jsx-scope' : ERROR ,
7980 'react/self-closing-comp' : ERROR ,
8081 // We don't care to do this
81- 'react/jsx-wrap-multilines' : [ ERROR , { declaration : false , assignment : false } ] ,
82+ 'react/jsx-wrap-multilines' : [
83+ ERROR ,
84+ { declaration : false , assignment : false } ,
85+ ] ,
8286
8387 // Prevent for...of loops because they require a Symbol polyfill.
8488 // You can disable this rule for code that isn't shipped (e.g. build scripts and tests).
@@ -112,6 +116,7 @@ module.exports = {
112116 files : esNextPaths ,
113117 parser : 'babel-eslint' ,
114118 parserOptions : {
119+ ecmaVersion : 8 ,
115120 sourceType : 'module' ,
116121 } ,
117122 rules : {
@@ -124,14 +129,14 @@ module.exports = {
124129 rules : {
125130 // https://github.com/jest-community/eslint-plugin-jest
126131 'jest/no-focused-tests' : ERROR ,
127- }
132+ } ,
128133 } ,
129134 {
130135 files : [ 'packages/react-native-renderer/**/*.js' ] ,
131136 globals : {
132137 nativeFabricUIManager : true ,
133- }
134- }
138+ } ,
139+ } ,
135140 ] ,
136141
137142 globals : {
0 commit comments