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 (ant-design#39335)

* feat: replace eslint-plugin-babel with @babel/eslint-plugin and enable new rules

* My empty commit with a message
  • Loading branch information
yoyo837 authored Dec 7, 2022
1 parent 37c83be commit d57f1c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
},
},
parser: '@typescript-eslint/parser',
plugins: ['react', 'babel', 'jest', '@typescript-eslint', 'react-hooks', 'unicorn', 'markdown'],
plugins: ['react', '@babel', 'jest', '@typescript-eslint', 'react-hooks', 'unicorn', 'markdown'],
// https://github.com/typescript-eslint/typescript-eslint/issues/46#issuecomment-470486034
overrides: [
{
Expand Down Expand Up @@ -67,6 +67,11 @@ module.exports = {
},
rules: {
indent: 0,
'@babel/new-cap': 0,
'@babel/no-invalid-this': 0,
'@babel/no-unused-expressions': 2,
'@babel/object-curly-spacing': 0,
'@babel/semi': 2,
'default-case': 0,
'eol-last': 0,
'no-console': 0,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
"@ant-design/bisheng-plugin": "^3.3.0-alpha.4",
"@ant-design/hitu": "^0.0.0-alpha.13",
"@ant-design/tools": "^16.1.0-alpha.2",
"@babel/eslint-plugin": "^7.19.1",
"@docsearch/css": "^3.0.0",
"@emotion/babel-preset-css-prop": "^11.10.0",
"@emotion/css": "^11.10.5",
Expand Down Expand Up @@ -215,7 +216,6 @@
"eslint-config-airbnb": "^19.0.0",
"eslint-config-prettier": "^8.0.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-compat": "^4.0.0",
"eslint-plugin-import": "^2.21.1",
"eslint-plugin-jest": "^27.0.1",
Expand Down

0 comments on commit d57f1c7

Please sign in to comment.