🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@krema/angular-eslint-stylelint-builder

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@krema/angular-eslint-stylelint-builder

Angular CLI builder for ESLint and stylelint

2.0.2
latest
Source
npm
Version published
Weekly downloads
1.2K
-4.15%
Maintainers
1
Weekly downloads
 
Created
Source

Angular ESLint + Stylelint Builder

npm version integration test unit test

A unified Angular CLI builder for linting Angular projects with ESLint and Stylelint in a single step.

Version Compatibility

  • < 2.0.0: Supports Angular v9 – v16 and Stylelint ≤ 15
  • >= 2.0.0: Supports Angular v17 – v20 and Stylelint 16+

Features

  • Lint both TypeScript and stylesheets in one command
  • Supports ESLint and Stylelint configuration and ignore patterns
  • Output to file or console, with multiple formatter options
  • Caching for faster linting
  • Fine-grained control over warnings, errors, and exit codes

Prerequisites

  • Angular CLI project (v9+)
  • ESLint and Stylelint installed and configured (e.g., eslint.config.js for flat config, or .eslintrc for legacy config, and stylelint.config.js for Stylelint)

Installation

npm install --save-dev @krema/angular-eslint-stylelint-builder

Usage

  • Update your angular.json

    Replace the default lint builder with this one:

    "lint": {
      "builder": "@krema/angular-eslint-stylelint-builder:lint",
      "options": {
        "eslintFilePatterns": ["**/*.ts"],
        "stylelintFilePatterns": ["**/*.scss"]
      }
    }
    
  • Run linting

    ng lint
    

Configuration Options

NameDefaultDescriptionRequiredLinter
Basic configuration:
eslintFilePatterns[]Files/globs for ESLintYeseslint
eslintConfigPath to ESLint config (supports both flat config eslint.config.js and legacy .eslintrc.*)Noeslint
stylelintFilePatterns[]Files/globs for StylelintYesstylelint
stylelintConfigPath to Stylelint config (stylelint.config.js or legacy .stylelintrc.*)Nostylelint
noEslintrcfalseDisable .eslintrc.* and package.json configNoeslint
fixfalseAuto-fix fixable issuesNoboth
Cache-related:
eslintCachefalseEnable ESLint cacheNoeslint
stylelintCachefalseEnable Stylelint cacheNostylelint
eslintCacheLocation.eslintcacheESLint cache file/directoryNoeslint
stylelintCacheLocation.stylelintcacheStylelint cache file/directoryNostylelint
eslintCacheStrategymetadataESLint cache strategy (metadata or content)Noeslint
File Enumeration:
eslintIgnorePatterns[]Glob patterns to ignore (ESLint 9+)Noeslint
stylelintIgnorePatterns[]Glob patterns to ignore (Stylelint 16+)Nostylelint
Output:
outputFileWrite report to file instead of consoleNoboth
formatstylishOutput formatter (see ESLint formatters)Noboth
silentfalseHide output textNoboth
Handling warnings:
quietfalseOnly show errors (ignore warnings)Noboth
maxWarnings-1Max warnings before nonzero exit codeNoboth
forcefalseSucceed even if there are lint errorsNoboth

Example

"lint": {
  "builder": "@krema/angular-eslint-stylelint-builder:lint",
  "options": {
    "eslintFilePatterns": ["src/**/*.ts"],
    "stylelintFilePatterns": ["src/**/*.scss"],
    "fix": true
  }
}

License

MIT

Keywords

angular

FAQs

Package last updated on 05 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts