Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
0 answers
108 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 ...
Kees de Bruin's user avatar
0 votes
1 answer
59 views

ESLint is not reading the rules specified in the eslintrc.json in my Angular v17 Project

ESLint is not reading the rules written in the eslintrc.json file. It is displaying all the problems as errors even though I have set values of some rules as warn. Moreover, it is displaying errors ...
T. B. - Tantiya Bichchu's user avatar
0 votes
0 answers
33 views

How to allow and/or configure rules for self-closing tags?

I am using ESLint in my Angular application. When I run ng lint which is running the following script: "lint": "eslint --color --fix --ext .ts ./src/app", it fails with error: ...
k.vincent's user avatar
  • 3,973
1 vote
1 answer
107 views

How do I make eslint/TypeScript infer an Angular signal value for an if clause?

I am trying to use a signal value that can be undefined, but I am stumped on how to tell the linter that the value is defined after I check that it actually is defined. Example export class ...
Filip Strandberg's user avatar
1 vote
1 answer
44 views

Using interface in angular 15 forces us to remove operational chain and throws error in template, Error: Object is possibly 'undefined'

I shared the interface, ts and html file. Error:: Object is possibly 'undefined'. 88 <thead *ngIf="invData?.columns && invData?.columns?.[table] && (invData?.columns?.[table])....
Harwinder Singh's user avatar
1 vote
0 answers
271 views

How to update the specific package to a desired version (in an Nx project)?

I want to learn what is the best approach for updating a package version in an Nx project, because updating it directly seems to produce a handful of issues with depending packages. To be more precise,...
erikm0111's user avatar
1 vote
2 answers
142 views

Angular Google with ESlint No Explicit Any

We were required to add lint rules to our Angular app. The specific rule that's causing an issue is the no-explicit-any eslint rule. .eslintrc.json "@typescript-eslint/no-explicit-any": &...
Jue's user avatar
  • 11
1 vote
2 answers
86 views

How to disable angular cli ng build linting on certain directory?

I have this directory that was part of the template, and I want to exclude it on linting. I already excluded it on tsconfig and eslint. runnig eslint it works fine, but when doing ng build it will ...
zer09's user avatar
  • 1,578
-1 votes
1 answer
41 views

Angular eslint rule violations never being reported A16

Our project was on Angular 13 and was already successfully using eslint after migrating to that from tslint. Later we migrated from Angular 13 to Angular 16 and the message output from ng lint is now ...
Deepak Igbro's user avatar
1 vote
0 answers
82 views

angular.json : linting configuration for multiple library projects

My Angular application is composed of one 'Application' project and 20+ 'library' project. These libraries are consumed inside my main application. Everything is working fine. I am using eslint ...
Nutan Gwari's user avatar
0 votes
2 answers
34 views

Angular typed controls No seeing types

I am working updating some legacy forms to be more strongly typed and thus fix eslint errors. I keep running into issues where the .value operator on abstract controls throws an IDE error "...
Dylan's user avatar
  • 1
2 votes
2 answers
94 views

Prettier replaces single quote character with &quot; 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 &quote; symbol. How can I fix that The code ...
Maria Ali's user avatar
0 votes
0 answers
66 views

New eslint config file not catching errors in real-time

I am converting my eslintrc.json to the new eslint.config.js file. When I run npx eslint src it works fine, however no errors are being caught in real-time. For example, if I require semicolons, lines ...
Samuel Patterson's user avatar
0 votes
0 answers
199 views

Found no valid, enabled rules for this file type and file path in the resolved configuration

There is gitlab runner pipeline for code-verification which is using script tslint **/**/*.ts -t json -o report.json || true. I have migrated my angular project from version 12 to 15, tslint to eslint ...
Gaurav's user avatar
  • 16
0 votes
1 answer
412 views

Error while linting: Cannot read properties of undefined (reading 'isStrict')

I am setting up ESLint inside of an Angular project. Now when running the linter I get the following error: Oops! Something went wrong! :( ESLint: 8.56.0 TypeError: Cannot read properties of ...
Matthias Thalmann's user avatar

15 30 50 per page
1
2 3 4 5
17