All Questions
559
questions
0
votes
0
answers
24
views
Error: prettier.resolveConfig is not a function (ESLint/Prettier Rule)
I'm encountering an error during linting in my React project:
Error: prettier.resolveConfig is not a function
Occurred while linting `path`
Rule: "prettier/prettier"
Those dependencies are ...
1
vote
0
answers
29
views
Is there any prettier rule for 'inserting spaces after opening and before closing parenthesis'?
I can achieve this in vscode by using:
{
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": true,
"typescript.format....
1
vote
0
answers
105
views
Update ESLint to flat config for Angular v18 app causes problems with prettier
I'm in the process of updating an Angular workspace with multiple applications from 17 to 18 and code and styling (in m2 mode) work. However, the ESLint configuration now uses the flat config and also ...
2
votes
2
answers
209
views
Prettier is removing typescript generic annotation from react class component
I'm trying to make an ErrorBoundary using a class component like this
class ErrorBoundary extends Component<ErrorBoundaryProps,ErrorBoundaryState>
But every time I format it with prettier, the ...
0
votes
2
answers
58
views
How to sort React attributes in VS Code?
For example I got:
<Image
alt=""
src="/img/logo.svg"
width="30"
height="30"
className="d-inline-block align-top"
/>
Any plugin to sort ...
0
votes
0
answers
19
views
Vscode does not format the content of nextjs into multiple lines
vscode does not format the content of nextjs into multiple lines
I expected
<Image
alt=""
src="/img/logo.svg"
width="30"
height="30"
className="d-...
0
votes
1
answer
110
views
Why do I get an "Incorrect type" error when setting codeActionsOnSave?
I am following this doc by Wes Bos to set up both ESLint. I also wanted to make it such that the set up automatically helps me reformat my code on save. However, this part of the set up is not working....
0
votes
1
answer
90
views
Trying to create a Github action that auto lints and formats the changed code in a PR
I have two Github actions one for auto formating and another for linting:
Auto lint
name: Lint changed files
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
auto_lint:
...
0
votes
1
answer
215
views
How to configure ESLint with Prettier and TypeScript on Node 20?
I tried to configure Prettier with ESLint and create a configuration in settings.json to fix errors when saving, but the errors appear in .js files and not in .ts files. How to configure this?
...
0
votes
0
answers
22
views
Prettier and eslint / tslint plugins turn off randomly
I have Intellij IDEA 2023.2.3, and I usually use prettier, eslint/tslint on automatic mode, and we have .eslintrc, .prettierrc.json, and tsconfig.json files in our root directory that intellij should ...
1
vote
1
answer
250
views
error message 'Delete `␍`eslintprettier/prettier' in nest js project
code prettier code
prettierrc
{
"singleQuote": true,
"trailingComma": "all"
}
eslintc.js
module.exports = {
parser: '@typescript-eslint/parser',
...
0
votes
1
answer
960
views
Flat config file with configs from legacy eslintrc compat error
I am trying to get prettier, typescript, eslint with airbnb typescript syntax working with linting and auto formatting.
The minimal node package.json file.
{
"name": "typescript-...
0
votes
0
answers
347
views
Issue: Replace `··` with `↹`eslintprettier/prettier
I'm getting an error: Replace ·· with ↹eslintprettier/prettier, but only in some cases, like here:
export const getTotalHabitableArea = (
checklist: FormattedChecklistType,
isFullChecklist: ...
2
votes
2
answers
94
views
Prettier replaces single quote character with " when used inside double quotes | Angular .html files
I have applied angular-eslint in my angular package. I have also added prettier configurations.
The prettier is changing the single quotation mark to "e; symbol.
How can I fix that
The code ...
0
votes
1
answer
372
views
How to prevent VSCode prettier and eslint clashing with projects configuration
I can't find setting how to disable eslint errors and auto formatting for type assertions as per below example. I use as keyword right after object I am returning from arrow function, but eslint shows ...