New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost ability to auto fix linting errors #10656
Comments
I have exactly the same issue. I have two npm scripts: "lint": "ng lint",
"lint-fix": "ng lint --fix",
|
I think per this SO solution we need to specify the 'library' first, before any 'overrides', i.e.
|
Awesome! :) I guess the documentation needs an update then. The following is what I have in my scripts now:
|
This works for me : And then in your angular.json in the lint section, do the following : Hope it will help |
@kvincent3 the problem with using the |
Hi I think, I have the same issue as you I tried this code:
But this is the output:
|
When running a command with args against multiple targets, all targets should be given the args. As parseArguments was mutating the passed args array this wasn't the case. Fix by making a shallow clone of the array. This was especially noticeable when using the `ng lint --fix` command on a newly generated project, as files in the app target would be fixed, but e2e target would be only be linted (with no fix) Possibly closes angular#10657, angular#10656, angular#11005
When running a command with args against multiple targets, all targets should be given the args. As parseArguments was mutating the passed args array this wasn't the case. Fix by not mutating the array. This was especially noticeable when using the `ng lint --fix` command on a newly generated project, as files in the app target would be fixed, but e2e target would be only be linted (with no fix) Possibly closes angular#10657, angular#10656, angular#11005
When running a command with args against multiple targets, all targets should be given the args. As parseArguments was mutating the passed args array this wasn't the case. Fix by not mutating the array. This was especially noticeable when using the `ng lint --fix` command on a newly generated project, as files in the app target would be fixed, but e2e target would be only be linted (with no fix) Possibly closes #10657, #10656, #11005
When running a command with args against multiple targets, all targets should be given the args. As parseArguments was mutating the passed args array this wasn't the case. Fix by not mutating the array. This was especially noticeable when using the `ng lint --fix` command on a newly generated project, as files in the app target would be fixed, but e2e target would be only be linted (with no fix) Possibly closes #10657, #10656, #11005
Closing via |
ng lint is set to false by default |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
Repro steps
Run the following command in a Angular v6 project:
Observed behavior
Terminal output:
Desired behavior
As a developer I would like to use the
fix
flag to lint my code on the development machine. I am aware that I am able to add thefix
option inangular.json
per Angular workspace documentation and @angular-devkit/build-angular:tslint. Doing so will cause the CI machine to also "auto fix" linting errors. The desired functionality is to allow developers to easily auto fix linting errors while the CI machine should simply fail upon encountering linting errors.The text was updated successfully, but these errors were encountered: