1+ module . exports = [
2+ {
3+ ignores : [
4+ 'node_modules/**' ,
5+ 'dist/**' ,
6+ 'coverage/**' ,
7+ 'eslint.config.js' ,
8+ '.vscode/**' ,
9+ 'spec/support/**'
10+ ] ,
11+ files : [ '**/*.ts' ] ,
12+ languageOptions : {
13+ parser : require ( '@typescript-eslint/parser' ) ,
14+ parserOptions : {
15+ ecmaVersion : 'latest' ,
16+ sourceType : 'module'
17+ } ,
18+ globals : {
19+ describe : 'readonly' ,
20+ it : 'readonly' ,
21+ expect : 'readonly' ,
22+ expectAsync : 'readonly' ,
23+ beforeEach : 'readonly' ,
24+ afterEach : 'readonly' ,
25+ beforeAll : 'readonly' ,
26+ afterAll : 'readonly' ,
27+ jasmine : 'readonly' ,
28+ spyOn : 'readonly' ,
29+ RequestInit : 'readonly' ,
30+ fail : 'readonly' ,
31+ File : 'readonly' ,
32+ Buffer : 'readonly' ,
33+ FormData : 'readonly' ,
34+ URLSearchParams : 'readonly' ,
35+ Response : 'readonly' ,
36+ BodyInit : 'readonly' ,
37+ URL : 'readonly' ,
38+ Response : 'readonly' ,
39+ ReadableStream : 'readonly' ,
40+ process : 'readonly' ,
41+ HeadersInit : 'readonly' ,
42+ setTimeout : 'readonly'
43+ }
44+ } ,
45+ plugins : {
46+ '@typescript-eslint' : {
47+ rules : require ( '@typescript-eslint/eslint-plugin' ) . rules
48+ }
49+ } ,
50+ rules : {
51+ ...require ( '@eslint/js' ) . configs . recommended . rules ,
52+ ...require ( '@typescript-eslint/eslint-plugin' ) . configs [ 'recommended' ] . rules ,
53+ 'semi' : [ 'error' , 'always' ] ,
54+ 'object-curly-spacing' : [ 'error' , 'always' ] ,
55+ 'quotes' : [ 'error' , 'single' ] ,
56+ }
57+ } ,
58+ {
59+ files : [ '**/*.spec.ts' , '**/*.e2e.ts' ] ,
60+ rules : {
61+ '@typescript-eslint/no-explicit-any' : 'off'
62+ }
63+ } ,
64+ {
65+ files : [ 'spec/fakes/**/*' ] ,
66+ rules : {
67+ '@typescript-eslint/no-explicit-any' : 'off' ,
68+ '@typescript-eslint/explicit-module-boundary-types' : 'off'
69+ }
70+ } ,
71+ {
72+ files : [ '**/*.test.js' , '**/*.spec.js' , '**/tests/**/*.js' ] ,
73+ languageOptions : {
74+ globals : {
75+ describe : 'readonly' ,
76+ it : 'readonly' ,
77+ expect : 'readonly' ,
78+ beforeEach : 'readonly' ,
79+ afterEach : 'readonly' ,
80+ beforeAll : 'readonly' ,
81+ afterAll : 'readonly' ,
82+ jest : 'readonly' ,
83+ spyOn : 'readonly'
84+ }
85+ }
86+ }
87+ ] ;
0 commit comments