Skip to content

Commit c0ebc40

Browse files
clydinalan-agius4
authored andcommitted
test: remove several unused eslint disable directives
Several unused eslint directives have been removed from source code files. This is only an initial set with more that could be removed in the future.
1 parent 780e36c commit c0ebc40

File tree

10 files changed

+0
-15
lines changed

10 files changed

+0
-15
lines changed

packages/angular_devkit/build_angular/src/tools/babel/webpack-loader.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ let linkerPluginCreator:
3636
*/
3737
let i18nPluginCreators: I18nPluginCreators | undefined;
3838

39-
// eslint-disable-next-line max-lines-per-function
4039
export default custom<ApplicationPresetOptions>(() => {
4140
const baseOptions = Object.freeze({
4241
babelrc: false,

packages/angular_devkit/core/src/virtual-fs/host/record_spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
/* eslint-disable @typescript-eslint/no-explicit-any */
109
import { path } from '../path';
1110
import { stringToFileBuffer } from './buffer';
1211
import { CordHost } from './record';

packages/angular_devkit/schematics/src/rules/base_spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
109
import { Path, virtualFs } from '@angular-devkit/core';
1110
import { lastValueFrom, of as observableOf } from 'rxjs';
1211
import { Rule, SchematicContext, Source } from '../engine/interface';

packages/angular_devkit/schematics/src/rules/call_spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
109
/* eslint-disable @typescript-eslint/no-explicit-any */
1110
import { of as observableOf } from 'rxjs';
1211
import { Rule, SchematicContext, Source } from '../engine/interface';

packages/angular_devkit/schematics_cli/bin/schematics.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ function getPackageManagerName() {
216216
return 'npm';
217217
}
218218

219-
// eslint-disable-next-line max-lines-per-function
220219
export async function main({
221220
args,
222221
stdout = process.stdout,

packages/ngtools/webpack/src/transformers/replace_resources_spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function transform(
2828
}
2929

3030
describe('@ngtools/webpack transformers', () => {
31-
/* eslint-disable max-len */
3231
describe('find_resources', () => {
3332
it('should replace resources', () => {
3433
const input = tags.stripIndent`

packages/schematics/angular/refactor/jasmine-vitest/test-file-transformer.integration_spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,6 @@ describe('Jasmine to Vitest Transformer - Integration Tests', () => {
464464
});
465465
`;
466466

467-
/* eslint-disable max-len */
468467
const vitestCode = `
469468
describe('Unsupported Features', () => {
470469
beforeAll(() => {
@@ -496,7 +495,6 @@ describe('Jasmine to Vitest Transformer - Integration Tests', () => {
496495
});
497496
});
498497
`;
499-
/* eslint-enable max-len */
500498

501499
await expectTransformation(jasmineCode, vitestCode);
502500
});

packages/schematics/angular/refactor/jasmine-vitest/transformers/jasmine-misc_spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ describe('Jasmine to Vitest Transformer', () => {
132132
return a.toString() === b.toString();
133133
});
134134
`,
135-
// eslint-disable-next-line max-len
136135
expected: `// TODO: vitest-migration: jasmine.addCustomEqualityTester is not supported. Please manually migrate to expect.addEqualityTesters(). See: https://vitest.dev/api/expect.html#expect-addequalitytesters
137136
jasmine.addCustomEqualityTester((a, b) => {
138137
return a.toString() === b.toString();

packages/schematics/angular/refactor/jasmine-vitest/transformers/jasmine-spy_spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ describe('Jasmine to Vitest Transformer', () => {
5959
{
6060
description: 'should add a TODO for jasmine.spyOnAllFunctions(object)',
6161
input: `jasmine.spyOnAllFunctions(myObject);`,
62-
// eslint-disable-next-line max-len
6362
expected: `// TODO: vitest-migration: Vitest does not have a direct equivalent for jasmine.spyOnAllFunctions(). Please spy on individual methods manually using vi.spyOn(). See: https://vitest.dev/api/vi.html#vi-spyon
6463
jasmine.spyOnAllFunctions(myObject);
6564
`,
@@ -99,7 +98,6 @@ describe('Jasmine to Vitest Transformer', () => {
9998
{
10099
description: 'should add a TODO for an unsupported spy strategy',
101100
input: `spyOn(service, 'myMethod').and.unknownStrategy();`,
102-
// eslint-disable-next-line max-len
103101
expected: `// TODO: vitest-migration: Unsupported spy strategy ".and.unknownStrategy()" found. Please migrate this manually. See: https://vitest.dev/api/mocked.html#mock
104102
vi.spyOn(service, 'myMethod').and.unknownStrategy();`,
105103
},
@@ -269,7 +267,6 @@ vi.spyOn(service, 'myMethod').and.unknownStrategy();`,
269267
{
270268
description: 'should add a TODO for spy.calls.mostRecent() without .args',
271269
input: `const mostRecent = mySpy.calls.mostRecent();`,
272-
// eslint-disable-next-line max-len
273270
expected: `// TODO: vitest-migration: Direct usage of mostRecent() is not supported. Please refactor to access .args directly or use vi.mocked(spy).mock.lastCall. See: https://vitest.dev/api/mocked.html#mock-lastcall
274271
const mostRecent = mySpy.calls.mostRecent();`,
275272
},

packages/schematics/angular/utility/standalone/rules_spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ describe('standalone utilities', () => {
354354
host,
355355
);
356356

357-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
358357
await expectAsync(promise).toBeRejectedWithError(
359358
`Cannot add provider to invalid bootstrapApplication call in ${mainPath}`,
360359
);
@@ -384,7 +383,6 @@ describe('standalone utilities', () => {
384383
host,
385384
);
386385

387-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
388386
await expectAsync(promise).toBeRejectedWithError(
389387
`Cannot statically analyze bootstrapApplication call in ${mainPath}`,
390388
);
@@ -402,7 +400,6 @@ describe('standalone utilities', () => {
402400
host,
403401
);
404402

405-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
406403
await expectAsync(promise).toBeRejectedWithError('Bootstrap call not found');
407404
});
408405
});

0 commit comments

Comments
 (0)