ng-lint-staged
Advanced tools
Comparing version 12.0.3 to 12.0.4
@@ -51,5 +51,5 @@ #!/usr/bin/env node | ||
if (code) { | ||
console.error(`Child process existed with code ${code}`); | ||
console.error(`Child process exited with code ${code}`); | ||
process.exit(1); | ||
} | ||
}); |
{ | ||
"name": "ng-lint-staged", | ||
"version": "12.0.3", | ||
"version": "12.0.4", | ||
"description": "Shim to run lint-staged with ng-lint", | ||
@@ -5,0 +5,0 @@ "bin": { |
# ng-lint-staged | ||
Inspired by: https://github.com/angular/angular-cli/issues/7612#issuecomment-455802617 | ||
Inspired by: [https://github.com/angular/angular-cli/issues/7612#issuecomment-455802617](https://github.com/angular/angular-cli/issues/7612#issuecomment-455802617) | ||
@@ -25,5 +25,3 @@ 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. | ||
**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. | ||
To setup and use `ng-lint-staged` with `lint-staged`, add something like the following to your `package.json`: | ||
@@ -38,2 +36,10 @@ ```json | ||
### 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. | ||
* This command assumes you have an npm script named `lint` in your `package.json`. If your `npm` lint script is a different name, use that instead. | ||
* It is important to note, this command should be as simplistic as possible `ng lint your-project-name`. | ||
* If you want a script that performs the `--fix`, it is recommended you make an entirely new script for that. | ||
## License | ||
@@ -40,0 +46,0 @@ |
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
5795
66