-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ember/template-no-let-reference #2078
Comments
yea, I'd say so. |
@bmish should we have a config for tests? |
Re-opening, as this could affect many |
I'm opposed to adding additional configs. I'd like everything to work properly with simply the recommended config. We have other rules that bail-out in test files. |
The rule can be turned off in the Note: |
Here is what the blueprints should probably use: #2171 (the flat config w/ eslint 9)
yeah, we can early-return in the rule after checking the file path, then no one needs to change their eslint config |
If this is the rule, https://github.com/ember-cli/eslint-plugin-ember/blob/master/lib/rules/template-no-let-reference.js We can get ...
function checkIfWritableReferences(node, scope) {
// Return early if the filepath starts with '/tests/' using 'context.physicalFilename`
if (filepath.startsWith('/tests/')) {
return;
}
...
} I want to get feedback on whether the approach is appropriate. |
Ye looks like a good plan |
This allows referencing let variables in the files in the tests directory without causing linting errors.
Does this have to be linted against because it creates a memory leak? |
Is it ok to disable this rule in tests? This is a contrived test case
The text was updated successfully, but these errors were encountered: