File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 1- import type * as eslint from 'eslint' ;
1+ import type { ESLint , Linter } from 'eslint' ;
22
33export const createRecommendedConfig = (
4- plugin : eslint . ESLint . Plugin ,
4+ plugin : ESLint . Plugin ,
55) => ( {
66 name : 'rxjs-x/recommended' as const ,
77 plugins : {
8- 'rxjs-x' : plugin as unknown as eslint . ESLint . Plugin ,
8+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- "A type annotation is necessary."
9+ 'rxjs-x' : plugin as ESLint . Plugin ,
910 } ,
1011 rules : {
1112 'rxjs-x/no-async-subscribe' : 'error' ,
@@ -29,4 +30,4 @@ export const createRecommendedConfig = (
2930 'rxjs-x/prefer-root-operators' : 'error' ,
3031 'rxjs-x/throw-error' : 'error' ,
3132 } ,
32- } satisfies eslint . Linter . Config ) ;
33+ } satisfies Linter . Config ) ;
Original file line number Diff line number Diff line change 1- import type * as eslint from 'eslint' ;
1+ import type { ESLint , Linter } from 'eslint' ;
22
33export const createStrictConfig = (
4- plugin : eslint . ESLint . Plugin ,
4+ plugin : ESLint . Plugin ,
55) => ( {
66 name : 'rxjs-x/strict' as const ,
77 plugins : {
8- 'rxjs-x' : plugin as unknown as eslint . ESLint . Plugin ,
8+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- "A type annotation is necessary."
9+ 'rxjs-x' : plugin as ESLint . Plugin ,
910 } ,
1011 rules : {
1112 'rxjs-x/no-async-subscribe' : 'error' ,
@@ -40,4 +41,4 @@ export const createStrictConfig = (
4041 allowThrowingUnknown : false as const ,
4142 } ] ,
4243 } ,
43- } satisfies eslint . Linter . Config ) ;
44+ } satisfies Linter . Config ) ;
Original file line number Diff line number Diff line change 1- import type * as eslint from 'eslint' ;
1+ import type { ESLint } from 'eslint' ;
22import { name , version } from '../package.json' ;
33import { createRecommendedConfig } from './configs/recommended' ;
44import { createStrictConfig } from './configs/strict' ;
@@ -98,14 +98,14 @@ const plugin = {
9898 'suffix-subjects' : suffixSubjectsRule ,
9999 'throw-error' : throwErrorRule ,
100100 } ,
101- } satisfies eslint . ESLint . Plugin ;
101+ } satisfies ESLint . Plugin ;
102102
103103const rxjsX = {
104104 ...plugin ,
105105 configs : {
106106 recommended : createRecommendedConfig ( plugin ) ,
107107 strict : createStrictConfig ( plugin ) ,
108108 } ,
109- } satisfies eslint . ESLint . Plugin ;
109+ } satisfies ESLint . Plugin ;
110110
111111export default rxjsX ;
You can’t perform that action at this time.
0 commit comments