Skip to content

Commit

Permalink
chore: add eslint-plugin-compat (#29885)
Browse files Browse the repository at this point in the history
* chore: dd eslint-plugin-compat

* update browserslist

* update browserslist

* fix lint: lint:demo rules

* update @ant-design/tools
  • Loading branch information
yoyo837 authored Mar 25, 2021
1 parent d8a31ae commit 98ba403
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
extends: [
'airbnb',
'prettier',
'plugin:compat/recommended',
'plugin:jest/recommended',
'plugin:react/recommended',
'plugin:import/typescript',
Expand All @@ -18,6 +19,7 @@ module.exports = {
react: {
version: '16.9',
},
polyfills: ['Promise', 'URL'],
},
parser: '@typescript-eslint/parser',
plugins: ['react', 'babel', 'jest', '@typescript-eslint', 'react-hooks', 'unicorn', 'markdown'],
Expand Down Expand Up @@ -61,19 +63,20 @@ module.exports = {
},
rules: {
indent: 0,
'default-case': 0,
'eol-last': 0,
'no-console': 0,
'no-plusplus': 0,
'eol-last': 0,
'no-script-url': 0,
'default-case': 0,
'prefer-rest-params': 0,
'compat/compat': 0,
'react/no-access-state-in-setstate': 0,
'react/destructuring-assignment': 0,
'react/no-multi-comp': 0,
'react/no-array-index-key': 0,
'jsx-a11y/href-no-hash': 0,
'import/no-extraneous-dependencies': 0,
'jsx-a11y/control-has-associated-label': 0,
'import/no-extraneous-dependencies': 0,
},
},
],
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,12 @@
}
},
"browserslist": [
"> 0.5%",
"last 2 versions",
"Firefox ESR",
"> 1%",
"ie >= 11"
"not dead",
"IE 11",
"not IE 10"
],
"dependencies": {
"@ant-design/colors": "^6.0.0",
Expand Down Expand Up @@ -155,7 +157,7 @@
"devDependencies": {
"@ant-design/bisheng-plugin": "^2.3.0",
"@ant-design/hitu": "^0.0.0-alpha.13",
"@ant-design/tools": "^13.3.3",
"@ant-design/tools": "^13.4.0",
"@qixian.cs/github-contributors-list": "^1.0.3",
"@stackblitz/sdk": "^1.3.0",
"@types/classnames": "^2.2.8",
Expand Down Expand Up @@ -202,6 +204,7 @@
"eslint-config-airbnb": "^18.0.0",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-compat": "^3.9.0",
"eslint-plugin-import": "^2.21.1",
"eslint-plugin-jest": "^24.0.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
Expand Down

0 comments on commit 98ba403

Please sign in to comment.