Browse Source

chore: add eslint-plugin-compat (#29885)

* chore: dd eslint-plugin-compat

* update browserslist

* update browserslist

* fix lint: lint:demo rules

* update @ant-design/tools
pull/29911/head
Amumu 4 years ago
committed by GitHub
parent
commit
98ba4038c1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      .eslintrc.js
  2. 9
      package.json

9
.eslintrc.js

@ -2,6 +2,7 @@ module.exports = {
extends: [
'airbnb',
'prettier',
'plugin:compat/recommended',
'plugin:jest/recommended',
'plugin:react/recommended',
'plugin:import/typescript',
@ -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'],
@ -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,
},
},
],

9
package.json

@ -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",
@ -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",
@ -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",

Loading…
Cancel
Save