Questions tagged [prettier-eslint]
140 questions
168
votes
1 answer
ESLint couldn't find the config "prettier" to extend from
I am trying to format my code using eslint but when I run npm run lint -f I get this output:
Oops! Something went wrong! :(
ESLint: 6.8.0.
ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is…

Reynier Rivero
- 2,042
- 2
- 8
- 12
56
votes
3 answers
ESLint: Parsing error: This experimental syntax requires enabling one of the following parser plugin(s): 'jsx, flow, typescript' (2:9)
I am trying to use ESLint in WebStrom, but it doesn't work and displays an error:
ESLint: Parsing error: This experimental syntax requires enabling one of the following parser plugin(s): 'jsx, flow, typescript' (2:9).
Here is my .eslintrc and…

skull Kim
- 597
- 1
- 4
- 5
31
votes
1 answer
Code style issues found in the above file(s). Forgot to run Prettier?
I have this problem when I try to check style with prettier --check
Code style issues found in the above file(s). Forgot to run Prettier?
user17292721
19
votes
8 answers
Cannot find module '@typescript-eslint/parser' when using Prettier Eslint
I'm getting the following error from Prettier Eslint Output on VSCode when saving the file.
Error: Cannot find module '@typescript-eslint/parser'
Require stack:
-…

Vítor Norton
- 408
- 1
- 6
- 12
19
votes
3 answers
Parsing error: Unexpected token prettier/prettier caused by ""
I have this vue app which I create using vue cli and the version I use is vue2 (with eslint and prettier).
I could run npm run serve and load my page. But in Visual Studio Code, I notice this error:
{
"resource":…

Steve
- 2,963
- 15
- 61
- 133
14
votes
1 answer
Where can I find .eslintrc in CRA?
When using npx create-react-app appname, the react-scripts package which is installed includes an eslint dependency with "a minimal set of rules that find common mistakes." I want to use prettier and eslint but I can't find information on which, if…

dotDone
- 143
- 1
- 8
13
votes
2 answers
Prettier: Run for only the changed lines of the file
I have a legacy codebase without eslint/prettier. I want to introduce formatting on pre-commit hooks. Lint staged will let you run prettier for only changed files. Is it possible to only run the prettier just for changed lines? Like IntelliJ's…

sreejith
- 213
- 2
- 8
12
votes
5 answers
ESLint rule conflicts with Prettier rule
I am totally new to VSCode and this is my first setting. I know that this is a very common problem but I couldn't find a suitable solution for it.
This is my understanding so far. Please correct me if I am wrong.
I want to use ESLint for finding…

Reza
- 3,473
- 4
- 35
- 54
9
votes
2 answers
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 typescript files here and there). In other words, I would…

user842225
- 5,445
- 15
- 69
- 119
9
votes
4 answers
Delete `(` eslint (prettier/prettier)
I have a conflict of rules. When I include parentheses around multiline JSX, the prettier reports a error Delete `(` eslint (prettier/prettier).
But if I remove the parentheses I have another eslint error Missing parentheses around multilines JSX…

Eduardo Dallmann
- 423
- 5
- 14
7
votes
2 answers
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
- 496
- 4
- 15
7
votes
1 answer
ESLint `no-confusing-arrow` "--fix" formatting conflict on save, with Prettier?
There seem to be a few rules where my config letting system know to use ESLint doesn't always work. I have "auto format" on save enabled in VSCode.
For example this has an ESLint error of no-confusing-arrow:
getOptionSelected={option =>
typeof…

Phil Lucks
- 2,704
- 6
- 31
- 57
7
votes
1 answer
Failed to load config "prettier" to extend from
I am using Prettier as a formatter, so I configured eslint-plugin-prettier. I did everything from this guide but when I try to run ng lint I get this error:
An unhandled exception occurred: Failed to load config "prettier" to extend from.
Referenced…

NeNaD
- 18,172
- 8
- 47
- 89
6
votes
0 answers
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…

Oswaldo
- 3,296
- 4
- 25
- 35
6
votes
0 answers
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 [
currentRouteName,
currentParams
] =…

Aure77
- 3,034
- 7
- 33
- 53