File tree Expand file tree Collapse file tree 6 files changed +37
-2
lines changed
test/tests/standalone tslint.json Expand file tree Collapse file tree 6 files changed +37
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import { convertNoConstantCondition } from "./converters/no-constant-condition";
4040import { convertNoConstruct } from "./converters/no-construct" ;
4141import { convertNoControlRegex } from "./converters/no-control-regex" ;
4242import { convertNoDebugger } from "./converters/no-debugger" ;
43+ import { convertNoDefaultExport } from "./converters/no-default-export" ;
4344import { convertNoDuplicateImports } from "./converters/no-duplicate-imports" ;
4445import { convertNoDuplicateSuper } from "./converters/no-duplicate-super" ;
4546import { convertNoDuplicateSwitchCase } from "./converters/no-duplicate-switch-case" ;
@@ -159,6 +160,7 @@ export const converters = new Map([
159160 [ "no-construct" , convertNoConstruct ] ,
160161 [ "no-control-regex" , convertNoControlRegex ] ,
161162 [ "no-debugger" , convertNoDebugger ] ,
163+ [ "no-default-export" , convertNoDefaultExport ] ,
162164 [ "no-duplicate-imports" , convertNoDuplicateImports ] ,
163165 [ "no-duplicate-super" , convertNoDuplicateSuper ] ,
164166 [ "no-duplicate-switch-case" , convertNoDuplicateSwitchCase ] ,
Original file line number Diff line number Diff line change 1+ import { RuleConverter } from "../converter" ;
2+
3+ export const convertNoDefaultExport : RuleConverter = ( ) => {
4+ return {
5+ rules : [
6+ {
7+ ruleName : "import/no-default-export" ,
8+ } ,
9+ ] ,
10+ plugins : [ "import" ] ,
11+ } ;
12+ } ;
Original file line number Diff line number Diff line change 1+ import { convertNoDefaultExport } from "../no-default-export" ;
2+
3+ describe ( convertNoDefaultExport , ( ) => {
4+ test ( "conversion without arguments" , ( ) => {
5+ const result = convertNoDefaultExport ( {
6+ ruleArguments : [ ] ,
7+ } ) ;
8+
9+ expect ( result ) . toEqual ( {
10+ rules : [
11+ {
12+ ruleName : "import/no-default-export" ,
13+ } ,
14+ ] ,
15+ plugins : [ "import" ] ,
16+ } ) ;
17+ } ) ;
18+ } ) ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ module.exports = {
2626 "@typescript-eslint/unbound-method" : "off" ,
2727 "arrow-body-style" : "off" ,
2828 "default-case" : "off" ,
29+ "import/no-default-export" : "error" ,
2930 "linebreak-style" : "off" ,
3031 "no-bitwise" : "off" ,
3132 "no-empty" : "off" ,
Original file line number Diff line number Diff line change 1- ✨ 19 rules replaced with their ESLint equivalents. ✨
1+ ✨ 20 rules replaced with their ESLint equivalents. ✨
22️👀 2 rules do not yet have ESLint equivalents; defaulting to eslint-plugin-tslint. 👀
3- ⚡ 1 package is required for new ESLint rules. ⚡
3+ ⚡ 2 packages are required for new ESLint rules. ⚡
44 unicorn
5+ import
56✅ All is well! ✅
Original file line number Diff line number Diff line change 1212 "no-any" : false ,
1313 "no-bitwise" : false ,
1414 "no-empty" : false ,
15+ "no-default-export" : true ,
1516 "no-magic-numbers" : false ,
1617 "no-import-side-effect" : false ,
1718 "no-implicit-dependencies" : [true , " dev" ],
You can’t perform that action at this time.
0 commit comments