File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { RuleConverter } from "../converter" ;
2
+
3
+ export const convertNoReferenceImport : RuleConverter = ( ) => {
4
+ return {
5
+ rules : [
6
+ {
7
+ ruleName : "@typescript-eslint/triple-slash-reference" ,
8
+ ruleArguments : [
9
+ {
10
+ path : "always" ,
11
+ types : "prefer-import" ,
12
+ lib : "always" ,
13
+ } ,
14
+ ] ,
15
+ } ,
16
+ ] ,
17
+ } ;
18
+ } ;
Original file line number Diff line number Diff line change
1
+ import { convertNoReferenceImport } from "../no-reference-import" ;
2
+
3
+ describe ( convertNoReferenceImport , ( ) => {
4
+ test ( "conversion without arguments" , ( ) => {
5
+ const result = convertNoReferenceImport ( {
6
+ ruleArguments : [ ] ,
7
+ } ) ;
8
+
9
+ expect ( result ) . toEqual ( {
10
+ rules : [
11
+ {
12
+ ruleName : "@typescript-eslint/triple-slash-reference" ,
13
+ ruleArguments : [
14
+ {
15
+ path : "always" ,
16
+ types : "prefer-import" ,
17
+ lib : "always" ,
18
+ } ,
19
+ ] ,
20
+ } ,
21
+ ] ,
22
+ } ) ;
23
+ } ) ;
24
+ } ) ;
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ import { convertNoParameterProperties } from "./converters/no-parameter-properti
79
79
import { convertNoParameterReassignment } from "./converters/no-parameter-reassignment" ;
80
80
import { convertNoRedundantJsdoc } from "./converters/no-redundant-jsdoc" ;
81
81
import { convertNoReference } from "./converters/no-reference" ;
82
+ import { convertNoReferenceImport } from "./converters/no-reference-import" ;
82
83
import { convertNoRegexSpaces } from "./converters/no-regex-spaces" ;
83
84
import { convertNoRequireImports } from "./converters/no-require-imports" ;
84
85
import { convertNoReturnAwait } from "./converters/no-return-await" ;
@@ -219,6 +220,7 @@ export const rulesConverters = new Map([
219
220
[ "no-parameter-reassignment" , convertNoParameterReassignment ] ,
220
221
[ "no-redundant-jsdoc" , convertNoRedundantJsdoc ] ,
221
222
[ "no-reference" , convertNoReference ] ,
223
+ [ "no-reference-import" , convertNoReferenceImport ] ,
222
224
[ "no-regex-spaces" , convertNoRegexSpaces ] ,
223
225
[ "no-require-imports" , convertNoRequireImports ] ,
224
226
[ "no-return-await" , convertNoReturnAwait ] ,
You can’t perform that action at this time.
0 commit comments