Skip to content

Commit

Permalink
feat(typescript): Rule no-shadow inherits all options from base config
Browse files Browse the repository at this point in the history
The flag `ignoreOnInitialization` was implemented in 5.18.0
  • Loading branch information
MorevM committed Apr 9, 2022
1 parent e53d510 commit dee52e0
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 27 deletions.
5 changes: 1 addition & 4 deletions configurations/typescript/rules/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,7 @@ module.exports = {

// Disallow variable declarations from shadowing variables declared in the outer scope
// https://typescript-eslint.io/rules/no-shadow
// TODO: `ESLint` introduced new `ignoreOnInitialization` option in v8.10.0 that isn't implemented yet here.
// When it comes, replace with `extendFromBase` call.
// ...extendFromBase('no-shadow'),
'@typescript-eslint/no-shadow': 'error',
...extendFromBase('no-shadow'),

// Disallow aliasing `this`
// https://typescript-eslint.io/rules/no-this-alias
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
"@babel/plugin-syntax-jsx": "^7.16.7",
"@html-eslint/eslint-plugin": "^0.13.1",
"@html-eslint/parser": "^0.13.1",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"eslint-plugin-chai-friendly": "^0.7.2",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-eslint-comments": "^3.2.0",
Expand Down
88 changes: 67 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1076,29 +1076,29 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/eslint-plugin@^5.17.0":
version "5.17.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz#704eb4e75039000531255672bf1c85ee85cf1d67"
integrity sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ==
dependencies:
"@typescript-eslint/scope-manager" "5.17.0"
"@typescript-eslint/type-utils" "5.17.0"
"@typescript-eslint/utils" "5.17.0"
"@typescript-eslint/eslint-plugin@^5.18.0":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz#950df411cec65f90d75d6320a03b2c98f6c3af7d"
integrity sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A==
dependencies:
"@typescript-eslint/scope-manager" "5.18.0"
"@typescript-eslint/type-utils" "5.18.0"
"@typescript-eslint/utils" "5.18.0"
debug "^4.3.2"
functional-red-black-tree "^1.0.1"
ignore "^5.1.8"
regexpp "^3.2.0"
semver "^7.3.5"
tsutils "^3.21.0"

"@typescript-eslint/parser@^5.17.0":
version "5.17.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.17.0.tgz#7def77d5bcd8458d12d52909118cf3f0a45f89d5"
integrity sha512-aRzW9Jg5Rlj2t2/crzhA2f23SIYFlF9mchGudyP0uiD6SenIxzKoLjwzHbafgHn39dNV/TV7xwQkLfFTZlJ4ig==
"@typescript-eslint/parser@^5.18.0":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.18.0.tgz#2bcd4ff21df33621df33e942ccb21cb897f004c6"
integrity sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ==
dependencies:
"@typescript-eslint/scope-manager" "5.17.0"
"@typescript-eslint/types" "5.17.0"
"@typescript-eslint/typescript-estree" "5.17.0"
"@typescript-eslint/scope-manager" "5.18.0"
"@typescript-eslint/types" "5.18.0"
"@typescript-eslint/typescript-estree" "5.18.0"
debug "^4.3.2"

"@typescript-eslint/[email protected]":
Expand All @@ -1109,12 +1109,20 @@
"@typescript-eslint/types" "5.17.0"
"@typescript-eslint/visitor-keys" "5.17.0"

"@typescript-eslint/[email protected]":
version "5.17.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz#1c4549d68c89877662224aabb29fbbebf5fc9672"
integrity sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg==
"@typescript-eslint/[email protected]":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz#a7d7b49b973ba8cebf2a3710eefd457ef2fb5505"
integrity sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ==
dependencies:
"@typescript-eslint/types" "5.18.0"
"@typescript-eslint/visitor-keys" "5.18.0"

"@typescript-eslint/[email protected]":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz#62dbfc8478abf36ba94a90ddf10be3cc8e471c74"
integrity sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA==
dependencies:
"@typescript-eslint/utils" "5.17.0"
"@typescript-eslint/utils" "5.18.0"
debug "^4.3.2"
tsutils "^3.21.0"

Expand All @@ -1123,6 +1131,11 @@
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.17.0.tgz#861ec9e669ffa2aa9b873dd4d28d9b1ce26d216f"
integrity sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==

"@typescript-eslint/[email protected]":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.18.0.tgz#4f0425d85fdb863071680983853c59a62ce9566e"
integrity sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw==

"@typescript-eslint/[email protected]":
version "5.17.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz#a7cba7dfc8f9cc2ac78c18584e684507df4f2488"
Expand All @@ -1136,7 +1149,32 @@
semver "^7.3.5"
tsutils "^3.21.0"

"@typescript-eslint/[email protected]", "@typescript-eslint/utils@^5.10.0":
"@typescript-eslint/[email protected]":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz#6498e5ee69a32e82b6e18689e2f72e4060986474"
integrity sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ==
dependencies:
"@typescript-eslint/types" "5.18.0"
"@typescript-eslint/visitor-keys" "5.18.0"
debug "^4.3.2"
globby "^11.0.4"
is-glob "^4.0.3"
semver "^7.3.5"
tsutils "^3.21.0"

"@typescript-eslint/[email protected]":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.18.0.tgz#27fc84cf95c1a96def0aae31684cb43a37e76855"
integrity sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA==
dependencies:
"@types/json-schema" "^7.0.9"
"@typescript-eslint/scope-manager" "5.18.0"
"@typescript-eslint/types" "5.18.0"
"@typescript-eslint/typescript-estree" "5.18.0"
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"

"@typescript-eslint/utils@^5.10.0":
version "5.17.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.17.0.tgz#549a9e1d491c6ccd3624bc3c1b098f5cfb45f306"
integrity sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA==
Expand All @@ -1156,6 +1194,14 @@
"@typescript-eslint/types" "5.17.0"
eslint-visitor-keys "^3.0.0"

"@typescript-eslint/[email protected]":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz#c7c07709823804171d569017f3b031ced7253e60"
integrity sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg==
dependencies:
"@typescript-eslint/types" "5.18.0"
eslint-visitor-keys "^3.0.0"

JSONStream@^1.0.4:
version "1.3.5"
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"
Expand Down

0 comments on commit dee52e0

Please sign in to comment.