Closed
Description
Hello, jsx-wrap-multilines
rule seems to crash in certain cases. This issue was spotted by automated CI run - it is not blocking my development or anything. https://github.com/AriPerkkio/eslint-remote-tester/actions/runs/417578540
Complete list of dependencies and .eslintrc
is available at CI runs logs, steps Run yarn list | grep eslint
and Run yarn log --config ./plugin-configs/eslint-config-airbnb.config.js
.
extends: ['airbnb', 'airbnb/hooks', 'airbnb/whitespace']
Minimal repro:
import React from 'react';
const A =
<div>
B
</div>;
Crash reports from real-world examples
Rule: jsx-wrap-multilines
- Message:
Invalid count value Occurred while linting <text>:35
- Path:
sencha/ext-react/packages/ext-react-material-ui-documentation/src/TabPanel.js
- Link
id={`simple-tabpanel-${index}`}
aria-labelledby={`simple-tab-${index}`}
>
{value === index &&
<TableContainer component={Paper}>
<Table className="" aria-label="simple table">
<TableBody>
{data.map((row, index) => (
RangeError: Invalid count value
Occurred while linting <text>:35
at String.repeat (<anonymous>)
at Object.fix (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:167:136)
at normalizeFixes (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:178:28)
at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:347:49
at Object.report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/linter.js:920:41)
at report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:130:15)
at check (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:162:13)
at LogicalExpression(/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:252:11)
at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
Rule: jsx-wrap-multilines
- Message:
Invalid count value Occurred while linting <text>:55
- Path:
sencha/ext-react/packages/ext-react-material-ui-documentation/src/zz/zzold/CenterPanelExamples.js
- Link
id={`center-tabpanel-${index}`}
aria-labelledby={`center-tab-${index}`}
>
{centervalue === index &&
<React.Fragment>
{/* <div style={{height: '50px',border: '1px solid green'}}>
<Typography variant="h3">
RangeError: Invalid count value
Occurred while linting <text>:55
at String.repeat (<anonymous>)
at Object.fix (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:167:136)
at normalizeFixes (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:178:28)
at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:347:49
at Object.report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/linter.js:920:41)
at report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:130:15)
at check (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:162:13)
at LogicalExpression(/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:252:11)
at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
Rule: jsx-wrap-multilines
- Message:
Invalid count value Occurred while linting <text>:73
- Path:
zooniverse/front-end-monorepo/packages/lib-react-components/src/Markdownz/helpers/testExamples.js
- Link
`
// Note the video and audio are first put into img tags. This is the expect jsx
output before our customization runs.
// They're then switched to audio or video depending on the mimetype of the
source.
export const jsx =
<>
<Paragraph>
😄
</Paragraph>
<Paragraph>
RangeError: Invalid count value
Occurred while linting <text>:73
at String.repeat (<anonymous>)
at Object.fix (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:167:136)
at normalizeFixes (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:178:28)
at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:347:49
at Object.report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/linter.js:920:41)
at report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:130:15)
at check (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:162:13)
at VariableDeclarator (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:209:9)
at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
Metadata
Metadata
Assignees
Labels
No labels