-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Hello, prefer-default-export
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:
const items = ['A', 'B', 'C'];
export const [First,, Third] = items;
Crash reports from real-world examples
Rule: prefer-default-export
- Message:
Cannot read property 'type' of null Occurred while linting <text>:5
- Path:
houfio/dakpan/examples/counter-hoc/src/states/counter.ts
- Link
import { createDakpan } from 'dakpan';
import { sleep } from '../utils/sleep';
export const [CounterProvider,, withCounter] = createDakpan({
count: 0
})({
increment: () => ({ count }) => ({
count: count + 1
}),
TypeError: Cannot read property 'type' of null
Occurred while linting <text>:5
at captureDeclaration (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js:22:31)
at Array.forEach (<anonymous>)
at captureDeclaration(/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js:30:9)
at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js:70:13
at Array.forEach (<anonymous>)
at ExportNamedDeclaration (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js:69:41)
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>)
at Object.emit (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/node-event-generator.js:254:26)
Metadata
Metadata
Assignees
Labels
No labels