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

fix(eslint-plugin): handle const; #633

Merged
merged 2 commits into from Jun 28, 2019
Merged

Conversation

bradzacher
Copy link
Member

Fixes #441

@bradzacher bradzacher added the bug Something isn't working label Jun 21, 2019
@@ -175,6 +175,15 @@ export default util.createRule<Options, MessageIds>({
}
},

VariableDeclaration(node: TSESTree.VariableDeclaration) {
// https://github.com/typescript-eslint/typescript-eslint/issues/441
if (node.declarations.length === 0) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏👏👏
I faced the exact same issue and debugging the code I was right here to add this! Thanks for being on top of it. <3 @bradzacher

@codecov
Copy link

codecov bot commented Jun 28, 2019

Codecov Report

Merging #633 into master will decrease coverage by 0.03%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##           master     #633      +/-   ##
==========================================
- Coverage   94.37%   94.33%   -0.04%     
==========================================
  Files         109      109              
  Lines        4535     4540       +5     
  Branches     1252     1254       +2     
==========================================
+ Hits         4280     4283       +3     
- Misses        148      149       +1     
- Partials      107      108       +1
Impacted Files Coverage Δ
...nt-plugin/src/rules/consistent-type-definitions.ts 90% <ø> (ø) ⬆️
...nt-plugin/src/rules/indent-new-do-not-use/index.ts 98.39% <0%> (-0.53%) ⬇️
packages/eslint-plugin/src/rules/indent.ts 92.3% <100%> (+0.64%) ⬆️
packages/eslint-plugin/src/rules/prefer-for-of.ts 88.57% <100%> (ø) ⬆️

@bradzacher bradzacher merged commit 430d628 into master Jun 28, 2019
@bradzacher bradzacher deleted the empty-variable-declaration branch June 28, 2019 15:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESLint: Cannot read property 'loc' of undefined. Please see the 'ESLint' output channel for details.
2 participants