Skip to content

Commit 330ef3b

Browse files
committed
fix(lint): use eslint-plugin-babel for some rules
closes #19
1 parent c506284 commit 330ef3b

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"cross-spawn": "^6.0.5",
6565
"eslint": "^5.7.0",
6666
"eslint-config-prettier": "^3.1.0",
67+
"eslint-plugin-babel": "^5.2.1",
6768
"eslint-plugin-import": "^2.14.0",
6869
"eslint-plugin-jsx-a11y": "^6.1.1",
6970
"eslint-plugin-prettier": "^3.0.0",

src/config/eslintrc.base.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
sourceType: 'module',
99
ecmaVersion: 6,
1010
},
11-
plugins: ['typescript', 'import'],
11+
plugins: ['typescript', 'import', 'babel'],
1212
settings: {
1313
'import/resolver': {
1414
node: {
@@ -46,7 +46,7 @@ module.exports = {
4646
'no-implied-eval': 'error', // I mean, why would you use eval nowadays?
4747
'no-extend-native': 'error',
4848
'no-extra-bind': 'error',
49-
'no-invalid-this': 'error',
49+
'babel/no-invalid-this': 'error',
5050
'no-iterator': 'error',
5151
'no-labels': 'error',
5252
'no-loop-func': 'error',
@@ -114,7 +114,7 @@ module.exports = {
114114
'no-sequences': 'error',
115115
'no-throw-literal': 'error',
116116
'no-unmodified-loop-condition': 'error',
117-
'no-unused-expressions': 'error',
117+
'babel/no-unused-expressions': 'error',
118118
'no-useless-call': 'error',
119119
'no-useless-concat': 'error',
120120
'no-void': 'error',
@@ -142,7 +142,7 @@ module.exports = {
142142
'func-names': 'error',
143143
'lines-between-class-members': 'error',
144144
'max-statements-per-line': 'error',
145-
'new-cap': 'error',
145+
'babel/new-cap': 'error',
146146
'new-parens': 'error',
147147
'no-bitwise': 'error',
148148
'no-lonely-if': 'error',

0 commit comments

Comments
 (0)