We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
parent
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
What code were you trying to parse?
export enum SomeEnum { a }
What did you expect to happen?
Node for SomeEnum identifier should have a .parent to inspect. E.g., as done in https://github.com/sindresorhus/eslint-plugin-unicorn/blob/79a8cd69669b94baec9f4864f08f6be0cac43805/rules/prevent-abbreviations.js#L436
SomeEnum
.parent
What actually happened?
{ type: 'Identifier', name: 'SomeEnum', range: [ 12, 20 ], loc: { start: { line: 1, column: 12 }, end: { line: 1, column: 20 } } } eslint:linter An error occurred while traversing +2s eslint:linter Filename: /.../simple-test.ts +0ms eslint:linter Line: 1 +0ms eslint:linter Parser Options: { ecmaVersion: 9, ecmaFeatures: { globalReturn: false }, sourceType: 'module', project: './tsconfig.json', tsConfigRootDir: './' } +0ms eslint:linter Parser Path: /.../node_modules/@typescript-eslint/parser/dist/parser.js +0ms eslint:linter Settings: {} +0ms Cannot read property 'type' of undefined Occurred while linting /.../simple-test.ts:1
Versions
@typescript-eslint/typescript-estree
1.5.0
TypeScript
3.3.4000
node
10.15.3
npm
6.9.0
Possibly related to #370
The text was updated successfully, but these errors were encountered:
prevent-abbreviation
@typescript-eslint/parser
docs: improve docs search, close typescript-eslint#381
d0df679
Successfully merging a pull request may close this issue.
What code were you trying to parse?
What did you expect to happen?
Node for
SomeEnum
identifier should have a.parent
to inspect. E.g., as done in https://github.com/sindresorhus/eslint-plugin-unicorn/blob/79a8cd69669b94baec9f4864f08f6be0cac43805/rules/prevent-abbreviations.js#L436What actually happened?
Versions
@typescript-eslint/typescript-estree
1.5.0
TypeScript
3.3.4000
node
10.15.3
npm
6.9.0
Possibly related to #370
The text was updated successfully, but these errors were encountered: