Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
0 replies
16 views

Recently we upgraded to Nx 22 and ESLint 9, which broke a lot of linting across the repo because the old .eslintrc-style configs and Next.js presets aren’t compatible with flat-config. I spent quite a ...
Olean's user avatar
  • 1
Advice
1 vote
3 replies
59 views

For readability sake, I've slices one big object into multiple smaller: const ABC_ROUTES = { main: '/abc', details: '/abc/:id' } as const const XYZ_ROUTES = { mainAbc: '/xyz', details: '/xyz/:...
skyboyer's user avatar
  • 24k
Tooling
0 votes
8 replies
121 views

I'm trying to factor out a useCallback that uses refs into a custom hook, but ESLint's exhaustive-deps rule keeps complaining about missing dependencies, even though refs are stable and shouldn't be ...
Noitidart's user avatar
  • 37.6k
2 votes
1 answer
182 views

After upgrading my Angular project to version 20, ESLint started throwing the following error when I run linting (using Nx): [error] (node:20947) ESLintIgnoreWarning: The ".eslintignore" ...
Alireza Ahmadi's user avatar
2 votes
0 answers
121 views

I have a nvim setup that I have created and when I want to open a react/nextjs project it errors on imports like import Image from "next/image"; and no one likes that, so I wanted to ask how ...
user27392773's user avatar
1 vote
0 answers
171 views

I am getting this error when I try to launch the zed code editor and it shows me failed to load eslint language server, other language server are working alright. Language server eslint: initializing ...
Yashwanth somayajula's user avatar
-4 votes
1 answer
149 views

While run eslint --cache --cache-strategy content . got error: `config` is deprecated. ESLint core now provides this functionality via `defineConfig()` Using npx @eslint/migrate-config also give ...
Никита Середа's user avatar
0 votes
1 answer
53 views

I need this module to perform some logic with asar files. Project builds and works fine. VSCode correctly resolves node:original-fs. Only ESLint fails to resolve it: PS C:\Users\my-project> npm run ...
RareScrap's user avatar
  • 600
-3 votes
1 answer
66 views

Is there a way to configure a pre-commit or MR rule that would prevent writing new code with eslint warnings? We generally treat linter warnings as an antipattern and prefer to have all errors, but ...
zacaj's user avatar
  • 2,086
0 votes
0 answers
167 views

I'm working with Vue3 + Typescript and want to integrate a pipeline with Lint but it's giving me some issues. I have eslint 9.34.0 and my eslint.config.cjs is in /config but I reference it in my ...
Cristian Oraña's user avatar
2 votes
1 answer
221 views

In VS Code, when I hover on the yellow underlined warning on if (!clientId) { I see: Unexpected nullable string value in conditional. Please handle the nullish/empty cases explicitly.eslint@typescript-...
TSR's user avatar
  • 21.5k
-2 votes
1 answer
233 views

I’m trying to separate my TypeScript test configs for a Vite + React + Vitest project. The tsconfig.app.json and tsconfig.node.json files were created automatically by Vite; I only added my own ...
Basma Khalil's user avatar
0 votes
0 answers
193 views

I'm working with a Next.js 15 project using TypeScript, and I'm trying to properly configure eslint-plugin-import to work with path aliases (like @/), as well as import sorting and unresolved path ...
Edgar's user avatar
  • 7,008
2 votes
4 answers
3k views

When trying to run eslint on my HP EliteBook 640 G11 (Intel Core Ultra 5 125U) I got this error: C:\Users\test\Work\eslint-native-binding-test\eslint.config.mjs 1:1 error Resolve error: Cannot ...
Häkka's user avatar
  • 31
0 votes
2 answers
105 views

I am building a website using Next.js 15.3.3, React 19, and Sanity.io for content. Everything works perfectly in my local development environment (next dev). However, when I deploy to Vercel, the ...
Devansh Sharma's user avatar
0 votes
1 answer
45 views

Is there a way to prevent devs from adding custom CSS and styling in a React project? The idea is that all of our components are built in-house and we have a stylable component that supports styling ...
Nathan's user avatar
  • 83
3 votes
1 answer
549 views

I'm trying to set up the same ESLint configuration in my new React 19 + Vite app using the modern eslint.config.js format. However, it's not working — the linter doesn’t show any errors or warnings in ...
Jay's user avatar
  • 374
0 votes
0 answers
313 views

Literally just last Friday, everything was working smoothly - I could navigate to any function, hover over variables and instantly see their types. But on Monday, when I resumed work, it all suddenly ...
FreQl's user avatar
  • 1
0 votes
1 answer
70 views

The error message: SyntaxError: Syntax error in selector ":not(TSTypeAliasDeclaration:has(> Identifier[name=Nullable])):has(> TSUnionType:has(> TSNullKeyword):not(:has(> ...
EzioMercer's user avatar
  • 2,149
1 vote
0 answers
181 views

I have a folder with this structure: root |- folderA |- folderB |- folderC I want to apply two sets of rules to eslint to each folderA and folderB and completely skip folderC. so I have this: export ...
jamesdeath123's user avatar
2 votes
0 answers
35 views

I am working on a few Javascript files comprising a small part of a large legacy codebase. I notice that eslint requires a package.json file and package structure, which this codebase lacks. Is there ...
BobtheMagicMoose's user avatar
0 votes
0 answers
118 views

I want to build a Node.js script (or Git hook) that will only fix ESLint errors on the lines that are changed in staged JavaScript/TypeScript files. The intention is to keep the fixes minimal and ...
Tejas Thombare's user avatar
3 votes
2 answers
3k views

I'm experiencing an issue specifically with Cursor where ESLint doesn't show any errors in the editor UI across all of my projects, despite working correctly in the terminal. The Problem ESLint ...
Ric's user avatar
  • 349
0 votes
0 answers
83 views

I am trying to understand how to use ESLint with neostandard style guide, then my eslint.config.mjs file could be: option 1: this was generated by copilot import js from "@eslint/js"; import ...
Byron2017's user avatar
  • 1,013
0 votes
1 answer
101 views

I'm trying to run npm build but I get "no-unused-vars" errors. I'd like to disable these. My project is build with create-react-app (https://github.com/facebook/create-react-app), React + ...
Max Woolf's user avatar

1
2 3 4 5
141