Skip to content

Cannot read proprty 'properties' of undefined #390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Vrashq opened this issue Feb 15, 2018 · 3 comments
Closed

Cannot read proprty 'properties' of undefined #390

Vrashq opened this issue Feb 15, 2018 · 3 comments
Labels

Comments

@Vrashq
Copy link

Vrashq commented Feb 15, 2018

Tell us about your environment

  • ESLint Version: 4.17.0
  • eslint-plugin-vue Version: 4.2.2
  • Node Version: 6.11.5

Please show your full configuration:

module.exports = {
    extends: [
        // add more generic rulesets here, such as:
        // 'eslint:recommended',
        'plugin:vue/recommended'
    ],
    rules: {
        // override/add rules settings here, such as:
        // 'vue/no-unused-vars': 'error'
    },
    parserOptions: {
        parser: "babel-eslint",
        ecmaVersion: 2017,
        sourceType: "module"
    }
};



When I ran the command "eslint --ext .js,.vue resources/assets/js", I've got the error below :

Cannot read property 'properties' of undefined
TypeError: Cannot read property 'properties' of undefined
    at Object.getComputedProperties (/home/jlenaou/Documents/teachme-vue/node_modules/eslint-plugin-vue/lib/utils/index.js:326:51)
    at Object.assign.utils.executeOnVue (/home/jlenaou/Documents/teachme-vue/node_modules/eslint-plugin-vue/lib/rules/no-async-in-computed-properties.js:133:42)
    at CallExpression:exit (/home/jlenaou/Documents/teachme-vue/node_modules/eslint-plugin-vue/lib/utils/index.js:472:9)
    at listeners.(anonymous function).forEach.listener (/home/jlenaou/Documents/teachme-vue/node_modules/eslint/lib/util/safe-emitter.js:47:58)
    at Array.forEach (native)
    at Object.emit (/home/jlenaou/Documents/teachme-vue/node_modules/eslint/lib/util/safe-emitter.js:47:38)
    at NodeEventGenerator.applySelector (/home/jlenaou/Documents/teachme-vue/node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (/home/jlenaou/Documents/teachme-vue/node_modules/eslint/lib/util/node-event-generator.js:280:22)
    at NodeEventGenerator.leaveNode (/home/jlenaou/Documents/teachme-vue/node_modules/eslint/lib/util/node-event-generator.js:303:14)
    at CodePathAnalyzer.leaveNode (/home/jlenaou/Documents/teachme-vue/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:630:23)
    at Traverser.leave [as _leave] (/home/jlenaou/Documents/teachme-vue/node_modules/eslint/lib/linter.js:1009:32)

Thank you :)

@mysticatea
Copy link
Member

Thank you for the report.

Would you provide repro steps?
Maybe can you make it on our online demo?

@Vrashq
Copy link
Author

Vrashq commented Feb 15, 2018

I found the piece of code that makes it crash here

If you remove the brackets in the line 5, after "component", the error disapear.

@mysticatea
Copy link
Member

I confirmed it. Thank you very much!!

@mysticatea mysticatea added the bug label Feb 16, 2018
michalsnik pushed a commit that referenced this issue Apr 1, 2018
* Add Vue.extend support, add missing info about Vue.mixin check in readme

* Docs: fixes wording in docs (#372)

* Fix: fix script-indent to prevent removing <script> tag (fixes #367) (#374)

*  [Update] Make `vue/max-attributes-per-line` fixable (#380)

* [Update] Make `vue/max-attributes-per-line` fixable

* [fix] bug and style

* [fix] Switch indent calculation method with node and attribute

* [fix] don't handle indentation

* [add] autofix test max-attributes-per-line.js

* Update: make `vue/order-in-components` fixable (#381)

* [Update] Make `vue/order-in-components` fixable

This Commit makes `vue/order-in-components` fixable.
In case of `The "A" property should be above the "B" property` error, autofix will move A before B

* [fix] fail test at [email protected]

* [fix] If there is a possibility of a side effect, don't autofix

* [fix] failed test at node v4

* [update] use Traverser

* [fix] failed test [email protected]

* [fix] I used `output: null` to specify "not fix"

* Fix: no-async-in-computed-properties crash (fixes #390)

* Fix: valid-v-on false positive (fixes #351)

* Fix: indent rules false positive (fixes #375)

* [New] Add `prop-name-casing`

* fix message and category

* fix category

* fix test message

* Set category to undefined

* Add more tests and fix edge case scenario

* attribute order linting

* updating docs, tests and category

* [Update] Make `vue/attributes-order` fixable

* [fix] That `vue/attributes-order` got duplicated when merging README

* [add] messed order properties test case

* [fix] unify input on test case
michalsnik pushed a commit that referenced this issue Jul 11, 2018
* Add Vue.extend support, add missing info about Vue.mixin check in readme

* Docs: fixes wording in docs (#372)

* Fix: fix script-indent to prevent removing <script> tag (fixes #367) (#374)

*  [Update] Make `vue/max-attributes-per-line` fixable (#380)

* [Update] Make `vue/max-attributes-per-line` fixable

* [fix] bug and style

* [fix] Switch indent calculation method with node and attribute

* [fix] don't handle indentation

* [add] autofix test max-attributes-per-line.js

* Update: make `vue/order-in-components` fixable (#381)

* [Update] Make `vue/order-in-components` fixable

This Commit makes `vue/order-in-components` fixable.
In case of `The "A" property should be above the "B" property` error, autofix will move A before B

* [fix] fail test at [email protected]

* [fix] If there is a possibility of a side effect, don't autofix

* [fix] failed test at node v4

* [update] use Traverser

* [fix] failed test [email protected]

* [fix] I used `output: null` to specify "not fix"

* Fix: no-async-in-computed-properties crash (fixes #390)

* Fix: valid-v-on false positive (fixes #351)

* Fix: indent rules false positive (fixes #375)

* [New] Add `prop-name-casing`

* fix message and category

* fix category

* fix test message

* Set category to undefined

* Add more tests and fix edge case scenario

* attribute order linting

* updating docs, tests and category

*  [New] Add rule `vue/no-use-v-if-with-v-for` (#2)

* [fix] `meta.docs.description` should not end with `.`  consistent-docs-description

* [fix] lint error caused by merging the master for conflict resolution

* [fix] That `vue/attributes-order` got duplicated when merging README

* [fixed] document `correct` and `incorrect` the contrary stated

* [fixed] error message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants