mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 00:14:18 +00:00
feat(eslint-config): extends typescript-eslint recommended (#6076)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
'airbnb-base',
|
||||
'plugin:@typescript-eslint/eslint-recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:vue/recommended',
|
||||
'prettier',
|
||||
'prettier/vue',
|
||||
@@ -8,7 +10,7 @@ module.exports = {
|
||||
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
ecmaVersion: 2018,
|
||||
ecmaVersion: 2019,
|
||||
sourceType: 'module',
|
||||
extraFileExtensions: ['.vue'],
|
||||
},
|
||||
@@ -23,35 +25,40 @@ module.exports = {
|
||||
},
|
||||
|
||||
rules: {
|
||||
camelcase: 0,
|
||||
'no-new': 0,
|
||||
'no-shadow': 0,
|
||||
'no-bitwise': 0,
|
||||
'func-names': 0,
|
||||
'no-console': 0,
|
||||
'no-plusplus': 0,
|
||||
'default-case': 0,
|
||||
'prefer-template': 0,
|
||||
'consistent-return': 0,
|
||||
'no-param-reassign': 0,
|
||||
'no-nested-ternary': 0,
|
||||
'no-underscore-dangle': 0,
|
||||
'no-unused-expressions': 0,
|
||||
'no-restricted-globals': 0,
|
||||
'class-methods-use-this': 0,
|
||||
'no-new': 'off',
|
||||
'no-shadow': 'off',
|
||||
'no-bitwise': 'off',
|
||||
'func-names': 'off',
|
||||
'no-console': 'off',
|
||||
'no-plusplus': 'off',
|
||||
'default-case': 'off',
|
||||
'prefer-template': 'off',
|
||||
'consistent-return': 'off',
|
||||
'no-param-reassign': 'off',
|
||||
'no-nested-ternary': 'off',
|
||||
'no-underscore-dangle': 'off',
|
||||
'no-unused-expressions': 'off',
|
||||
'no-restricted-globals': 'off',
|
||||
'class-methods-use-this': 'off',
|
||||
'prefer-destructuring': ['error', { object: true, array: false }],
|
||||
'import/order': 0,
|
||||
'import/extensions': 0,
|
||||
'import/no-unresolved': 0,
|
||||
'import/prefer-default-export': 0,
|
||||
'import/no-extraneous-dependencies': 0,
|
||||
'vue/no-v-html': 0,
|
||||
'vue/attributes-order': 0,
|
||||
'vue/require-v-for-key': 0,
|
||||
'vue/require-default-prop': 0,
|
||||
'vue/no-unused-components': 0,
|
||||
// eslint-plugin-import
|
||||
'import/order': 'off',
|
||||
'import/extensions': 'off',
|
||||
'import/no-unresolved': 'off',
|
||||
'import/prefer-default-export': 'off',
|
||||
'import/no-extraneous-dependencies': 'off',
|
||||
// eslint-plugin-vue
|
||||
'vue/no-v-html': 'off',
|
||||
'vue/attributes-order': 'off',
|
||||
'vue/require-v-for-key': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/no-unused-components': 'off',
|
||||
'vue/name-property-casing': ['error', 'kebab-case'],
|
||||
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
|
||||
'@typescript-eslint/no-unused-vars': ['error'],
|
||||
// typescript-eslint
|
||||
'@typescript-eslint/camelcase': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
},
|
||||
};
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vant/eslint-config",
|
||||
"version": "2.1.0",
|
||||
"version": "2.2.0",
|
||||
"description": "eslint config of vant",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
@@ -12,8 +12,8 @@
|
||||
"eslint": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^2.27.0",
|
||||
"@typescript-eslint/parser": "^2.27.0",
|
||||
"@typescript-eslint/eslint-plugin": "^2.28.0",
|
||||
"@typescript-eslint/parser": "^2.28.0",
|
||||
"eslint-config-airbnb-base": "^14.1.0",
|
||||
"eslint-config-prettier": "^6.10.1",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
|
@@ -28,40 +28,40 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636"
|
||||
integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^2.27.0":
|
||||
version "2.27.0"
|
||||
resolved "https://registry.npm.taobao.org/@typescript-eslint/eslint-plugin/download/@typescript-eslint/eslint-plugin-2.27.0.tgz?cache=0&sync_timestamp=1586453146898&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40typescript-eslint%2Feslint-plugin%2Fdownload%2F%40typescript-eslint%2Feslint-plugin-2.27.0.tgz#e479cdc4c9cf46f96b4c287755733311b0d0ba4b"
|
||||
integrity sha1-5HnNxMnPRvlrTCh3VXMzEbDQuks=
|
||||
"@typescript-eslint/eslint-plugin@^2.28.0":
|
||||
version "2.28.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.28.0.tgz#4431bc6d3af41903e5255770703d4e55a0ccbdec"
|
||||
integrity sha512-w0Ugcq2iatloEabQP56BRWJowliXUP5Wv6f9fKzjJmDW81hOTBxRoJ4LoEOxRpz9gcY51Libytd2ba3yLmSOfg==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "2.27.0"
|
||||
"@typescript-eslint/experimental-utils" "2.28.0"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
regexpp "^3.0.0"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
"@typescript-eslint/experimental-utils@2.27.0":
|
||||
version "2.27.0"
|
||||
resolved "https://registry.npm.taobao.org/@typescript-eslint/experimental-utils/download/@typescript-eslint/experimental-utils-2.27.0.tgz#801a952c10b58e486c9a0b36cf21e2aab1e9e01a"
|
||||
integrity sha1-gBqVLBC1jkhsmgs2zyHiqrHp4Bo=
|
||||
"@typescript-eslint/experimental-utils@2.28.0":
|
||||
version "2.28.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz#1fd0961cd8ef6522687b4c562647da6e71f8833d"
|
||||
integrity sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.3"
|
||||
"@typescript-eslint/typescript-estree" "2.27.0"
|
||||
"@typescript-eslint/typescript-estree" "2.28.0"
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
|
||||
"@typescript-eslint/parser@^2.27.0":
|
||||
version "2.27.0"
|
||||
resolved "https://registry.npm.taobao.org/@typescript-eslint/parser/download/@typescript-eslint/parser-2.27.0.tgz#d91664335b2c46584294e42eb4ff35838c427287"
|
||||
integrity sha1-2RZkM1ssRlhClOQutP81g4xCcoc=
|
||||
"@typescript-eslint/parser@^2.28.0":
|
||||
version "2.28.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.28.0.tgz#bb761286efd2b0714761cab9d0ee5847cf080385"
|
||||
integrity sha512-RqPybRDquui9d+K86lL7iPqH6Dfp9461oyqvlXMNtap+PyqYbkY5dB7LawQjDzot99fqzvS0ZLZdfe+1Bt3Jgw==
|
||||
dependencies:
|
||||
"@types/eslint-visitor-keys" "^1.0.0"
|
||||
"@typescript-eslint/experimental-utils" "2.27.0"
|
||||
"@typescript-eslint/typescript-estree" "2.27.0"
|
||||
"@typescript-eslint/experimental-utils" "2.28.0"
|
||||
"@typescript-eslint/typescript-estree" "2.28.0"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
|
||||
"@typescript-eslint/typescript-estree@2.27.0":
|
||||
version "2.27.0"
|
||||
resolved "https://registry.npm.taobao.org/@typescript-eslint/typescript-estree/download/@typescript-eslint/typescript-estree-2.27.0.tgz#a288e54605412da8b81f1660b56c8b2e42966ce8"
|
||||
integrity sha1-oojlRgVBLai4HxZgtWyLLkKWbOg=
|
||||
"@typescript-eslint/typescript-estree@2.28.0":
|
||||
version "2.28.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz#d34949099ff81092c36dc275b6a1ea580729ba00"
|
||||
integrity sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
|
Reference in New Issue
Block a user