Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng-lint-staged

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-lint-staged - npm Package Compare versions

Comparing version 12.0.2 to 12.0.3

2

package.json
{
"name": "ng-lint-staged",
"version": "12.0.2",
"version": "12.0.3",
"description": "Shim to run lint-staged with ng-lint",

@@ -5,0 +5,0 @@ "bin": {

@@ -5,15 +5,16 @@ # ng-lint-staged

Angular 7 provides the `--files` CLI option to lint certain files only instead of all project files. However, since `lint-staged` provides a regular list only, a tiny argument transformation is required.
The Angular lint builder provides a CLI option to lint certain files only instead of all project files. However, since `lint-staged` provides a regular list only, a tiny argument transformation is required.
This shim provides such a transformation.
Since Angular 12, the CLI option has been renamed to `--lint-file-patterns`. Use version 12 of this package for Angular versions >= 12. See the versions table below.
## Package versions
| Angular Version | `ng-lint-staged` version |
| --------------- | ------------------------ |
| `>= 7 <= 11` | `^7.0.0` |
| `>= 12` | `^12.0.0` |
| Lint builder | `ng-lint-staged` version |
| -------------------------------------- | ------------------------ |
| `@angular-devkit/build-angular:tslint` | `^7.0.0` |
| `@angular-eslint/builder:lint` | `^12.0.0` |
The tslint builder has a `--files` CLI option whereas with the eslint builder it is named `--lint-file-patterns`.
Find which lint builder your are using in the `angular.json` file.
## Installation

@@ -25,3 +26,5 @@

**Note** that a trailing `--` is required in the call to `ng-lint-staged` to inform it about the starting point of the files list.
**Notes**
* a trailing `--` is required in the call to `ng-lint-staged` to inform it about the starting point of the files list.
* for `lint-staged < v10.0.0`, an additional `gid add` command may be required. See the `lint-staged` documentation for that version.

@@ -31,3 +34,3 @@ ```json

"lint-staged": {
"src/**/*.ts": ["ng-lint-staged lint --fix --", "git add"]
"src/**/*.ts": ["ng-lint-staged lint --fix --"]
}

@@ -34,0 +37,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc