@@ -22,12 +22,30 @@ module.exports = {
2222      } , 
2323    ] , 
2424
25+     // Replace Airbnb 'brace-style' rule with '@typescript-eslint' version 
26+     // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md 
27+     "brace-style" : "off" , 
28+     "@typescript-eslint/brace-style" : [ 
29+       "error" , 
30+       "1tbs" , 
31+       {  allowSingleLine : true  } , 
32+     ] , 
33+ 
2534    // Replace Airbnb 'camelcase' rule with '@typescript-eslint' version 
2635    // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/camelcase.md 
2736    camelcase : "off" , 
28-     "@typescript-eslint/camelcase" : [ "error" ,  {  properties : "never"  } ] , 
37+     "@typescript-eslint/camelcase" : [ 
38+       "error" , 
39+       {  properties : "never" ,  ignoreDestructuring : false  } , 
40+     ] , 
41+ 
42+     // Replace Airbnb 'func-call-spacing' rule with '@typescript-eslint' version 
43+     // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md 
44+     "func-call-spacing" : "off" , 
45+     "@typescript-eslint/func-call-spacing" : [ "error" ,  "never" ] , 
2946
3047    // Replace Airbnb 'indent' rule with '@typescript-indent' version 
48+     // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md 
3149    indent : "off" , 
3250    "@typescript-eslint/indent" : [ 
3351      "error" , 
@@ -77,6 +95,44 @@ module.exports = {
7795    "no-array-constructor" : "off" , 
7896    "@typescript-eslint/no-array-constructor" : "error" , 
7997
98+     // Replace Airbnb 'no-empty-function' rule with '@typescript-indent' version 
99+     // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md 
100+     "no-empty-function" : "off" , 
101+     "@typescript-eslint/no-empty-function" : [ 
102+       "error" , 
103+       { 
104+         allow : [ "arrowFunctions" ,  "functions" ,  "methods" ] , 
105+       } , 
106+     ] , 
107+ 
108+     // Replace Airbnb 'no-extra-parens' rule with '@typescript-indent' version 
109+     // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md 
110+     "no-extra-parens" : "off" , 
111+     "@typescript-eslint/no-extra-parens" : [ 
112+       "off" , 
113+       "all" , 
114+       { 
115+         conditionalAssign : true , 
116+         nestedBinaryExpressions : false , 
117+         returnAssign : false , 
118+         ignoreJSX : "all" ,  // delegate to eslint-plugin-react 
119+         enforceForArrowConditionals : false , 
120+       } , 
121+     ] , 
122+ 
123+     // Replace Airbnb 'no-magic-numbers' rule with '@typescript-indent' version 
124+     // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-magic-numbers.md 
125+     "no-magic-numbers" : "off" , 
126+     "@typescript-eslint/no-magic-numbers" : [ 
127+       "off" , 
128+       { 
129+         ignore : [ ] , 
130+         ignoreArrayIndexes : true , 
131+         enforceConst : true , 
132+         detectObjects : false , 
133+       } , 
134+     ] , 
135+ 
80136    // Replace Airbnb 'no-unused-vars' rule with '@typescript-eslint' version 
81137    // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md 
82138    "no-unused-vars" : "off" , 
@@ -85,6 +141,39 @@ module.exports = {
85141      {  vars : "all" ,  args : "after-used" ,  ignoreRestSiblings : true  } , 
86142    ] , 
87143
144+     // Replace Airbnb 'no-use-before-define' rule with '@typescript-eslint' version 
145+     // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md 
146+     "no-use-before-define" : "off" , 
147+     "@typescript-eslint/no-use-before-define" : [ 
148+       "error" , 
149+       {  functions : true ,  classes : true ,  variables : true  } , 
150+     ] , 
151+ 
152+     // Replace Airbnb 'no-useless-constructor' rule with '@typescript-eslint' version 
153+     // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md 
154+     "no-useless-constructor" : "off" , 
155+     "@typescript-eslint/no-useless-constructor" : "error" , 
156+ 
157+     // Replace Airbnb 'semi' rule with '@typescript-eslint' version 
158+     // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md 
159+     semi : "off" , 
160+     "@typescript-eslint/semi" : [ "error" ,  "always" ] , 
161+ 
162+     // Append `ts` and `tsx` to Airbnb 'import/extensions' rule 
163+     // Ensure consistent use of file extension within the import path 
164+     // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md 
165+     "import/extensions" : [ 
166+       "error" , 
167+       "ignorePackages" , 
168+       { 
169+         js : "never" , 
170+         mjs : "never" , 
171+         jsx : "never" , 
172+         ts : "never" , 
173+         tsx : "never" , 
174+       } , 
175+     ] , 
176+ 
88177    // Append `ts` and `tsx` extensions to Airbnb 'import/no-extraneous-dependencies' rule 
89178    // Forbid the use of extraneous packages 
90179    // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md 
@@ -116,25 +205,5 @@ module.exports = {
116205        optionalDependencies : false , 
117206      } , 
118207    ] , 
119- 
120-     // Append `ts` and `tsx` to Airbnb 'import/extensions' rule 
121-     // Ensure consistent use of file extension within the import path 
122-     // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md 
123-     "import/extensions" : [ 
124-       "error" , 
125-       "ignorePackages" , 
126-       { 
127-         js : "never" , 
128-         mjs : "never" , 
129-         jsx : "never" , 
130-         ts : "never" , 
131-         tsx : "never" , 
132-       } , 
133-     ] , 
134- 
135-     // Replace Airbnb 'semi' rule with '@typescript-eslint' version 
136-     // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md 
137-     semi : "off" , 
138-     "@typescript-eslint/semi" : [ "error" ,  "always" ] , 
139208  } , 
140209} 
0 commit comments