Browse Source

[feat] added ts parser for eslint and enabled desired rules

pull/4309/head
Singwai Chan 4 years ago
parent
commit
e1e4348ae9
  1. 10
      .eslintrc
  2. 1
      .yarnrc
  3. 1
      package.json
  4. 73
      yarn.lock

10
.eslintrc

@ -9,9 +9,13 @@
}, },
"rules": { "rules": {
"strict": 0, "strict": 0,
"quotes": [0, "single"], "quotes": ["error", "single"],
"eol-last": [0], "eol-last": ["error", "always"],
"no-mixed-requires": [0], "no-mixed-requires": [0],
"no-underscore-dangle": [0] "no-underscore-dangle": [0]
} },
"overrides": [{
"files": ["*.ts"],
"parser": "@typescript-eslint/parser"
}]
} }

1
.yarnrc

@ -0,0 +1 @@
registry "https://registry.npmjs.org"

1
package.json

@ -27,6 +27,7 @@
"@babel/cli": "^7.15.7", "@babel/cli": "^7.15.7",
"@babel/preset-typescript": "^7.16.7", "@babel/preset-typescript": "^7.16.7",
"@types/backbone": "^1.4.15", "@types/backbone": "^1.4.15",
"@typescript-eslint/parser": "^5.22.0",
"@vuepress/plugin-google-analytics": "^1.8.2", "@vuepress/plugin-google-analytics": "^1.8.2",
"documentation": "^13.2.5", "documentation": "^13.2.5",
"eslint": "^8.12.0", "eslint": "^8.12.0",

73
yarn.lock

@ -1386,6 +1386,50 @@
dependencies: dependencies:
"@types/yargs-parser" "*" "@types/yargs-parser" "*"
"@typescript-eslint/parser@^5.22.0":
version "5.22.0"
resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.22.0.tgz#7bedf8784ef0d5d60567c5ba4ce162460e70c178"
integrity sha512-piwC4krUpRDqPaPbFaycN70KCP87+PC5WZmrWs+DlVOxxmF+zI6b6hETv7Quy4s9wbkV16ikMeZgXsvzwI3icQ==
dependencies:
"@typescript-eslint/scope-manager" "5.22.0"
"@typescript-eslint/types" "5.22.0"
"@typescript-eslint/typescript-estree" "5.22.0"
debug "^4.3.2"
"@typescript-eslint/scope-manager@5.22.0":
version "5.22.0"
resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.22.0.tgz#590865f244ebe6e46dc3e9cab7976fc2afa8af24"
integrity sha512-yA9G5NJgV5esANJCO0oF15MkBO20mIskbZ8ijfmlKIvQKg0ynVKfHZ15/nhAJN5m8Jn3X5qkwriQCiUntC9AbA==
dependencies:
"@typescript-eslint/types" "5.22.0"
"@typescript-eslint/visitor-keys" "5.22.0"
"@typescript-eslint/types@5.22.0":
version "5.22.0"
resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.22.0.tgz#50a4266e457a5d4c4b87ac31903b28b06b2c3ed0"
integrity sha512-T7owcXW4l0v7NTijmjGWwWf/1JqdlWiBzPqzAWhobxft0SiEvMJB56QXmeCQjrPuM8zEfGUKyPQr/L8+cFUBLw==
"@typescript-eslint/typescript-estree@5.22.0":
version "5.22.0"
resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.22.0.tgz#e2116fd644c3e2fda7f4395158cddd38c0c6df97"
integrity sha512-EyBEQxvNjg80yinGE2xdhpDYm41so/1kOItl0qrjIiJ1kX/L/L8WWGmJg8ni6eG3DwqmOzDqOhe6763bF92nOw==
dependencies:
"@typescript-eslint/types" "5.22.0"
"@typescript-eslint/visitor-keys" "5.22.0"
debug "^4.3.2"
globby "^11.0.4"
is-glob "^4.0.3"
semver "^7.3.5"
tsutils "^3.21.0"
"@typescript-eslint/visitor-keys@5.22.0":
version "5.22.0"
resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.22.0.tgz#f49c0ce406944ffa331a1cfabeed451ea4d0909c"
integrity sha512-DbgTqn2Dv5RFWluG88tn0pP6Ex0ROF+dpDO1TNNZdRtLjUr6bdznjA6f/qNqJLjd2PgguAES2Zgxh/JzwzETDg==
dependencies:
"@typescript-eslint/types" "5.22.0"
eslint-visitor-keys "^3.0.0"
"@vue/babel-helper-vue-jsx-merge-props@^1.2.1": "@vue/babel-helper-vue-jsx-merge-props@^1.2.1":
version "1.2.1" version "1.2.1"
resolved "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz" resolved "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz"
@ -4501,9 +4545,10 @@ eslint-visitor-keys@^2.0.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz"
eslint-visitor-keys@^3.3.0: eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0:
version "3.3.0" version "3.3.0"
resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
eslint@^8.12.0: eslint@^8.12.0:
version "8.12.0" version "8.12.0"
@ -5284,9 +5329,10 @@ globals@^13.6.0, globals@^13.9.0:
dependencies: dependencies:
type-fest "^0.20.2" type-fest "^0.20.2"
globby@^11.0.1: globby@^11.0.1, globby@^11.0.4:
version "11.1.0" version "11.1.0"
resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
dependencies: dependencies:
array-union "^2.1.0" array-union "^2.1.0"
dir-glob "^3.0.1" dir-glob "^3.0.1"
@ -9955,6 +10001,13 @@ semver@^7.1.1, semver@^7.3.4:
dependencies: dependencies:
lru-cache "^6.0.0" lru-cache "^6.0.0"
semver@^7.3.5:
version "7.3.7"
resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"
integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
dependencies:
lru-cache "^6.0.0"
send@0.17.1: send@0.17.1:
version "0.17.1" version "0.17.1"
resolved "https://registry.npmjs.org/send/-/send-0.17.1.tgz" resolved "https://registry.npmjs.org/send/-/send-0.17.1.tgz"
@ -10971,14 +11024,22 @@ ts-loader@^9.2.6:
micromatch "^4.0.0" micromatch "^4.0.0"
semver "^7.3.4" semver "^7.3.4"
tslib@^1.9.0: tslib@^1.8.1, tslib@^1.9.0:
version "1.14.1" version "1.14.1"
resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.0.3, tslib@^2.1.0: tslib@^2.0.3, tslib@^2.1.0:
version "2.3.1" version "2.3.1"
resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz" resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz"
tsutils@^3.21.0:
version "3.21.0"
resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
dependencies:
tslib "^1.8.1"
tty-browserify@0.0.0: tty-browserify@0.0.0:
version "0.0.0" version "0.0.0"
resolved "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz" resolved "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz"

Loading…
Cancel
Save