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";
6363import { convertNoMultilineString } from "./converters/no-multiline-string" ;
6464import { convertNoNamespace } from "./converters/no-namespace" ;
6565import { convertNoNonNullAssertion } from "./converters/no-non-null-assertion" ;
66+ import { convertNoNullKeyword } from "./converters/no-null-keyword" ;
6667import { convertNoObjectLiteralTypeAssertion } from "./converters/no-object-literal-type-assertion" ;
6768import { convertNoOctalLiteral } from "./converters/no-octal-literal" ;
6869import { convertNoParameterProperties } from "./converters/no-parameter-properties" ;
@@ -186,6 +187,7 @@ export const converters = new Map([
186187 [ "no-multiline-string" , convertNoMultilineString ] ,
187188 [ "no-namespace" , convertNoNamespace ] ,
188189 [ "no-non-null-assertion" , convertNoNonNullAssertion ] ,
190+ [ "no-null-keyword" , convertNoNullKeyword ] ,
189191 [ "no-object-literal-type-assertion" , convertNoObjectLiteralTypeAssertion ] ,
190192 [ "no-octal-literal" , convertNoOctalLiteral ] ,
191193 [ "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