Skip to content

feat(eslint-plugin): add eslint rule no-useless-constructor #167

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

Merged
merged 9 commits into from
Feb 1, 2019
Merged

feat(eslint-plugin): add eslint rule no-useless-constructor #167

merged 9 commits into from
Feb 1, 2019

Conversation

armano2
Copy link
Collaborator

@armano2 armano2 commented Jan 31, 2019

This PR adds wrapper around eslint no-useless-constructor to fix issues from #15 and #48

fixes: #15

@codecov
Copy link

codecov bot commented Feb 1, 2019

Codecov Report

Merging #167 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #167      +/-   ##
==========================================
+ Coverage   95.76%   95.78%   +0.02%     
==========================================
  Files          50       51       +1     
  Lines        2526     2541      +15     
  Branches      373      373              
==========================================
+ Hits         2419     2434      +15     
  Misses         63       63              
  Partials       44       44
Impacted Files Coverage Δ
.../eslint-plugin/lib/rules/no-useless-constructor.js 100% <100%> (ø)

@tsofist
Copy link

tsofist commented Sep 3, 2019

I still have a problem with d.ts file :(

declare class MySuperClass {
    constructor(argument1: number);
}

Error

TypeError: Cannot read property 'body' of null
Occurred while linting test.d.ts:2
    at checkForConstructor (node_modules\eslint\lib\rules\no-useless-constructor.js:169:42)

@bradzacher
Copy link
Member

please don't necro old PRs.
Open an issue instead.

@typescript-eslint typescript-eslint locked as resolved and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no-useless-constructor: class declaration with constructor throws exception
5 participants