Skip to content
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

Open
amk221 opened this issue Jan 29, 2024 · 4 comments
Open

ember/template-no-let-reference #2078

amk221 opened this issue Jan 29, 2024 · 4 comments

Comments

@amk221
Copy link
Contributor

amk221 commented Jan 29, 2024

Is it ok to disable this rule in tests? This is a contrived test case

let someThing;

hooks.beforeEach(function (assert) {
  someThing = null;
});

test('foo', async function (assert) {
  someThing = 'foo'

  await render(<template>
    <MyComponent @arg={{someThing}} />
  </template>);
});

test('bar', async function (assert) {
  someThing = 'bar'

  await render(<template>
    <MyComponent @arg={{someThing}} />
  </template>);
});
@NullVoxPopuli
Copy link
Contributor

Is it ok to disable this rule in tests?

yea, I'd say so.

@amk221 amk221 closed this as completed Jan 29, 2024
@NullVoxPopuli
Copy link
Contributor

@bmish should we have a config for tests?

@NullVoxPopuli
Copy link
Contributor

Re-opening, as this could affect many

@NullVoxPopuli NullVoxPopuli reopened this Jan 30, 2024
@bmish
Copy link
Member

bmish commented Jan 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants