Category "eslint"

Error [ERR_REQUIRE_ESM] - Husky, lint-staged, eslint - nodeJS:

although there were other questions about this, most were left without a response or the response given did not work for me. For what it gives apparently eslint

Get AST nodes typescript name from SpreadOperator RuleListener Identifier node argument

I would like to get the node.argument properties Typescript types name, and check if it's Foo. Let's say the Foo type is defined like this: type Foo = {}; This

Parsing error: Cannot read file '\tsconfig.json' eslint after following Firebase Cloud Functions initialization instructions

Problem Right after my TypeScript project initialization in VSCode using firebase tools for composing Firebase Cloud Functions following the official documentat

ReactJS : Failed to load plugin 'testing-library' declared in 'package.json : Cannot find module './eslint-utils'

I recently made some copy pasting of code base from my one device to other device. I copied everything including the node modules folder. Now when I am running

How to break eslint or webpack build if any component has imported data from ./Stories/* folder

We have a React/TS project which bacame too big. In this project we use eslint (airbnb) and StoryBook. Our components structure is: /Stories <-- folder for S

Type 'AppOneType | AppSecondType' is not assignable to type 'AppOneType'

This is my current code structure: interface AppOneType { ... } interface AppSecondType { ... } interface HomeType { data: AppOneType; } interfac

How to disable eslint errors showing in the browser

When I run my create react app application using npm start, the eslint errors are shown in the browser on top of my site. I expect to see these warnings and err

Why is Buffer assignment triggering an unsafe assignment error?

I have a TypeScript project that is leveraging ESLint. I have a class that utilizes a Buffer as a class attribute. I want to be able to set the buffer as part

TypeScript Disallow Unecessary optional chain expression

Is there an es lint rule or typescript config to disallow the following ? let s: string; s = 'a'; s?.toLocaleLowerCase(); In my opinion, s is not nullable so n

Async pipes should not be negated

I migrated from TSLint to ESLint following the guide. Now, I get this error message : Async pipes should not be negated. Use (observable | async) === (false |

Configuring tsconfig.json and eslint for a monorepo using Yarn workspaces

I'm using a Yarn workspace monorepo structure in a TypeScript React project: packages admin package.json user package.json package.json // Workspace

TypeScript/Eslint throwing a 'Promise returned' error on a Express Router async route

I have the following endpoint setup to reset a database after test runs: import { getConnection } from 'typeorm'; import express from 'express'; const router =

Why we need to lint code when build with webpack?

There are some plugin about linting code, such as https://github.com/webpack-contrib/eslint-webpack-plugin. I wonder why we need to lint code during building. E

Plugin React was cnonflicted between package.json

Any project I create using npx create-react-app When compiling the project, the same message always appears: Plugin react'' was conflicted between package.json

I am trying to create a react app with typescript but I keep getting failed to compile on start

I am trying to create a react app with --template typescript and I keep getting this error: ERROR in Plugin "react" was conflicted between "package.json »

Extension 'eslint' is configured as formatter but it cannot format 'JavaScript'-files

I am experiencing an intermittent problem with ESLint in VS Code. When saving a file, instead of formatting it, this message shows in the status bar: Apparentl

How can eslint be configured to work with svelte and postcss-nesting?

Using postcss with plugin postcss-nesting in svelte is quite easy -- adding postcss-nesting to the preprocess config in svelte.config.js is the only thing neede

How do I configure parcel to exit build with an error if eslint does not validate

I'm building a react app with parcel. I have an eslint config set up that I like, and use VSCode tools to catch eslint errors and fix them as I code. The app bu

"Parsing error: No babel config file detected" when IDE not open at Vue projects root directory

I stumbled into a problem where in VS Code, when a Vue project is created and not open at root directory of the Vue project, babel.config.js wouldn't load and I

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 webstorm, but it doesn't work and displays an error:ESLint: Parsing error: This experimental syntax requires enabling one of the fo