pickstack

Angular + ESLint

Pluggable linter (flat config). This page shows exactly what pickstack adds to a Angular project for ESLint: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.

$ npm create pickstack@latest my-app -- --framework angular --modules eslint --yes
Customize in the configurator

Packages it adds

PackageVersionType
@angular-eslint/builder^22.8.0dev
@eslint/js^10.0.1dev
angular-eslint^22.8.0dev
eslint^10.15.0dev
typescript-eslint^8.74.0dev

New files

eslint.config.js
// @ts-check
import eslint from "@eslint/js";
import { defineConfig } from "eslint/config";
import tseslint from "typescript-eslint";
import angular from "angular-eslint";

export default defineConfig([
  {
    files: ["**/*.ts"],
    extends: [
      eslint.configs.recommended,
      tseslint.configs.recommended,
      tseslint.configs.stylistic,
      angular.configs.tsRecommended,
    ],
    processor: angular.processInlineTemplates,
    rules: {
      "@angular-eslint/directive-selector": [
        "error",
        { type: "attribute", prefix: "app", style: "camelCase" },
      ],
      "@angular-eslint/component-selector": [
        "error",
        { type: "element", prefix: "app", style: "kebab-case" },
      ],
    },
  },
  {
    files: ["**/*.html"],
    extends: [
      angular.configs.templateRecommended,
      angular.configs.templateAccessibility,
    ],
    rules: {},
  },
]);

Changes to existing files

angular.json (changed)
⋯ 2 unchanged lines   "version": 1,   "cli": {     "packageManager": "npm",+    "analytics": false,+    "schematicCollections": ["angular-eslint"]−    "analytics": false   },   "newProjectRoot": "projects",   "projects": {⋯ 52 unchanged lines             }           },           "defaultConfiguration": "development"+        },+        "lint": {+          "builder": "@angular-eslint/builder:lint",+          "options": {+            "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]+          }         }       }     }⋯ 3 unchanged lines
src/app/pages/about/about.html (changed)
 <section class="page">   <h1 class="title">About</h1>+  <p class="text">Built with Angular 22, TypeScript, ESLint.</p>−  <p class="text">Built with Angular 22, TypeScript.</p> </section>  

Project files

Related templates