-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Very slow performance #445
Comments
Do you have any stats about how long prettier takes to run over all the files that you lint without going through the eslint bridge. It is not currently clear if this speed is due to this plugin doing something wrong or because prettier just takes that long. There's a very real chance that's just how long prettier takes to run over your files, which this bridge can do nothing about. |
yeah, prettier itself takes 15s on the same set of files. I recently discovered https://github.com/XAMPPRocky/tokei So... I fear that the answer may be for prettier and eslint to start migrating to rust (or some other system language) |
If you’re looking for a code formatter written in Rust that supports JS/TS, check out https://github.com/dprint/dprint |
ref: #304 (comment) This said when using eslint to format codes with prettier, it's slow. I come up with an idea: {
'**/*.{ts,tsx}': [
(filenames) => {
const files = [...filenames, ...declarationFiles];
return `tsc ${files.join(' ')} --noEmit --skipLibCheck`;
}, // typescript type checking
"prettier --write", // use prettier to format your code
`eslint --cache --fix --rule 'prettier/prettier: off'`, // turn off the prettier/prettier rule, make it faster
],
} Not sure if this is the best one, but I think should make it faster. 🥸 |
Can you help to try latest v4.1.0? |
This could be related to that we are running |
Do you think we can benefit from the new prettier's cache? I didn't find any cache content in |
close in favor of #485 |
This issue is the successor to: #304
which was closed after #368.
But I don't think that's enough.
What version of
eslint
are you using?What version of
prettier
are you using?What version of
eslint-plugin-prettier
are you using?Please paste any applicable config files that you're using (e.g.
.prettierrc
or.eslintrc
files)n/a
( there also isn't a reasonable way to paste this here, cause I given up on simple lint configs, and gone with an overrides only approach: https://github.com/NullVoxPopuli/eslint-configs )
I don't have or use a .prettierrc, but have defined the following (in a local project) with the following config:
What source code are you linting?
Combination of JS, TS, and JSON, but only JS and TS have eslint-plugin-prettier enabled.
What did you expect to happen?
Not have > 20% of time spent on one plugin
What actually happened?
The text was updated successfully, but these errors were encountered: