Skip to content
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

jsx-tag-spacing crashes if options object isn't passed #955

Closed
daltones opened this issue Nov 14, 2016 · 1 comment
Closed

jsx-tag-spacing crashes if options object isn't passed #955

daltones opened this issue Nov 14, 2016 · 1 comment
Assignees
Labels

Comments

@daltones
Copy link
Contributor

This simple configuration makes jsx-tag-spacing crash:

'react/jsx-tag-spacing': 1

A quick fix is:

'react/jsx-tag-spacing': [1, {}]

Error:

TypeError: Error while loading rule 'react/jsx-tag-spacing': Cannot read property 'hasOwnProperty' of undefined
    at Object.create ([...]/node_modules/eslint-plugin-react/lib/rules/jsx-tag-spacing.js:208:60)
@ljharb
Copy link
Member

ljharb commented Nov 14, 2016

Thanks - we shouldn't ever be calling .hasOwnProperty on values directly.

@ljharb ljharb self-assigned this Nov 14, 2016
ljharb added a commit to ljharb/eslint-plugin-react that referenced this issue Nov 14, 2016
@ljharb ljharb added the bug label Nov 14, 2016
ljharb added a commit to ljharb/eslint-plugin-react that referenced this issue Nov 14, 2016
ljharb added a commit to ljharb/eslint-plugin-react that referenced this issue Nov 15, 2016
ljharb added a commit to ljharb/eslint-plugin-react that referenced this issue Jan 14, 2017
ljharb added a commit to ljharb/eslint-plugin-react that referenced this issue Jan 14, 2017
ljharb added a commit to ljharb/eslint-plugin-react that referenced this issue Jan 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants