Skip to content

Commit 8904cfd

Browse files
Copilotlimonte
andauthored
chore: migrate from ESLint to oxlint (#301)
* Initial plan * chore: migrate from eslint to oxlint Co-authored-by: limonte <6059356+limonte@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: limonte <6059356+limonte@users.noreply.github.com>
1 parent 9866790 commit 8904cfd

File tree

9 files changed

+133
-632
lines changed

9 files changed

+133
-632
lines changed

angular.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@
3535
"browsers": "ChromeHeadlessCI"
3636
}
3737
}
38-
},
39-
"lint": {
40-
"builder": "@angular-eslint/builder:lint",
41-
"options": {
42-
"lintFilePatterns": ["projects/ngx-sweetalert2/**/*.ts", "projects/ngx-sweetalert2/**/*.html"]
43-
}
4438
}
4539
}
4640
},
@@ -130,12 +124,6 @@
130124
"browsers": "ChromeHeadlessCI"
131125
}
132126
}
133-
},
134-
"lint": {
135-
"builder": "@angular-eslint/builder:lint",
136-
"options": {
137-
"lintFilePatterns": ["projects/ngx-sweetalert2-demo/**/*.ts", "projects/ngx-sweetalert2-demo/**/*.html"]
138-
}
139127
}
140128
}
141129
}

eslint.config.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
"test:lib": "ng test ngx-sweetalert2 --include=projects/ngx-sweetalert2/src/lib/swal.component.spec.ts",
1818
"test:demo": "ng test ngx-sweetalert2-demo --include=projects/ngx-sweetalert2-demo/src/app/app.component.spec.ts",
1919
"format": "oxfmt",
20-
"lint": "run-s lint:*",
21-
"lint:lib": "ng lint ngx-sweetalert2",
22-
"lint:demo": "ng lint ngx-sweetalert2-demo",
20+
"lint": "oxlint",
2321
"semantic-release": "semantic-release"
2422
},
2523
"private": true,
@@ -41,11 +39,8 @@
4139
"@angular/build": "^21.1.0",
4240
"@angular/cli": "~21.2.0",
4341
"@angular/compiler-cli": "~21.2.0",
44-
"@eslint/js": "^10.0.1",
4542
"@types/jasmine": "^6.0.0",
4643
"@types/node": "^25.0.0",
47-
"angular-eslint": "^21.1.0",
48-
"eslint": "^10.0.0",
4944
"jasmine-core": "^6.0.0",
5045
"karma": "^6.4.1",
5146
"karma-chrome-launcher": "^3.0.0",
@@ -55,8 +50,8 @@
5550
"ng-packagr": "^21.1.0",
5651
"npm-run-all2": "^8.0.0",
5752
"oxfmt": "^0.40.0",
53+
"oxlint": "^1.51.0",
5854
"semantic-release": "^25.0.0",
59-
"typescript": "~5.9.3",
60-
"typescript-eslint": "^8.39.1"
55+
"typescript": "~5.9.3"
6156
}
6257
}

projects/ngx-sweetalert2-demo/src/test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'zone.js/testing';
44
import { getTestBed } from '@angular/core/testing';
55
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
66

7-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any -- Ambient declaration for require
87
declare const require: any;
98

109
//=> First, initialize the Angular testing environment

projects/ngx-sweetalert2/src/lib/swal.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ export class SwalComponent implements OnInit, AfterViewInit, OnChanges, OnDestro
243243
* }
244244
*/
245245
@Output()
246-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- EventEmitter can emit various types depending on input/preConfirm configuration
247246
public readonly confirm = new EventEmitter<any>();
248247

249248
/**
@@ -404,7 +403,6 @@ export class SwalComponent implements OnInit, AfterViewInit, OnChanges, OnDestro
404403

405404
return result;
406405

407-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Generic hook function that accepts any function signature
408406
function composeHook<T extends (...args: any[]) => void>(
409407
userHook: T | undefined,
410408
libHook: T

projects/ngx-sweetalert2/src/lib/swal.directive.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ export class SwalDirective implements OnInit, OnDestroy {
5555
this.swalOptions = options;
5656
}
5757

58-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Type guard function needs to accept any type to check if it's an array
5958
function isArrayOptions(value: any): value is SweetAlertArrayOptions {
6059
return Array.isArray(value);
6160
}
@@ -76,7 +75,6 @@ export class SwalDirective implements OnInit, OnDestroy {
7675
* }
7776
*/
7877
@Output()
79-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- EventEmitter can emit various types depending on input/preConfirm configuration
8078
public readonly confirm = new EventEmitter<any>();
8179

8280
/**

projects/ngx-sweetalert2/src/lib/sweetalert2-loader.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export class SweetAlert2LoaderService {
3030
this.swalPromiseCache = libPromise.then((value) => (isDefaultExport(value) ? value : value.default));
3131

3232
function isLoader(value: SwalProvider): value is SwalModuleLoader {
33-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Checking for version property that doesn't exist in the type definition
3433
return typeof value === 'function' && (value as any).version === undefined;
3534
}
3635

projects/ngx-sweetalert2/src/test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { getTestBed } from '@angular/core/testing';
55
import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
66
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
77

8-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any -- Ambient declaration for require
98
declare const require: any;
109

1110
//=> First, initialize the Angular testing environment

0 commit comments

Comments
 (0)