File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
src/converters/lintConfigs/rules
ruleConverters/eslint-plugin-react Expand file tree Collapse file tree 3 files changed +34
-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 { convertJsxNoLambda } from "./ruleConverters/eslint-plugin-react/jsx-no-lambda" ;
184
185
import { convertJsxSelfClose } from "./ruleConverters/eslint-plugin-react/jsx-self-close" ;
185
186
import { convertJsxWrapMultiline } from "./ruleConverters/eslint-plugin-react/jsx-wrap-multiline" ;
186
187
@@ -243,6 +244,7 @@ export const ruleConverters = new Map([
243
244
[ "jsx-equals-spacing" , convertJsxEqualsSpacing ] ,
244
245
[ "jsx-key" , convertJsxKey ] ,
245
246
[ "jsx-no-bind" , convertJsxNoBind ] ,
247
+ [ "jsx-no-lambda" , convertJsxNoLambda ] ,
246
248
[ "jsx-self-close" , convertJsxSelfClose ] ,
247
249
[ "jsx-wrap-multiline" , convertJsxWrapMultiline ] ,
248
250
[ "label-position" , convertLabelPosition ] ,
Original file line number Diff line number Diff line change
1
+ import { RuleConverter } from "../../ruleConverter" ;
2
+
3
+ export const convertJsxNoLambda : RuleConverter = ( ) => {
4
+ return {
5
+ rules : [
6
+ {
7
+ notices : [ "ESLint rule 'jsx-no-bind' also checks for Function.bind" ] ,
8
+ ruleName : "react/jsx-no-bind" ,
9
+ } ,
10
+ ] ,
11
+ plugins : [ "eslint-plugin-react" ] ,
12
+ } ;
13
+ } ;
Original file line number Diff line number Diff line change
1
+ import { convertJsxNoLambda } from "../jsx-no-lambda" ;
2
+
3
+ describe ( convertJsxNoLambda , ( ) => {
4
+ test ( "conversion without arguments" , ( ) => {
5
+ const result = convertJsxNoLambda ( {
6
+ ruleArguments : [ ] ,
7
+ } ) ;
8
+
9
+ expect ( result ) . toEqual ( {
10
+ rules : [
11
+ {
12
+ notices : [ "ESLint rule 'jsx-no-bind' also checks for Function.bind" ] ,
13
+ ruleName : "react/jsx-no-bind" ,
14
+ } ,
15
+ ] ,
16
+ plugins : [ "eslint-plugin-react" ] ,
17
+ } ) ;
18
+ } ) ;
19
+ } ) ;
You can’t perform that action at this time.
0 commit comments