Skip to content

Commit

Permalink
Fixed ember-cli#2078: Allow let to be used in the test flies.
Browse files Browse the repository at this point in the history
This allows referencing let variables in the files in the tests
directory without causing linting errors.
  • Loading branch information
bitxplora committed Oct 12, 2024
1 parent 8e5aaca commit 6bdd728
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/rules/template-no-let-reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ module.exports = {

create: (context) => {
const sourceCode = context.sourceCode;
const pathname = context.physicalFilename;

function checkIfWritableReferences(node, scope) {
// Return if the pathname starts with '/start/'
if (pathname.startsWith('/tests/')) {
return;
}
const ref = scope.references.find((v) => v.identifier === node);
if (!ref) {
return;
Expand Down

0 comments on commit 6bdd728

Please sign in to comment.