ng-lint-staged
Advanced tools
Comparing version 7.0.2 to 7.0.3
{ | ||
"name": "ng-lint-staged", | ||
"version": "7.0.2", | ||
"version": "7.0.3", | ||
"description": "Shim to run lint-staged with ng-lint", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -5,12 +5,25 @@ # 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. | ||
## Package versions | ||
| 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 | ||
`npm install --save-dev ng-lint-staged` | ||
## Usage | ||
**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. | ||
@@ -20,6 +33,3 @@ ```json | ||
"lint-staged": { | ||
"src/**/*.ts": [ | ||
"ng-lint-staged lint --fix --", | ||
"git add" | ||
] | ||
"src/**/*.ts": ["ng-lint-staged lint --fix --"] | ||
} | ||
@@ -29,3 +39,2 @@ } | ||
## License | ||
@@ -35,3 +44,3 @@ | ||
Copyright (c) 2019 elunic AG/William Hefter <wh@elunic.com> | ||
Copyright (c) 2019-2021 elunic AG/William Hefter <wh@elunic.com> | ||
@@ -38,0 +47,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5223
60