add eslint for typescript

This commit is contained in:
liangping 2022-09-03 09:26:47 +08:00
parent cb11ecaccf
commit c32c82fdcc
4 changed files with 113 additions and 5 deletions

View File

@ -5,9 +5,9 @@ module.exports = {
},
extends: [
'@vue/airbnb',
'plugin:vue/recommended',
// "plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
'plugin:vue/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
// "plugin:prettier/recommended",
// "prettier/@typescript-eslint"
],
@ -27,12 +27,12 @@ module.exports = {
'vue/multi-word-component-names': 0,
'vue/no-mutating-props': 0,
'vue/v-slot-style': 0,
'camelcase': 0,
camelcase: 0,
'vuejs-accessibility/click-events-have-key-events': 'off',
'vuejs-accessibility/mouse-events-have-key-events': 'off',
'vuejs-accessibility/anchor-has-content': 'off',
'no-unsafe-optional-chaining': 1,
'vuejs-accessibility/label-has-for': 1,
'import/extensions': 'off'
'import/extensions': 'off',
},
}

View File

@ -27,9 +27,12 @@
"@ledgerhq/hw-app-eth": "^6.28.2",
"@ledgerhq/hw-transport-web-ble": "^6.27.1",
"@ledgerhq/hw-transport-webusb": "^6.27.1",
"@ledgerhq/hw-transport": "6.27.2",
"@metamask/eth-sig-util": "^4.0.1",
"@tharsis/address-converter": "^0.1.8",
"@tharsis/transactions": "^0.2.5",
"@tharsis/eip712": "0.2.4",
"@tharsis/proto": "0.1.20",
"@vue/composition-api": "^1.4.9",
"@vueuse/core": "4.0.0",
"animate.css": "4.1.1",
@ -105,6 +108,7 @@
"@vue/cli-service": "~5.0.4",
"@vue/eslint-config-airbnb": "^6.0.0",
"@vue/eslint-config-standard": "6.1.0",
"@vue/eslint-config-typescript": "11.0.0",
"@vuepress/plugin-medium-zoom": "^1.7.1",
"compression-webpack-plugin": "6.1.1",
"eslint": "^8.15.0",

View File

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path')
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
// const CompressionWebpackPlugin = require('compression-webpack-plugin')

103
yarn.lock
View File

