feat(compiler): add diagnostic for unused standalone imports#57605
feat(compiler): add diagnostic for unused standalone imports#57605crisbeto wants to merge 2 commits intoangular:mainfrom
Conversation
c77400d to
c55f855
Compare
|
Pushed a change to add an automatic code fix to the language service. |
959b2bd to
2082a98
Compare
There was a problem hiding this comment.
Context for this is that the new rule is somewhat breaking internally. This flag is in a separate file so we can easily apply a patch to disable it.
|
Caretaker note: these changes require a new patch internally. The patch is in cl/670184686 |
2082a98 to
662e5eb
Compare
atscott
left a comment
There was a problem hiding this comment.
reviewed-for: public-api
Adds a new diagnostic that will report cases where a declaration is in the `imports` array, but isn't being used anywhere. The diagnostic is reported as a warning by default and can be controlled using the following option in the tsconfig:
```
{
"angularCompilerOptions": {
"extendedDiagnostics": {
"checks": {
"unusedStandaloneImports": "suppress"
}
}
}
}
```
**Note:** I'll look into a codefix for the language service in a follow-up.
Fixes angular#46766.
Adds an automatic code fix to the language service that will remove unused standalone imports.
662e5eb to
aeda915
Compare
|
This PR was merged into the repository by commit 8da9fb4. The changes were merged into the following branches: main |
|
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. |
Adds a new diagnostic that will report cases where a declaration is in the
importsarray, but isn't being used anywhere. The diagnostic is reported as a warning by default and can be controlled using the following option in the tsconfig:Fixes #46766.