Skip to content

Commit

Permalink
feat: replace eslint-plugin-babel with @babel/eslint-plugin and enabl…
Browse files Browse the repository at this point in the history
…e new rules (#145)
  • Loading branch information
yoyo837 committed May 27, 2023
1 parent e55d834 commit e944532
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -44,6 +44,7 @@
"dependencies": {
"@babel/core": "^7.12.10",
"@babel/eslint-parser": "^7.12.1",
"@babel/eslint-plugin": "^7.19.1",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-decorators": "^7.13.5",
"@babel/preset-env": "^7.12.11",
Expand All @@ -55,7 +56,6 @@
"eslint": "^7.11.0",
"eslint-config-prettier": "^8.3.0",
"eslint-formatter-pretty": "^4.0.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-jest": "^24.0.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.21.5",
Expand Down
7 changes: 6 additions & 1 deletion src/eslint.ts
Expand Up @@ -42,7 +42,7 @@ if (isTsProject) {
module.exports = {
extends: ['prettier', 'plugin:react/recommended'],
parser: '@babel/eslint-parser',
plugins: ['react', 'jest', 'unicorn', 'react-hooks'],
plugins: ['react', 'jest', '@babel', 'unicorn', 'react-hooks'],
env: {
browser: true,
node: true,
Expand All @@ -53,6 +53,11 @@ module.exports = {
},
rules: {
strict: ['error', 'never'],
'@babel/new-cap': 0,
'@babel/no-invalid-this': 0,
'@babel/no-unused-expressions': 2,
'@babel/object-curly-spacing': 0,
'@babel/semi': 2,
'react/display-name': 0,
'react/jsx-props-no-spreading': 0,
'react/state-in-constructor': 0,
Expand Down

0 comments on commit e944532

Please sign in to comment.