File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { convertClassName } from "./converters/class-name";
1313import { convertCommentFormat } from "./converters/comment-format" ;
1414import { convertCurly } from "./converters/curly" ;
1515import { convertCyclomaticComplexity } from "./converters/cyclomatic-complexity" ;
16+ import { convertDeprecation } from "./converters/deprecation" ;
1617import { convertEofline } from "./converters/eofline" ;
1718import { convertFileNameCasing } from "./converters/file-name-casing" ;
1819import { convertForin } from "./converters/forin" ;
@@ -147,6 +148,7 @@ export const converters = new Map([
147148 [ "comment-format" , convertCommentFormat ] ,
148149 [ "curly" , convertCurly ] ,
149150 [ "cyclomatic-complexity" , convertCyclomaticComplexity ] ,
151+ [ "deprecation" , convertDeprecation ] ,
150152 [ "eofline" , convertEofline ] ,
151153 [ "file-name-casing" , convertFileNameCasing ] ,
152154 [ "forin" , convertForin ] ,
Original file line number Diff line number Diff line change 1+ import { RuleConverter } from "../converter" ;
2+
3+ export const convertDeprecation : RuleConverter = ( ) => {
4+ return {
5+ rules : [
6+ {
7+ ruleName : "import/no-deprecated" ,
8+ } ,
9+ ] ,
10+ plugins : [ "eslint-plugin-import" ] ,
11+ } ;
12+ } ;
Original file line number Diff line number Diff line change 1+ import { convertDeprecation } from "../deprecation" ;
2+
3+ describe ( convertDeprecation , ( ) => {
4+ test ( "conversion without arguments" , ( ) => {
5+ const result = convertDeprecation ( {
6+ ruleArguments : [ ] ,
7+ } ) ;
8+
9+ expect ( result ) . toEqual ( {
10+ rules : [
11+ {
12+ ruleName : "import/no-deprecated" ,
13+ } ,
14+ ] ,
15+ plugins : [ "eslint-plugin-import" ] ,
16+ } ) ;
17+ } ) ;
18+ } ) ;
You can’t perform that action at this time.
0 commit comments