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";
40
40
import { convertNoConstruct } from "./converters/no-construct" ;
41
41
import { convertNoControlRegex } from "./converters/no-control-regex" ;
42
42
import { convertNoDebugger } from "./converters/no-debugger" ;
43
+ import { convertNoDefaultExport } from "./converters/no-default-export" ;
43
44
import { convertNoDuplicateImports } from "./converters/no-duplicate-imports" ;
44
45
import { convertNoDuplicateSuper } from "./converters/no-duplicate-super" ;
45
46
import { convertNoDuplicateSwitchCase } from "./converters/no-duplicate-switch-case" ;
@@ -159,6 +160,7 @@ export const converters = new Map([
159
160
[ "no-construct" , convertNoConstruct ] ,
160
161
[ "no-control-regex" , convertNoControlRegex ] ,
161
162
[ "no-debugger" , convertNoDebugger ] ,
163
+ [ "no-default-export" , convertNoDefaultExport ] ,
162
164
[ "no-duplicate-imports" , convertNoDuplicateImports ] ,
163
165
[ "no-duplicate-super" , convertNoDuplicateSuper ] ,
164
166
[ "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 = {
26
26
"@typescript-eslint/unbound-method" : "off" ,
27
27
"arrow-body-style" : "off" ,
28
28
"default-case" : "off" ,
29
+ "import/no-default-export" : "error" ,
29
30
"linebreak-style" : "off" ,
30
31
"no-bitwise" : "off" ,
31
32
"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. ✨
2
2
️👀 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. ⚡
4
4
unicorn
5
+ import
5
6
✅ All is well! ✅
Original file line number Diff line number Diff line change 12
12
"no-any" : false ,
13
13
"no-bitwise" : false ,
14
14
"no-empty" : false ,
15
+ "no-default-export" : true ,
15
16
"no-magic-numbers" : false ,
16
17
"no-import-side-effect" : false ,
17
18
"no-implicit-dependencies" : [true , " dev" ],
You can’t perform that action at this time.
0 commit comments