ember-cli / eslint-plugin-ember

An ESLint plugin that provides set of rules for Ember applications based on commonly known good practices.
MIT License
262 stars 204 forks source link

ember/no-test-module-for catches too many things #949

Open mehulkar opened 4 years ago

mehulkar commented 4 years ago

our test suite has a bunch of functions that wraps module(). The ember/no-test-module-for rule flags all of these as problematic. (The rule is just looking for functions starting with moduleFor). Not clear if this is intentional or not, but maybe the rule should also check where the function was imported from ember-qunit before flagging?

https://github.com/ember-cli/eslint-plugin-ember/blob/d2716993c87b2c38f4869572c43e78bbdf819921/lib/rules/no-test-module-for.js#L84

An alternative for us is to just go and rename these functions so they don't start with moduleFor (or take a much harder look at why they exist in the first place... which makes upgrading less fun).

Thoughts?

bmish commented 4 years ago

There are some discussions in the original PR for this rule about why we don't have an import check: https://github.com/ember-cli/eslint-plugin-ember/pull/562 CC: @NullVoxPopuli