Skip to content

Commit f48c05a

Browse files
gino-mrfontanarosa
andauthored
Remove unused imports (#2397)
Co-authored-by: Roberto Fontanarosa <[email protected]>
1 parent 0a3b281 commit f48c05a

File tree

8 files changed

+37
-4
lines changed

8 files changed

+37
-4
lines changed

eslint.base.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import gts from 'gts/build/eslint.config.js';
1818
import prettierPlugin from 'eslint-plugin-prettier';
19+
import unusedImports from 'eslint-plugin-unused-imports';
1920

2021
export default [
2122
{
@@ -32,6 +33,7 @@ export default [
3233
{
3334
plugins: {
3435
prettier: prettierPlugin,
36+
'unused-imports': unusedImports,
3537
},
3638
languageOptions: {
3739
globals: {
@@ -53,6 +55,7 @@ export default [
5355
clearTimeout: 'readonly',
5456
clearInterval: 'readonly',
5557
console: 'readonly',
58+
// 'unused-imports': 'readonly' // Is this needed? No, it's a plugin.
5659
},
5760
},
5861
rules: {
@@ -71,6 +74,17 @@ export default [
7174
'n/no-extraneous-import': 'off',
7275
'n/no-missing-import': 'off',
7376
'prettier/prettier': 'warn',
77+
'no-unused-vars': 'off',
78+
'unused-imports/no-unused-imports': 'error',
79+
'unused-imports/no-unused-vars': [
80+
'warn',
81+
{
82+
vars: 'all',
83+
varsIgnorePattern: '^_',
84+
args: 'after-used',
85+
argsIgnorePattern: '^_',
86+
},
87+
],
7488
},
7589
},
7690
];

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"eslint-plugin-import": "catalog:dev",
9090
"eslint-plugin-n": "catalog:dev",
9191
"eslint-plugin-prettier": "catalog:dev",
92+
"eslint-plugin-unused-imports": "catalog:dev",
9293
"firebase-tools": "catalog:dev",
9394
"gts": "catalog:dev",
9495
"jasmine": "catalog:dev",

pnpm-lock.yaml

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ catalogs:
8888
eslint-plugin-import: ^2.29.0
8989
eslint-plugin-n: ^17.0.0
9090
eslint-plugin-prettier: ^5.5.4
91+
eslint-plugin-unused-imports: ^4.3.0
9192
firebase-functions-test: ^3.3.0
9293
firebase-tools: ^14.0.0
9394
form-data-encoder: ^4.0.2

web/src/app/components/create-survey/task-details/task-details.component.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
1919
import { MatDialogModule } from '@angular/material/dialog';
2020

2121
import { Job } from 'app/models/job.model';
22-
2322
import { DialogService } from 'app/services/dialog/dialog.service';
2423

2524
import { TaskDetailsComponent } from './task-details.component';

web/src/app/components/main-page-container/main-page/secondary-side-panel/loi-panel/loi-panel.component.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { List, Map } from 'immutable';
2323
import { of } from 'rxjs';
2424

2525
import { Coordinate } from 'app/models/geometry/coordinate';
26-
2726
import { Point } from 'app/models/geometry/point';
2827
import { Job } from 'app/models/job.model';
2928
import { LocationOfInterest } from 'app/models/loi.model';

web/src/app/services/loi/loi.service.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { User } from 'app/models/user.model';
2727
import { AuthService } from 'app/services/auth/auth.service';
2828
import { DataStoreService } from 'app/services/data-store/data-store.service';
2929
import { LocationOfInterestService } from 'app/services/loi/loi.service';
30-
3130
import { SurveyService } from 'app/services/survey/survey.service';
3231
import { polygonShellCoordsToPolygon } from 'testing/helpers';
3332

web/src/app/services/survey/survey.service.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { User } from 'app/models/user.model';
2323
import { AuthService } from 'app/services/auth/auth.service';
2424
import { DataStoreService } from 'app/services/data-store/data-store.service';
2525
import { SurveyService } from 'app/services/survey/survey.service';
26-
2726
import { Role } from 'app/models/role.model';
2827
import { NavigationService } from 'app/services/navigation/navigation.service';
2928

0 commit comments

Comments
 (0)