File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ import { convertNoMisusedNew } from "./converters/no-misused-new";
63
63
import { convertNoMultilineString } from "./converters/no-multiline-string" ;
64
64
import { convertNoNamespace } from "./converters/no-namespace" ;
65
65
import { convertNoNonNullAssertion } from "./converters/no-non-null-assertion" ;
66
+ import { convertNoNullKeyword } from "./converters/no-null-keyword" ;
66
67
import { convertNoObjectLiteralTypeAssertion } from "./converters/no-object-literal-type-assertion" ;
67
68
import { convertNoOctalLiteral } from "./converters/no-octal-literal" ;
68
69
import { convertNoParameterProperties } from "./converters/no-parameter-properties" ;
@@ -186,6 +187,7 @@ export const converters = new Map([
186
187
[ "no-multiline-string" , convertNoMultilineString ] ,
187
188
[ "no-namespace" , convertNoNamespace ] ,
188
189
[ "no-non-null-assertion" , convertNoNonNullAssertion ] ,
190
+ [ "no-null-keyword" , convertNoNullKeyword ] ,
189
191
[ "no-object-literal-type-assertion" , convertNoObjectLiteralTypeAssertion ] ,
190
192
[ "no-octal-literal" , convertNoOctalLiteral ] ,
191
193
[ "no-parameter-properties" , convertNoParameterProperties ] ,
Original file line number Diff line number Diff line change
1
+ import { RuleConverter } from "../converter" ;
2
+
3
+ export const convertNoNullKeyword : RuleConverter = ( ) => {
4
+ return {
5
+ notices : [ "Null types will no longer be handled." ] ,
6
+ rules : [
7
+ {
8
+ ruleName : "no-null/no-null" ,
9
+ } ,
10
+ ] ,
11
+ plugins : [ "no-null" ] ,
12
+ } ;
13
+ } ;
Original file line number Diff line number Diff line change
1
+ import { convertNoNullKeyword } from "../no-null-keyword" ;
2
+
3
+ describe ( convertNoNullKeyword , ( ) => {
4
+ test ( "conversion without arguments" , ( ) => {
5
+ const result = convertNoNullKeyword ( {
6
+ ruleArguments : [ ] ,
7
+ } ) ;
8
+
9
+ expect ( result ) . toEqual ( {
10
+ notices : [ "Null types will no longer be handled." ] ,
11
+ rules : [
12
+ {
13
+ ruleName : "no-null/no-null" ,
14
+ } ,
15
+ ] ,
16
+ plugins : [ "no-null" ] ,
17
+ } ) ;
18
+ } ) ;
19
+ } ) ;
You can’t perform that action at this time.
0 commit comments