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

[@typescript-eslint/naming-convention] Fail with array spread syntax #1466

Closed
bodinsamuel opened this issue Jan 17, 2020 · 3 comments
Closed
Labels
package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look

Comments

@bodinsamuel
Copy link

bodinsamuel commented Jan 17, 2020

Repro

{
  "rules": {
        "@typescript-eslint/naming-convention": [
          "error",
          { "selector": "variableLike", "format": ["camelCase"] },
        ],
  }
}
const [, shouldRender] = useState<object>({});

Expected Result
no error

Actual Result

TypeError: Cannot read property 'type' of null
Occurred while linting [...]/index.tsx:31
    at getIdentifiersFromPattern ([...]/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js:458:21)
    at [...]/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js:464:17
[...]

Versions

package version
@typescript-eslint/eslint-plugin 2.16.0
@typescript-eslint/parser 2.16.0
TypeScript 3.7.4
ESLint 6.6.0
node 12.14.1
yarn 1.21.1
@bodinsamuel bodinsamuel added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Jan 17, 2020
@armano2
Copy link
Member

armano2 commented Jan 17, 2020

this issue has been already addressed in #1450

@bodinsamuel
Copy link
Author

oh closing then, this will be on next release I suppose ? ☺️ 💪

@armano2
Copy link
Member

armano2 commented Jan 17, 2020

yes, (it should be monday) or you can use alpha version for now (for this few days)
https://github.com/typescript-eslint/typescript-eslint#package-versions

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look
Projects
None yet
Development

No branches or pull requests

2 participants