diff --git a/package.json b/package.json index 6f5df3b..ef758ae 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/src/eslint.ts b/src/eslint.ts index 9c8e1b0..91151ac 100644 --- a/src/eslint.ts +++ b/src/eslint.ts @@ -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, @@ -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,