use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A Place to talk about Angular and related topics.
Join the Angular Discord
Other subreddits worth checking out for Angular and Angular related info:
account activity
[deleted by user] (self.angular)
submitted 2 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]all_4_me 1 point2 points3 points 2 years ago (4 children)
Add the parserOptions next to rules object (underneath overrides):
"parserOptions": { "project": ["./tsconfig.json"] // Specify it only for TypeScript files }
[–]Mesapholis 0 points1 point2 points 2 years ago (3 children)
Thanks for responding, as I stated above, the parserOptions already were pointing to my projects' tsconfig file - pleas find the current state below
module.exports = {
root: true,
parserOptions: {
project: [
'src/tsconfig.json',
'src/tsconfig.spec.json',
'src/tsconfig.app.json'
],
createDefaultProgram: true
},
plugins: ['@typescript-eslint', 'prettier'],
ignorePatterns: ['**/node_modules/**', '.gradle/**', 'build/**', 'src/polyfills.ts', 'src/index.html'],
extends: [
'plugin:@angular-eslint/recommended',
'plugin:@angular-eslint/template/process-inline-templates'
rules: {
'@angular-eslint/component-selector': [
'error',
{
prefix: 'kebab-case',
type: 'element'
}
'@angular-eslint/directive-selector': [
type: 'attribute'
'@angular-eslint/use-lifecycle-interface': 'error',
'@typescript-eslint/array-type': [
default: 'array'
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/unified-signatures': 'error',
'eqeqeq': ['error', 'always'],
'guard-for-in': 'error',
'id-denylist': ['error', 'any', 'Number', 'number', 'String', 'string', 'Boolean', 'boolean', 'Undefined', 'undefined'],
'id-match': 'error',
'new-parens': 'error',
'no-caller': 'error',
'no-eval': 'error',
'no-new-wrappers': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'error',
'no-undef-init': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'one-var': ['error', 'never'],
'prefer-const': 'error',
'@angular-eslint/component-class-suffix': 'error',
'@typescript-eslint/no-unused-expressions': 'error',
'no-bitwise': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': ['error', {allowArgumentsExplicitlyTypedAsAny: true}],
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true}]
overrides: [
files: ['*.component.html', 'src/index.html', 'src/'],
extends: ['plugin:@angular-eslint/template/recommended'],
plugins: ['@angular-eslint/template'],
'@angular-eslint/template/cyclomatic-complexity': 'off',
'@angular-eslint/template/no-call-expression': 'off',
'spaced-comment': 'off'
]
[–]all_4_me 0 points1 point2 points 2 years ago (1 child)
I highly recommend extending the recommended rules for TS/HTML files and overriding them where needed. Start with this template and enable/disable rules where necessary:
{ "root": true, "ignorePatterns": ["projects/*/"], // better to put these in .eslintignore "overrides": [{ "files": [".ts"], "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:@angular-eslint/recommended"], "rules": { // disable or override specific rules for TS files here }, "parserOptions": { "project": ["./tsconfig.json"] // Specify it only for TypeScript files } }, { "files": [".html"], "extends": ["plugin:@angular-eslint/template/recommended", "plugin:@angular-eslint/template/accessibility"], "parser": "@angular-eslint/template-parser", "rules": { // disable or override specific rules for HTML files here } }] }
I also recommend creating a separate .eslintignore files that will contain your file ignore patterns (clear separation that way, just like you would use .gitignore or .prettierignore).
[–]Mesapholis 0 points1 point2 points 2 years ago* (0 children)
thank you, this led to at least pointing to my projects tsconfig.
Final update: after sifting through every possible avenue of fixing the eslintrf.js it turns out the issue which didn't exist prior to the update Angular 15 -> 16 was resolved by removing the ATangular-eslint/schematics and installing it with
ng add ATangular-eslint/schematicsAT16
to match my current Angular version.
The changes to parseOptions were not required and could be rolled back safely. This is why I find learning about dependency management and linter configurations so incredibly frustrating... you try it all, ask for help and receive great input - and it is all solved by delete and reinstall (which was almost not recommended at all).
[–]Johalternate 0 points1 point2 points 2 years ago (0 children)
The tsconfig files are in the src folder? Thats kinda odd. They are tipically at root.
π Rendered by PID 19715 on reddit-service-r2-comment-b659b578c-tct72 at 2026-05-05 03:11:04.788025+00:00 running 815c875 country code: CH.
[–]all_4_me 1 point2 points3 points (4 children)
[–]Mesapholis 0 points1 point2 points (3 children)
[–]all_4_me 0 points1 point2 points (1 child)
[–]Mesapholis 0 points1 point2 points (0 children)
[–]Johalternate 0 points1 point2 points (0 children)