-
Notifications
You must be signed in to change notification settings - Fork 507
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
.eslintrc doesn't override defaults #514
Comments
Duplicate of #498 . Per my comments there, I use an |
Sorry, I missed #498 (I searched only for open issues). rules: {
'prettier/prettier': 'off'
} as mentioned in the comment for 498 and fixed the problem. By the way, I suppose the info from this comment (about You can change everything, but one difference with using an eslintrc file is that the internal rules will be added to any custom ones, unless you've specifically set them to off in your rules.) and this comment (adding |
Yea as this has popped up at least twice now, docs around this behavior would be helpful. The behavior does feel unintuitive (I was confused by this initially too), but I'm not sure it can be changed without being breaking. |
Ahhh so I just realized why this didn't pop up with I guess the ESLint API does a deeper merge? This mismatched behavior is definitely something that should be fixed so that they work the same way... Unfortunately that has potential for breakage regardless of which one is changed, welp 😕 I'd lean toward matching the ESLint API, though I have a feeling it might automatically check |
Imho |
Yea I think that's the less confusing option, particularly because of the editor integration and how nuanced linting tends to be (including me, you're at least the third to be confused by this). As I alluded to here and explicitly mentioned in #498 , the difficulty with this will be determining when there is and isn't a custom config present. As there are like 4+ different extensions and |
Seems like there might be a way to hack it together with |
First of all, thank you for the great tool!
Current Behavior
tsdx ignores
.eslintrc.js
or.eslintrc.json
in project's root directory and uses default config whenlint
script is run.At the moment it is possible to redefine default linting config only by specifying necessary settings in
eslint
key insidepackage.json
. It is quite inconvenient.Desired Behavior
Use
.eslintrc.js
or.eslintrc.json
when it is present in project's root directory to redefine/replace default config.Suggested Solution
Check presence of
.eslintrc.js
or.eslintrc.json
in project's root directory and use its contents instead of default config returned by createEslintConfig.Who does this impact? Who is this for?
All users wanting to customize linting settings.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: