Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
lint:fix

eh
  • Loading branch information
NullVoxPopuli committed Dec 31, 2023
1 parent f8ba73c commit 2557701
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/rules/no-deprecated-router-transition-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ module.exports = {

const currentClass = classStack.peek();

if (!currentClass) {
return;
}

if (types.isThisExpression(node.object) && types.isIdentifier(node.property)) {
// Routes should not call transitionTo or replaceWith
const propertyName = node.property.name;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
},
"dependencies": {
"@ember-data/rfc395-data": "^0.0.4",
"@glimmer/syntax": "^0.86.0",
"css-tree": "^2.3.1",
"ember-eslint-parser": "^0.2.3",
"ember-rfc176-data": "^0.3.18",
Expand Down Expand Up @@ -162,4 +163,4 @@
"tokenRef": "GITHUB_AUTH"
}
}
}
}
2 changes: 1 addition & 1 deletion tests/lib/rules/no-deprecated-router-transition-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ ruleTester.run('no-deprecated-router-transition-methods', rule, {
});
`,
}
},
],
invalid: [
// Route Uses RouterService.transitionTo with different service injection types
Expand Down
34 changes: 34 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,13 @@
dependencies:
"@simple-dom/interface" "^1.4.0"

"@glimmer/interfaces@^0.86.0":
version "0.86.0"
resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.86.0.tgz#3081ba6e4bae6f402aae0c27acb4743dec75ffb6"
integrity sha512-qKPb8ivmzQtgvBbFJn/rS3E/1wtiSJ9EG4WA+j3uxUSZqbR4oKTNR2IhwPnopLON1jASBHh+aonczvcvpGNLwA==
dependencies:
"@simple-dom/interface" "^1.4.0"

"@glimmer/syntax@^0.85.13":
version "0.85.13"
resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.85.13.tgz#841e6da0a555252f087145f83f92cf0d9cf76cb5"
Expand All @@ -455,6 +462,17 @@
"@handlebars/parser" "~2.0.0"
simple-html-tokenizer "^0.5.11"

"@glimmer/syntax@^0.86.0":
version "0.86.0"
resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.86.0.tgz#c3affed94c8e6c8d5a7b81228d62fbe261869c1a"
integrity sha512-ZjT59PEb69QMqE+EJSdeYoHCT5d1LElJjYOtu0q/+6h9zsaEZIUYsHdFJWNvTs3cLMcGIg2ae4KWfGwZtexn/g==
dependencies:
"@glimmer/interfaces" "^0.86.0"
"@glimmer/util" "^0.86.0"
"@glimmer/wire-format" "^0.86.0"
"@handlebars/parser" "~2.0.0"
simple-html-tokenizer "^0.5.11"

"@glimmer/util@^0.85.13":
version "0.85.13"
resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.85.13.tgz#a17824e5fd91e4e3f3847f38f600ecd3c1508dad"
Expand All @@ -463,6 +481,14 @@
"@glimmer/env" "0.1.7"
"@glimmer/interfaces" "^0.85.13"

"@glimmer/util@^0.86.0":
version "0.86.0"
resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.86.0.tgz#4adcdedac10941d7321511c414d85e6bcab22305"
integrity sha512-KXwGBaMvHhapWaITGMCMKuNaaNAH4DjezY1oAwfF/eRBO43sp1g93kO88e+aJ90waftN7IKAMymGrPrHg22ibw==
dependencies:
"@glimmer/env" "0.1.7"
"@glimmer/interfaces" "^0.86.0"

"@glimmer/wire-format@^0.85.13":
version "0.85.13"
resolved "https://registry.yarnpkg.com/@glimmer/wire-format/-/wire-format-0.85.13.tgz#a8df8c44646b8f0d09dda187ac64f45c33904b63"
Expand All @@ -471,6 +497,14 @@
"@glimmer/interfaces" "^0.85.13"
"@glimmer/util" "^0.85.13"

"@glimmer/wire-format@^0.86.0":
version "0.86.0"
resolved "https://registry.yarnpkg.com/@glimmer/wire-format/-/wire-format-0.86.0.tgz#f6023baba66f8f1772cbcb1c750a56ce1fc65f6e"
integrity sha512-nI37pUNlLrEPDtCR8fxc6aEZ1NqVG5A5FWmd04Qg5gSb41dziq97lYyXbkWsOojWmL6ciYFfacpz5FlPNxgnJw==
dependencies:
"@glimmer/interfaces" "^0.86.0"
"@glimmer/util" "^0.86.0"

"@handlebars/parser@~2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@handlebars/parser/-/parser-2.0.0.tgz#5e8b7298f31ff8f7b260e6b7363c7e9ceed7d9c5"
Expand Down

0 comments on commit 2557701

Please sign in to comment.