.eslintrc doesn't override defaults
See original GitHub issueFirst 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 when lint
script is run.
At the moment it is possible to redefine default linting config only by specifying necessary settings in eslint
key inside package.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
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
eslintrc doesn't override defaults · Issue #498 · jaredpalmer/tsdx
Currently, settings from the package.json.eslint property will override any configurations during linting, but not the rules from .eslintrc ...
Read more >How can I override default .eslint rules at runtime in a create ...
1 Answer 1 · Create a .env file in your root, if you don't have one. · Add the following to it as...
Read more >Configuration Files - ESLint - Pluggable JavaScript Linter
Nested overrides settings are applied only if the glob patterns of both the parent config and the child config are matched. This is...
Read more >Command Line Interface - ESLint - Pluggable JavaScript Linter
Argument Type: No argument. You can use these options to override the default behavior, which is to enable colorized output unless no TTY...
Read more >Configuration Files (New) - ESLint - Pluggable JavaScript Linter
If you pass a non-JavaScript file, like example.txt , the semi rule is not ... You can optionally override the default parser by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, I missed #498 (I searched only for open issues). I’ve added the following snippet in
.eslintrc.js
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
'prettier/prettier': 'off'
to rules) should be added intoREADME.md
to avoid confusion.Seems like there might be a way to hack it together with
CLIEngine#getConfigForFile
, but there isn’t really an exact API to check for existence of config, so I might have to file an issue with ESLint