-
-
Notifications
You must be signed in to change notification settings - Fork 418
Closed
Labels
Description
Hello, I'm testing stability of well known community ESlint plugins with eslint-remote-tester. This eslint plugin seems to contain a rule which causes linter to crash. ESlint rules should not crash in any condition since this makes all valid linting problems disappear. If this is a false flag please let me know.
Crashing rule:
import-style
Minimal repro:
const { a, ...b } = require('./c');This causes ESlint to dispaly an error:
TypeError: Cannot read property 'type' of undefined
Occurred while linting <text>:2
at getActualAssignmentTargetImportStyles (/<root-path-removed>/eslint-plugin-unicorn/rules/import-style.js:84:21)
Real-world examples:
eslint-remote-tester-results/reakit_reakit.md
Rule: import-style
- Message:
Cannot read property 'type' of undefined Occurred while linting <text>:2 - Path:
reakit/reakit/packages/reakit/jest.config.js - Link
const { join } = require("path");
const { projects, ...baseConfig } = require("../../jest.config");
const pkg = require("./package.json");
module.exports = {
...baseConfig,
displayName: pkg.name,TypeError: Cannot read property 'type' of undefined
Occurred while linting <text>:2
at getActualAssignmentTargetImportStyles (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:84:21)
at gensyme54126958cf62 (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:300:32)
at TemplateManager._matchTemplate (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:128:11)
at newValue (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:290:17)
at /<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:33
at Array.forEach (<anonymous>)
at newVisitor.<computed> (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:14)
at /<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:49:25
at Array.forEach (<anonymous>)
at Object.emit (/<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:47:38)
Rule: import-style
- Message:
Cannot read property 'type' of undefined Occurred while linting <text>:2 - Path:
reakit/reakit/packages/reakit-playground/jest.config.js - Link
const { join } = require("path");
const { projects, ...baseConfig } = require("../../jest.config");
const pkg = require("./package.json");
module.exports = {
...baseConfig,
displayName: pkg.name,TypeError: Cannot read property 'type' of undefined
Occurred while linting <text>:2
at getActualAssignmentTargetImportStyles (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:84:21)
at gensyme54126958cf62 (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:300:32)
at TemplateManager._matchTemplate (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:128:11)
at newValue (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:290:17)
at /<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:33
at Array.forEach (<anonymous>)
at newVisitor.<computed> (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:14)
at /<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:49:25
at Array.forEach (<anonymous>)
at Object.emit (/<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:47:38)
Rule: import-style
- Message:
Cannot read property 'type' of undefined Occurred while linting <text>:2 - Path:
reakit/reakit/packages/reakit-system/jest.config.js - Link
const { join } = require("path");
const { projects, ...baseConfig } = require("../../jest.config");
const pkg = require("./package.json");
module.exports = {
...baseConfig,
displayName: pkg.name,TypeError: Cannot read property 'type' of undefined
Occurred while linting <text>:2
at getActualAssignmentTargetImportStyles (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:84:21)
at gensyme54126958cf62 (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:300:32)
at TemplateManager._matchTemplate (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:128:11)
at newValue (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:290:17)
at /<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:33
at Array.forEach (<anonymous>)
at newVisitor.<computed> (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:14)
at /<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:49:25
at Array.forEach (<anonymous>)
at Object.emit (/<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:47:38)
Rule: import-style
- Message:
Cannot read property 'type' of undefined Occurred while linting <text>:2 - Path:
reakit/reakit/packages/reakit-system-bootstrap/jest.config.js - Link
const { join } = require("path");
const { projects, ...baseConfig } = require("../../jest.config");
const pkg = require("./package.json");
module.exports = {
...baseConfig,
displayName: pkg.name,TypeError: Cannot read property 'type' of undefined
Occurred while linting <text>:2
at getActualAssignmentTargetImportStyles (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:84:21)
at gensyme54126958cf62 (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:300:32)
at TemplateManager._matchTemplate (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:128:11)
at newValue (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:290:17)
at /<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:33
at Array.forEach (<anonymous>)
at newVisitor.<computed> (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:14)
at /<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:49:25
at Array.forEach (<anonymous>)
at Object.emit (/<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:47:38)
Rule: import-style
- Message:
Cannot read property 'type' of undefined Occurred while linting <text>:2 - Path:
reakit/reakit/packages/reakit-system-palette/jest.config.js - Link
const { join } = require("path");
const { projects, ...baseConfig } = require("../../jest.config");
const pkg = require("./package.json");
module.exports = {
...baseConfig,
displayName: pkg.name,TypeError: Cannot read property 'type' of undefined
Occurred while linting <text>:2
at getActualAssignmentTargetImportStyles (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:84:21)
at gensyme54126958cf62 (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:300:32)
at TemplateManager._matchTemplate (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:128:11)
at newValue (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:290:17)
at /<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:33
at Array.forEach (<anonymous>)
at newVisitor.<computed> (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:14)
at /<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:49:25
at Array.forEach (<anonymous>)
at Object.emit (/<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:47:38)
Rule: import-style
- Message:
Cannot read property 'type' of undefined Occurred while linting <text>:2 - Path:
reakit/reakit/packages/reakit-test-utils/jest.config.js - Link
const { join } = require("path");
const { projects, ...baseConfig } = require("../../jest.config");
const pkg = require("./package.json");
module.exports = {
...baseConfig,
displayName: pkg.name,TypeError: Cannot read property 'type' of undefined
Occurred while linting <text>:2
at getActualAssignmentTargetImportStyles (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:84:21)
at gensyme54126958cf62 (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:300:32)
at TemplateManager._matchTemplate (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:128:11)
at newValue (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:290:17)
at /<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:33
at Array.forEach (<anonymous>)
at newVisitor.<computed> (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:14)
at /<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:49:25
at Array.forEach (<anonymous>)
at Object.emit (/<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:47:38)
Rule: import-style
- Message:
Cannot read property 'type' of undefined Occurred while linting <text>:2 - Path:
reakit/reakit/packages/reakit-utils/jest.config.js - Link
const { join } = require("path");
const { projects, ...baseConfig } = require("../../jest.config");
const pkg = require("./package.json");
module.exports = {
...baseConfig,
displayName: pkg.name,TypeError: Cannot read property 'type' of undefined
Occurred while linting <text>:2
at getActualAssignmentTargetImportStyles (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:84:21)
at gensyme54126958cf62 (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:300:32)
at TemplateManager._matchTemplate (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:128:11)
at newValue (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:290:17)
at /<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:33
at Array.forEach (<anonymous>)
at newVisitor.<computed> (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:14)
at /<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:49:25
at Array.forEach (<anonymous>)
at Object.emit (/<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:47:38)
Rule: import-style
- Message:
Cannot read property 'type' of undefined Occurred while linting <text>:2 - Path:
reakit/reakit/packages/reakit-warning/jest.config.js - Link
const { join } = require("path");
const { projects, ...baseConfig } = require("../../jest.config");
const pkg = require("./package.json");
module.exports = {
...baseConfig,
displayName: pkg.name,TypeError: Cannot read property 'type' of undefined
Occurred while linting <text>:2
at getActualAssignmentTargetImportStyles (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:84:21)
at gensyme54126958cf62 (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:300:32)
at TemplateManager._matchTemplate (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:128:11)
at newValue (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:290:17)
at /<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:33
at Array.forEach (<anonymous>)
at newVisitor.<computed> (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:14)
at /<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:49:25
at Array.forEach (<anonymous>)
at Object.emit (/<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:47:38)
Rule: import-style
- Message:
Cannot read property 'type' of undefined Occurred while linting <text>:2 - Path:
reakit/reakit/packages/website/jest.config.js - Link
const { join } = require("path");
const { projects, ...baseConfig } = require("../../jest.config");
const pkg = require("./package.json");
module.exports = {
...baseConfig,
displayName: pkg.name,TypeError: Cannot read property 'type' of undefined
Occurred while linting <text>:2
at getActualAssignmentTargetImportStyles (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:84:21)
at gensyme54126958cf62 (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-plugin-unicorn/rules/import-style.js:300:32)
at TemplateManager._matchTemplate (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:128:11)
at newValue (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:290:17)
at /<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:33
at Array.forEach (<anonymous>)
at newVisitor.<computed> (/<root-path-removed>/eslint-remote-tester/configs/node_modules/eslint-template-visitor/lib/index.js:300:14)
at /<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:49:25
at Array.forEach (<anonymous>)
at Object.emit (/<root-path-removed>/eslint-remote-tester/node_modules/eslint/lib/linter/safe-emitter.js:47:38)