-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
@typescript-eslint/semi function declarations should have semi at end, throws error #971
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
Comments
@ctfrancia the whole idea behind using the prettier plugins is that you don’t use style based rules like that - behind the scenes it’s letting your prettier setup handle it. You should remove the rules: {} config you currently have and everything should work as expected. Feel free to reopen if that does not solve your issues |
@JamesHenry thank you for your reply, however, as you could imagine, I didn't just run into the first sign of trouble and decide to open up an issue for it. I have previously had the |
Please provide a full repro so we can help you out |
I can see you are using an old version of our packages, it could be that you are using older versions of the others as well, or the combination of versions you are using are incompatible. Right now there is not enough information, but it should hopefully be quite quick to prepare a minimal reproduction. Thanks! |
I'm unable to reproduce this against master. typescript-eslint/packages/eslint-plugin/tests/rules/semi.test.ts Lines 39 to 54 in aeea4cd
typescript-eslint/packages/eslint-plugin/tests/rules/semi.test.ts Lines 318 to 357 in aeea4cd
Support for class properties was added in #409 This is not a bug within the plugin - something is misconfigured on your end. You should try using the I'm going to close this for housekeeping purposes, as it's not an active bug within the plugin. |
Repro
Expected Result
I would like to have it recognize that it's a definition and therefore a semicolon is ok
Actual Result
error as stated above. Whenever I try to remove the semi colon then there is a prettier issue and when I save the semi colon is placed back, which makes sense.
Additional Info
this is a cross post
I would like to note that I have tried many different possibilities with rules, adding, removing, etc.
tried following this section to disable it/allow a semi colon at the end
Versions
@typescript-eslint/eslint-plugin
1.13.0
@typescript-eslint/parser
1.13.0
TypeScript
3.6.3
ESLint
6.3.0
node
12.7.0
npm
6.10.2
The text was updated successfully, but these errors were encountered: