-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
[feat] fallback ignorePath
to .eslintignore
if .prettierignore
not found
#630
Comments
I'm strongly opposed to adding new features that allow users to do customizations that diverge from the standard "configure prettier using the .prettierrc / .prettierignore file" behaviour. I would strongly advise against implementing this. The aim is that you should get identical output if you format a file through prettier's CLI or through eslint with This proposal introduces plugin-specific behaviour and the critical tenant of "eslint CLI and prettier CLI must produce the same output" breaks. In cases where a .eslintignore file is present then for files mentioned in that file the |
@BPScott prettier will respect
See also: https://prettier.io/docs/en/install and
That's a good point. ESLint runs different from prettier itself on virtual files. For instance, I have a plugin extracting JavaScript codes from So my proposed change would be changing the following eslint-plugin-prettier/worker.js Line 50 in f985718
- ignorePath: '.prettierignore',
+ ignorePath: ['.gitignore', '.prettierignore', '.eslintignore'], |
Friendly ping @BPScott |
What version of
eslint
are you using?8.56.0
What version of
prettier
are you using?3.1.1
What version of
eslint-plugin-prettier
are you using?5.1.2
Please paste any applicable config files that you're using (e.g.
.prettierrc
or.eslintrc
files).prettierrc
What source code are you linting?
N/A
What did you expect to happen?
When
.prettierignore
not found,.eslintignore
should be used asignorePath
What actually happened?
When
.prettierignore
not found,.gitignore
will be used asignorePath
byprettier
itselfThe text was updated successfully, but these errors were encountered: