1- // @ts -check
1+ // @ts -nocheck
22const eslint = require ( '@eslint/js' ) ;
3- const { defineConfig} = require ( 'eslint/config' ) ;
43const tseslint = require ( 'typescript-eslint' ) ;
54const angular = require ( 'angular-eslint' ) ;
5+ const prettierPlugin = require ( 'eslint-plugin-prettier' ) ;
6+ const prettierConfig = require ( 'eslint-config-prettier' ) ;
67
7- module . exports = defineConfig ( [
8+ module . exports = tseslint . config (
89 {
910 files : [ '**/*.ts' ] ,
1011 extends : [
1112 eslint . configs . recommended ,
12- tseslint . configs . recommended ,
13- tseslint . configs . stylistic ,
14- angular . configs . tsRecommended ,
13+ ...tseslint . configs . recommended ,
14+ ...tseslint . configs . stylistic ,
15+ ...angular . configs . tsRecommended ,
16+ prettierConfig ,
1517 ] ,
18+ plugins : {
19+ prettier : prettierPlugin ,
20+ } ,
1621 processor : angular . processInlineTemplates ,
1722 rules : {
1823 '@angular-eslint/directive-selector' : [
@@ -31,14 +36,18 @@ module.exports = defineConfig([
3136 style : 'kebab-case' ,
3237 } ,
3338 ] ,
39+ 'prettier/prettier' : [
40+ 'error' ,
41+ {
42+ endOfLine : 'auto' ,
43+ } ,
44+ ] ,
45+ '@typescript-eslint/no-explicit-any' : 'error' , // Forbid usage of 'any'
3446 } ,
3547 } ,
3648 {
3749 files : [ '**/*.html' ] ,
38- extends : [
39- angular . configs . templateRecommended ,
40- angular . configs . templateAccessibility ,
41- ] ,
50+ extends : [ ...angular . configs . templateRecommended , ...angular . configs . templateAccessibility ] ,
4251 rules : { } ,
43- }
44- ] ) ;
52+ } ,
53+ ) ;
0 commit comments