File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
src/converters/lintConfigs/rules
ruleConverters/eslint-plugin-react Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ import { convertJsxCurlySpacing } from "./ruleConverters/eslint-plugin-react/jsx
181
181
import { convertJsxEqualsSpacing } from "./ruleConverters/eslint-plugin-react/jsx-equals-spacing" ;
182
182
import { convertJsxKey } from "./ruleConverters/eslint-plugin-react/jsx-key" ;
183
183
import { convertJsxNoBind } from "./ruleConverters/eslint-plugin-react/jsx-no-bind" ;
184
+ import { convertJsxSelfClose } from "./ruleConverters/eslint-plugin-react/jsx-self-close" ;
184
185
import { convertJsxWrapMultiline } from "./ruleConverters/eslint-plugin-react/jsx-wrap-multiline" ;
185
186
186
187
// eslint-plugin-rxjs converters
@@ -242,6 +243,7 @@ export const ruleConverters = new Map([
242
243
[ "jsx-equals-spacing" , convertJsxEqualsSpacing ] ,
243
244
[ "jsx-key" , convertJsxKey ] ,
244
245
[ "jsx-no-bind" , convertJsxNoBind ] ,
246
+ [ "jsx-self-close" , convertJsxSelfClose ] ,
245
247
[ "jsx-wrap-multiline" , convertJsxWrapMultiline ] ,
246
248
[ "label-position" , convertLabelPosition ] ,
247
249
[ "linebreak-style" , convertLinebreakStyle ] ,
Original file line number Diff line number Diff line change
1
+ import { RuleConverter } from "../../ruleConverter" ;
2
+
3
+ export const convertJsxSelfClose : RuleConverter = ( ) => {
4
+ return {
5
+ rules : [
6
+ {
7
+ ruleName : "react/self-closing-comp" ,
8
+ } ,
9
+ ] ,
10
+ plugins : [ "eslint-plugin-react" ] ,
11
+ } ;
12
+ } ;
Original file line number Diff line number Diff line change
1
+ import { convertJsxSelfClose } from "../jsx-self-close" ;
2
+
3
+ describe ( convertJsxSelfClose , ( ) => {
4
+ test ( "conversion without arguments" , ( ) => {
5
+ const result = convertJsxSelfClose ( {
6
+ ruleArguments : [ ] ,
7
+ } ) ;
8
+
9
+ expect ( result ) . toEqual ( {
10
+ rules : [
11
+ {
12
+ ruleName : "react/self-closing-comp" ,
13
+ } ,
14
+ ] ,
15
+ plugins : [ "eslint-plugin-react" ] ,
16
+ } ) ;
17
+ } ) ;
18
+ } ) ;
You can’t perform that action at this time.
0 commit comments