@ -2722,6 +2722,21 @@
dependencies:
"@types/node" "*"
"@typescript-eslint/eslint-plugin@^5.0.0":
version "5.36.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.36.1.tgz#471f64dc53600025e470dad2ca4a9f2864139019"
integrity sha512-iC40UK8q1tMepSDwiLbTbMXKDxzNy+4TfPWgIL661Ym0sD42vRcQU93IsZIrmi+x292DBr60UI/gSwfdVYexCA==
dependencies:
"@typescript-eslint/scope-manager" "5.36.1"
"@typescript-eslint/type-utils" "5.36.1"
"@typescript-eslint/utils" "5.36.1"
debug "^4.3.4"
functional-red-black-tree "^1.0.1"
ignore "^5.2.0"
regexpp "^3.2.0"
semver "^7.3.7"
tsutils "^3.21.0"
"@typescript-eslint/eslint-plugin@^5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.25.0.tgz#e8ce050990e4d36cc200f2de71ca0d3eb5e77a31"
@ -2737,6 +2752,16 @@
semver "^7.3.7"
tsutils "^3.21.0"
"@typescript-eslint/parser@^5.0.0":
version "5.36.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.36.1.tgz#931c22c7bacefd17e29734628cdec8b2acdcf1ce"
integrity sha512-/IsgNGOkBi7CuDfUbwt1eOqUXF9WGVBW9dwEe1pi+L32XrTsZIgmDFIi2RxjzsvB/8i+MIf5JIoTEH8LOZ368A==
dependencies:
"@typescript-eslint/scope-manager" "5.36.1"
"@typescript-eslint/types" "5.36.1"
"@typescript-eslint/typescript-estree" "5.36.1"
debug "^4.3.4"
"@typescript-eslint/parser@^5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.25.0.tgz#fb533487147b4b9efd999a4d2da0b6c263b64f7f"
@ -2755,6 +2780,14 @@
"@typescript-eslint/types" "5.25.0"
"@typescript-eslint/visitor-keys" "5.25.0"
"@typescript-eslint/scope-manager@5.36.1":
version "5.36.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.36.1.tgz#23c49b7ddbcffbe09082e6694c2524950766513f"
integrity sha512-pGC2SH3/tXdu9IH3ItoqciD3f3RRGCh7hb9zPdN2Drsr341zgd6VbhP5OHQO/reUqihNltfPpMpTNihFMarP2w==
dependencies:
"@typescript-eslint/types" "5.36.1"
"@typescript-eslint/visitor-keys" "5.36.1"
"@typescript-eslint/type-utils@5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.25.0.tgz#5750d26a5db4c4d68d511611e0ada04e56f613bc"
@ -2764,11 +2797,26 @@
debug "^4.3.4"
tsutils "^3.21.0"
"@typescript-eslint/type-utils@5.36.1":
version "5.36.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.36.1.tgz#016fc2bff6679f54c0b2df848a493f0ca3d4f625"
integrity sha512-xfZhfmoQT6m3lmlqDvDzv9TiCYdw22cdj06xY0obSznBsT///GK5IEZQdGliXpAOaRL34o8phEvXzEo/VJx13Q==
dependencies:
"@typescript-eslint/typescript-estree" "5.36.1"
"@typescript-eslint/utils" "5.36.1"
debug "^4.3.4"
tsutils "^3.21.0"
"@typescript-eslint/types@5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.25.0.tgz#dee51b1855788b24a2eceeae54e4adb89b088dd8"
integrity sha512-7fWqfxr0KNHj75PFqlGX24gWjdV/FDBABXL5dyvBOWHpACGyveok8Uj4ipPX/1fGU63fBkzSIycEje4XsOxUFA==
"@typescript-eslint/types@5.36.1":
version "5.36.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.36.1.tgz#1cf0e28aed1cb3ee676917966eb23c2f8334ce2c"
integrity sha512-jd93ShpsIk1KgBTx9E+hCSEuLCUFwi9V/urhjOWnOaksGZFbTOxAT47OH2d4NLJnLhkVD+wDbB48BuaycZPLBg==
"@typescript-eslint/typescript-estree@5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.25.0.tgz#a7ab40d32eb944e3fb5b4e3646e81b1bcdd63e00"
@ -2782,6 +2830,19 @@
semver "^7.3.7"
tsutils "^3.21.0"
"@typescript-eslint/typescript-estree@5.36.1":
version "5.36.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.1.tgz#b857f38d6200f7f3f4c65cd0a5afd5ae723f2adb"
integrity sha512-ih7V52zvHdiX6WcPjsOdmADhYMDN15SylWRZrT2OMy80wzKbc79n8wFW0xpWpU0x3VpBz/oDgTm2xwDAnFTl+g==
dependencies:
"@typescript-eslint/types" "5.36.1"
"@typescript-eslint/visitor-keys" "5.36.1"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
semver "^7.3.7"
tsutils "^3.21.0"
"@typescript-eslint/utils@5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.25.0.tgz#272751fd737733294b4ab95e16c7f2d4a75c2049"
@ -2794,6 +2855,18 @@
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
"@typescript-eslint/utils@5.36.1":
version "5.36.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.36.1.tgz#136d5208cc7a3314b11c646957f8f0b5c01e07ad"
integrity sha512-lNj4FtTiXm5c+u0pUehozaUWhh7UYKnwryku0nxJlYUEWetyG92uw2pr+2Iy4M/u0ONMKzfrx7AsGBTCzORmIg==
dependencies:
"@types/json-schema" "^7.0.9"
"@typescript-eslint/scope-manager" "5.36.1"
"@typescript-eslint/types" "5.36.1"
"@typescript-eslint/typescript-estree" "5.36.1"
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
"@typescript-eslint/visitor-keys@5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.25.0.tgz#33aa5fdcc5cedb9f4c8828c6a019d58548d4474b"
@ -2802,6 +2875,14 @@
"@typescript-eslint/types" "5.25.0"
eslint-visitor-keys "^3.3.0"
"@typescript-eslint/visitor-keys@5.36.1":
version "5.36.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.1.tgz#7731175312d65738e501780f923896d200ad1615"
integrity sha512-ojB9aRyRFzVMN3b5joSYni6FAS10BBSCAfKJhjJAV08t/a95aM6tAhz+O1jF+EtgxktuSO3wJysp2R+Def/IWQ==
dependencies:
"@typescript-eslint/types" "5.36.1"
eslint-visitor-keys "^3.3.0"
"@vue/babel-helper-vue-jsx-merge-props@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz#31624a7a505fb14da1d58023725a4c5f270e6a81"
@ -3083,6 +3164,15 @@
eslint-import-resolver-node "^0.3.4"
eslint-import-resolver-webpack "^0.13.1"
"@vue/eslint-config-typescript@11.0.0":
version "11.0.0"
resolved "https://registry.yarnpkg.com/@vue/eslint-config-typescript/-/eslint-config-typescript-11.0.0.tgz#bac0cb2d381625b5bf568d2025acffc0fd09113e"
integrity sha512-txuRzxnQVmtUvvy9UyWUy9sHWXNeRPGmSPqP53hRtaiUeCTAondI9Ho9GQYI/8/eWljYOST7iA4Aa8sANBkWaA==
dependencies:
"@typescript-eslint/eslint-plugin" "^5.0.0"
"@typescript-eslint/parser" "^5.0.0"
vue-eslint-parser "^9.0.0"
"@vue/vue-loader-v15@npm:vue-loader@^15.9.7", vue-loader@^15.9.6:
version "15.9.8"
resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-15.9.8.tgz#4b0f602afaf66a996be1e534fb9609dc4ab10e61"
@ -9716,6 +9806,19 @@ vue-eslint-parser@^8.0.0:
lodash "^4.17.21"
semver "^7.3.5"
vue-eslint-parser@^9.0.0:
version "9.0.3"
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-9.0.3.tgz#0c17a89e0932cc94fa6a79f0726697e13bfe3c96"
integrity sha512-yL+ZDb+9T0ELG4VIFo/2anAOz8SvBdlqEnQnvJ3M7Scq56DvtjY0VY88bByRZB0D4J0u8olBcfrXTVONXsh4og==
dependencies:
debug "^4.3.4"
eslint-scope "^7.1.1"
eslint-visitor-keys "^3.3.0"
espree "^9.3.1"
esquery "^1.4.0"
lodash "^4.17.21"
semver "^7.3.6"
vue-eslint-parser@^9.0.1:
version "9.0.2"
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-9.0.2.tgz#d2535516f3f55adb387939427fe741065eb7948a"