All Questions
Tagged with prettier-eslint typescript
20
questions
0
votes
1
answer
1k
views
How to Set Up ESLint, Prettier, and TypeScript in React Native - Initial Configuration
I would like to ask about the initial setup for ESLint, Prettier, and TypeScript in React Native. Currently, I am using absolute paths to specify components. Could you please confirm if I am using ...
1
vote
0
answers
137
views
How use eslint to make absolute imports work
I would like absolute imports with @ e.g.
import { Example } from "@/features/file/example";
to work in my project but when I set it to work imports like:
import { z } from "zod";
...
1
vote
1
answer
391
views
Problem with disabling rule "lines-between-class-members" eslint
In my project (playwright + ts) I used a eslint to checking my code.
I have problem with one rule 'lines-between-class-members'.
I don't want to use it, so according to documentation in .eslintrc.json ...
1
vote
0
answers
1k
views
Eslint resolve error: typescript with invalid interface loaded as resolver
I have an issue that all .ts files have this error on the first import line.
Resolve error: typescript with invalid interface loaded as resolvereslintimport/namespace
Resolve error: typescript with ...
0
votes
0
answers
242
views
Prettier Typescript configuration for keeping the object in one line but its type definition in separate lines
I have code with functions of this format:
export const loginService = async ({ email, password }: { email: string; password: string }) => {}
I want all these functions to be formatted in this ...
1
vote
0
answers
698
views
Wrote a Custom Eslint Plugin To Find Duplicate Values In A Json File But It's Not Finding The Duplications
I have multiple Json files. People are writing to these files manually. I want to be able to detect the duplicate values inside each file and throw and error.
I want to utilize eslint to do this and ...
1
vote
0
answers
43
views
configure prettier to check only .ts and .tsx files [duplicate]
I have installed prettier via
yarn add prettier
I would like prettier to only format typescript code. in other words, I would like prettier to check all files in my project that has extension *.ts ...
0
votes
0
answers
1k
views
Is there an eslint rule for sorting things other than object keys?
Currently, I use the sort-keys rule for eslint:
"sort-keys": [
"error",
"asc",
{
...
1
vote
1
answer
265
views
Prettier, React Router 6, useParams hook, unexpected token
I've been smashing my face into this problem the entire morning.
I recently assembled a new project with React 18, React Router 6, TypeScript, Webpack 5, eslint, and prettier.
Things were going fine ...
2
votes
1
answer
2k
views
How to fix setup error eslint/prettier config?
I need help. I'm trying to set up ifint. But I see errors only in the console, I don’t see them in the problems graph and in the code editor
I tried to do everything according to the airbnb ...
1
vote
1
answer
137
views
I got "Delete `CD`" message from eslint error
I'm writing my first lines on Nestjs but when I create my first .ts file I got this error, I don't understand what this means.
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 ...
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 ...
5
votes
1
answer
6k
views
Ignore lines from linting and formating - VSC EsLint + Prettier
some.JS.Code;
//ignore this line from linting etc.
##Software will do some stuff here, but for JS it's an Error##
hereGoesJs();
Is there a possibility to exlude a line from linting and formatting ...
0
votes
0
answers
989
views
Insert new line at the end of .vue files
I have an issue with prettier + eslint in a Vue project with Typescript. Everything is working as expected except one thing, insert new line at the end of the file.
Insert `␍⏎`eslintprettier/prettier
...