Closed github-actions[bot] closed 2 years ago
cc @AriPerkkio on the "too long" error again.
I see failures like:
Repository: eManPrague/frui.ts
[535](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:536)
Rule: react/jsx-key
[536](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:537)
Message: Cannot read property 'type' of undefined
[537](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:538)
Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/eManPrague/frui.ts/packages/validation/src/manualEntityValidator.ts:14
[538](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:539)
Rule: "react/jsx-key"
[539](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:540)
Path: eManPrague/frui.ts/packages/validation/src/manualEntityValidator.ts
[540](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:541)
Link: https://github.com/eManPrague/frui.ts/blob/HEAD/packages/validation/src/manualEntityValidator.ts#L14
[541](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:542)
[542](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:543)
12 |
[543](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:544)
13 | export default class ManualEntityValidator<TEntity = any> extends EntityValidatorBase<TEntity> {
[544](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:545)
> 14 | protected readonly validationResults = observable.map<PropertyName<TEntity>, ValidationResult[]>();
[545](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:546)
15 |
[546](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:547)
16 | constructor(isVisible = false, protected configuration: ManualEntityValidatorConfiguration = DefaultConfiguration) {
[547](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:548)
17 | super(isVisible);
TypeError: Cannot read property 'type' of undefined
[611](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:612)
Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/qiekub/map/src/data/iD/modules/behavior/copy.js:50
[612](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:613)
Rule: "react/jsx-key"
[613](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:614)
at Object.isFunctionLikeExpression (/github/workspace/lib/util/ast.js:223:15)
[614](https://github.com/jsx-eslint/eslint-plugin-react/runs/8053911183?check_suite_focus=true#step:6:615)
at CallExpression[callee.type="MemberExpression"][callee.property.name="map"], CallExpression[callee.type="OptionalMemberExpression"][callee.property.name="map"], OptionalCallExpression[callee.type="MemberExpression"][callee.property.name="map"], OptionalCallExpression[callee.type="OptionalMemberExpression"][callee.property.name="map"] (/github/workspace/lib/rules/jsx-key.js:230:22)
I see at least 3 jsx-sort-props
errors but no stack trace from those.
Something is still crashing even though I thought this was fixed in https://github.com/AriPerkkio/eslint-remote-tester-run-action/pull/27.
Here are results from logs. react/jsx-key
seems related to https://github.com/jsx-eslint/eslint-plugin-react/pull/3369 (👋 @sjarva )
@ljharb Looks like we are still using v2
here. The fix is in v3
. 😄
There should be no breaking changes between the majors for this project.
Thanks for tagging me @AriPerkkio!
Yeah, there seems to be a problem also in the jsx-key
rule, I'm taking a look at this and will (hopefully) open a fixing PR.
I’ve got a fix ready for that one.
0771bc1b is that fix. Rerunning the smoke test now.
Detected 6 ESLint reports and/or crashes. Scanned 4979 repositories.
Rules:
react/jsx-sort-props
On this one, avoiding the crash is easy, but making the test case have correct output seems to have unveiled a larger bug (cc @ROSSROSALES)
@ljharb Thanks for tagging me. I will take a look at this as soon as I can to find a fix. It seems like the rule is finding >1 line comments in between two props of a multi-lined component and block comments allocated at the end of the last prop of a multi-lined component.
Currently, I believe it should be able to sort the last prop of a multi-lined component if it is a line comment //
and block comments are sorted if on the same line.
https://github.com/jsx-eslint/eslint-plugin-react/commit/0771bc1b5b7e75216543e5ca93c1d99a5152c759 seems to have fixed https://github.com/jsx-eslint/eslint-plugin-react/issues/3373 which I just reported since it seems that observable.map
is being thought of as something like Array.prototype.map
.
@ROSSROSALES the issue i'm seeing is that it's autofixing to <ReactJson collapseStringsAfterLength={60} collapsed collapseStringsAfterLength={60} onEdit={onEdit} /* onDelete={onEdit} */ />
instead of <ReactJson collapseStringsAfterLength={60} collapsed={4} src={rowResult} name="data" onEdit={onEdit} /* onDelete={onEdit} */ />
(note the change of collapsed
to a boolean)
@ROSSROSALES the issue i'm seeing is that it's autofixing to
<ReactJson collapseStringsAfterLength={60} collapsed collapseStringsAfterLength={60} onEdit={onEdit} /* onDelete={onEdit} */ />
instead of<ReactJson collapseStringsAfterLength={60} collapsed={4} src={rowResult} name="data" onEdit={onEdit} /* onDelete={onEdit} */ />
(note the change ofcollapsed
to a boolean)
I tried a fix to the issue. I added the quoted test case.
However, instead of <ReactJson collapseStringsAfterLength={60} collapsed={4} src={rowResult} name="data" onEdit={onEdit} /* onDelete={onEdit} */ />
,
it should sort to <ReactJson collapseStringsAfterLength={60} collapsed={4} name="data" src={rowResult} onEdit={onEdit} /* onDelete={onEdit} */ />
oh sure, yes - it's the change to a boolean that i'm concerned about :-)
I believe the fix should fix the boolean problem! But if I am not understanding the issue correctly please let me know or if the fix was not appropriate. I will try my best to solve this issue.
Something went wrong.
Click to expand
``` HttpError: Validation Failed: {"resource":"Issue","code":"custom","field":"body","message":"body is too long (maximum is 65536 characters)"} at /index.js:2869:26 at processTicksAndRejections (internal/process/task_queues.js:95:5) at async GithubClient.requestAndRetry (/index.js:5786:12) at async GithubClient.createIssue (/index.js:5819:5) at async /index.js:5977:7 ```