You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ember config loads which extends the base config:
1a. base config turns various linting on including the array-callback-return rule
1b. ember config configures various linting including turning off the array-callback-return rule off for a certain file
typescript config loads which extends the base config:
2a. base config loads again which turns the array-callback-return rule BACK ON everywhere (this breaks the intended behavior of the ember config)
2b. typescript config configures various linting
Possible fixes:
Stop extending base config automatically with all our configs. That would then require consumers to specify the base config first before other configs would they might forget to do.
Somehow prevent the base config from being loaded multiple times (if it could detect that it has already been loaded by a previous config).
?
The text was updated successfully, but these errors were encountered:
One possible alternative would be to always respect the config you are extending ("append only"). This is difficult if you aren't super familiar with the config being extended and may be more of a design aspiration.
Another idea is to keep them scoped to their specialty like Ember, React, or TypeScript. That may help find the right home for a rule.
Let's say a consumer extends two of our configs like this:
Here's an example of a problem that can happen:
ember
config loads which extends thebase
config:1a.
base
config turns various linting on including thearray-callback-return
rule1b.
ember
config configures various linting including turning off thearray-callback-return
rule off for a certain filetypescript
config loads which extends thebase
config:2a.
base
config loads again which turns thearray-callback-return
rule BACK ON everywhere (this breaks the intended behavior of theember
config)2b.
typescript
config configures various lintingPossible fixes:
base
config automatically with all our configs. That would then require consumers to specify thebase
config first before other configs would they might forget to do.base
config from being loaded multiple times (if it could detect that it has already been loaded by a previous config).The text was updated successfully, but these errors were encountered: