
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@krema/angular-eslint-stylelint-builder
Advanced tools
An Angular CLI builder inspired by @angular-eslint/builder for linting Angular applications using ESLint and stylelint.
The library works with following Angular versions:
Installed and configured eslint and stylelint e.g. via .eslintrc
and .stylelintrc
.
For more information on converting TSLint to ESLint in Angular projects please see the following @angular-eslint project.
npm install --save-dev @krema/angular-eslint-stylelint-builder
Add the builder @krema/angular-eslint-stylelint-builder:lint" to the lint task in your angular.json.
angular.json
projects → <my-project> → architect → lint
Replace the builder of @angular-eslint
with @krema/angular-eslint-stylelint-builder
:
"lint": {
- "builder": "@angular-eslint/builder:lint",
+ "builder": "@krema/angular-eslint-stylelint-builder:lint",
"options": {
- "lintFilePatterns": ["**/*.ts"]
+ "eslintFilePatterns": ["**/*.ts"],
+ "stylelintFilePatterns": ["**/*.scss"]
}
}
Run ng lint
:
The following options can be configured:
Name | Default Value | Description | Required | Linter |
---|---|---|---|---|
Basic configuration: | ||||
eslintFilePatterns | [] | One or more files/dirs/globs to pass directly to ESLint's lintFiles() method. i.e. ["src/**/*.ts"] | true | eslint |
eslintConfig | Use this configuration, overriding .eslintrc.* config options if present | eslint | ||
stylelintFilePatterns | [] | One or more files/dirs/globs to pass directly to stylelint's lint() method. ["src/**/*.scss"] | true | stylelint |
stylelintConfig | Path to the stylelint configuration file | stylelint | ||
noEslintrc | false | Disables use of configuration from .eslintrc.* and package.json files. | eslint | |
fix | false | Automatically fix, where possible, violations reported by rules (may overwrite linted files) | eslint, stylelint | |
Cache-related: | ||||
eslintCache | false | Store the results of processed files so that ESLint only operates on the changed ones | eslint | |
stylelintCache | false | Store the results of processed files so that stylelint only operates on the changed ones | stylelint | |
eslintCacheLocation | .eslintcache | Path to the cache file or directory | eslint | |
stylelintCacheLocation | .stylelintcache | Path to the cache file or directory | stylelint | |
eslintCacheStrategy | metadata | Strategy to use for detecting changed files in the cache. Can be either metadata or content | eslint | |
File Enumeration: | ||||
eslintIgnorePath | A path to a file containing patterns describing files to ignore instead of $CWD/.eslintignore | eslint | ||
stylelintIgnorePath | A path to a file containing patterns describing files to ignore instead of $CWD/.stylelintignore | stylelint | ||
eslintRulesDir | [] | This option allows you to specify another directory from which to load rules files | eslint | |
eslintResolvePluginsRelativeTo | Changes the folder where plugins are resolved from | eslint | ||
Output: | ||||
outputFile | File to write report to instead of the console | eslint, stylelint | ||
format | stylish | The output is formatted by using the ESLint Output formatter | eslint, stylelint | |
silent | false | Hide output text | eslint, stylelint | |
Handling warnings: | ||||
quiet | false | Only register violations for rules with an "error"-level severity (ignore "warning"-level) | eslint, stylelint | |
maxWarnings | -1 | Number of warnings to trigger nonzero exit code | eslint, stylelint | |
force | false | Succeeds even if there was linting errors | eslint, stylelint |
FAQs
Angular CLI builder for ESLint and stylelint
The npm package @krema/angular-eslint-stylelint-builder receives a total of 778 weekly downloads. As such, @krema/angular-eslint-stylelint-builder popularity was classified as not popular.
We found that @krema/angular-eslint-stylelint-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.