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
It is not possible to disable eslint for files inside the .gitignore. When having generated files you will have to append an eslint-disabled header.
Describe the solution you'd like
Add a new option that can be set via an environment variable that behaves the same as eslint --ignore-path .gitignore "path/to/file".
This could be ESLINT_IGNORE_PATH=.gitignore or GITIGNORE_SKIP_ESLINT=true.
Describe alternatives you've considered
You could manually add the eslint-disabled header. However, this might be cumbersome as some tools (such as the typescript compiler) do not allow automatic adding headers. You will have to write some glue code around those libraries.
Also adding the file to the .gitignore and the .eslintignore is possible, however, I would prefer to only maintain one list.
Additional context
I am partially migrating a javascript code-base to typescript. I added an src_ts folder that is compiled into src. This is the only way that does not require ejecting. I run a typescript watcher (yarn tsc --build src_ts/tsconfig.json --watch) that will compile those files into src. On CI the build fails because react-scripts complains about eslint warnings that occur in the compiled files.
The text was updated successfully, but these errors were encountered:
Is your proposal related to a problem?
It is not possible to disable eslint for files inside the
.gitignore
. When having generated files you will have to append an eslint-disabled header.Describe the solution you'd like
Add a new option that can be set via an environment variable that behaves the same as
eslint --ignore-path .gitignore "path/to/file"
.This could be
ESLINT_IGNORE_PATH=.gitignore
orGITIGNORE_SKIP_ESLINT=true
.Describe alternatives you've considered
You could manually add the
eslint-disabled
header. However, this might be cumbersome as some tools (such as the typescript compiler) do not allow automatic adding headers. You will have to write some glue code around those libraries.Also adding the file to the
.gitignore
and the.eslintignore
is possible, however, I would prefer to only maintain one list.Additional context
I am partially migrating a javascript code-base to typescript. I added an
src_ts
folder that is compiled intosrc
. This is the only way that does not require ejecting. I run a typescript watcher (yarn tsc --build src_ts/tsconfig.json --watch
) that will compile those files intosrc
. On CI the build fails because react-scripts complains about eslint warnings that occur in the compiled files.The text was updated successfully, but these errors were encountered: