Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [prettier-eslint]

The tag has no usage guidance.

prettier-eslint
0 votes
1 answer
714 views

Eslint rule is running multiple times

I'm trying to write an eslint rule that enforces making sure the name property is defined on any classes that extend from other Error/Exception named classes (and fixes them). As far as I can tell, it ...
robert.bo.roth's user avatar
3 votes
0 answers
2k views

Error: Failed to load plugin 'prettier' declared in '.eslintrc': Cannot find module 'eslint-plugin-prettier'

Im currently setting up a new project and am getting that weird prettier error each time im trying to render... .eslintrc file: "parserOptions": { "sourceType": "module&...
user avatar
2 votes
2 answers
3k views

How to get rid of eslint prettier errors

How do I get rid of this replace error that underline red all over my code? Also everytime I "fix" all the errors, whenever I save, it show me the same error again.
Cristian Casallas's user avatar
1 vote
0 answers
146 views

How to setup flatTernaryExpressions in prettier VSCode?

I have configured prettier for formatting documents in VSCode. When I format document, it formats like below function fun1(value: string): string { return <condition_1> ? "...
hi-ren's user avatar
  • 66
8 votes
0 answers
1k views

Is there a way of running Prettier faster?

I'm using the latest versions of these packages: ESLint: 8.11.0 Prettier: 2.6.0 eslint-plugin-prettier: 4.0.0 eslint-config-prettier: 8.5.0 Rule Time (ms) Relative prettier/prettier 156074.280 98.4%...
Oswaldo's user avatar
  • 3,376
0 votes
2 answers
4k views

Set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint

I am trying to build the react.js project with npm run build, I am getting following error, I have tried many solution but nothing is working for me. **Failed to compile.** Rules with suggestions ...
Sagar's user avatar
  • 5,501
4 votes
0 answers
3k views

prettier and eslint max-len code fix not working properly

I have just configured eslint and prettier in my project and set up a rule for max len. But it is not working as expected. I wanted to break the line when the it exceeds 120 characters. It does break ...
Satyam Saurabh's user avatar
3 votes
2 answers
3k views

VS Code with Prettier/ESLint uses wrong indentation

Prettier in VS Code uses the wrong indentation, even after I changed all the places I can think of to a width of "4". Here are my file contents (some are maybe not necessary, but I added ...
Jan-Patrick Ahnen's user avatar
4 votes
0 answers
558 views

How to split long attributes on multiple lines using prettier?

I used vue, eslint and prettier, and for longer html class="..." attributes prettier was splitting it into several lines: Now prettier just puts it in a single line and does not split long ...
რომეო ხაზალია's user avatar
15 votes
2 answers
5k views

How to print ESLint progress as it runs, but not everything at once when all files are processed?

When running ESLint, nothing is print out until the whole process is done. How can I see the progress as it processed different files, instead of waiting until everything is done?
Cupid Chan's user avatar
7 votes
0 answers
514 views

How to disable line break after operator equal in Prettier v2

I just upgrade my app from prettier 1.19.1 to 2.5.1 with eslint-plugin-prettier. But I am facing massive changes inlinter. And I would like to have previous behavior on this rule: // prettier v1 const ...
Aure77's user avatar
  • 3,152
15 votes
2 answers
27k views

How to configure prettier to check all files with a specific extension

I have installed prettier via yarn add prettier I would like prettier to only format typescript code (I am developing AWS CDK project, there is no src folder by convention & there could be ...
user842225's user avatar
  • 5,901
0 votes
1 answer
1k views

Auto Formatting adding text on VS Code

Working on a shared project and my coworker created a new branch with an updated npm package (@mui/material from @material-ui/core). When I pull his branch and run npm install everything installs and ...
adam.tarr57's user avatar
6 votes
0 answers
2k views

Linting error `import` can only be used in `import()` or `import.meta`. (1:1)

This project was written by someone else, and I need to work on it from hereon. I thought that the first step should be to fix the formatting. Normally, I just use .prettierrc in my vscode, and a run ...
foreverAnIntern's user avatar
0 votes
1 answer
923 views

How can we set our vs code prettier on save format to the rules mentioned in .prettierrc

1st image : before save 2nd image : after saving formats to some default config by vs code I am getting lint errors after saving the file(right side). Even after fixing it and then saving again goes ...
Hussam Khatib's user avatar

15 30 50 per page
1
3 4
5
6 7
10