Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

Rule Suggestion: Require semicolon after class static properties #43

Closed
IanVS opened this issue Jan 7, 2016 · 12 comments
Closed

Rule Suggestion: Require semicolon after class static properties #43

IanVS opened this issue Jan 7, 2016 · 12 comments

Comments

@IanVS
Copy link

IanVS commented Jan 7, 2016

Static class properties require a semicolon, as pointed out in https://phabricator.babeljs.io/T6873. Babel is now bombing with a compilation error if it doesn't find a semicolon. It would be super beneficial to have a linting rule to catch this.

@oztune
Copy link

oztune commented Feb 9, 2016

+1

@hzoo
Copy link
Member

hzoo commented Feb 9, 2016

We're goina revert to previous behavior since they discussed this more in tc39/proposal-class-public-fields#26 (comment)

babel/babel#3332

@IanVS
Copy link
Author

IanVS commented Feb 9, 2016

Might still be nice to have a linting rule to enforce them, yes?

@hzoo
Copy link
Member

hzoo commented Feb 9, 2016

Yeah, either way yes for users that wan't semicolons

@Download
Copy link

We're goina revert to previous behavior

Thanks!!! I hated having to add semicolons to all my source files! ... not sure if I'm going to revert them all but at least I can write the 'cleaner' semicolon-less version again now. Yay!!

@IanVS
Copy link
Author

IanVS commented Feb 18, 2016

@Download, off-topic for this issue, but if you want to remove them, you can probably use ESLint's --fix

@ghost
Copy link

ghost commented Feb 26, 2016

Do we still haven't got such a rule? Would be nice to have one.

+1

@mjrussell
Copy link

This would still be a great feature (both static and regular class properties) for those who enforce JS with semicolons.

+1

@jquense
Copy link
Contributor

jquense commented Mar 3, 2016

so the only way such a rule would make sense here is as an extension of the builtin semi rule that last enforces them in this case. if anyone wants to PR that I'd happily accept

@jeffshaver
Copy link

Would also like the option to disallow them unless necessary.

@elodszopos
Copy link

Hey guys, kind of an old thread. Anything going on with this one? Would be amazing to have this.

@r3nya
Copy link

r3nya commented Oct 13, 2016

Yeah! @elodszopos +1

aaronjensen added a commit to aaronjensen/eslint-plugin-babel that referenced this issue Feb 17, 2017
aaronjensen added a commit to aaronjensen/eslint-plugin-babel that referenced this issue Feb 17, 2017
aaronjensen added a commit to aaronjensen/eslint-plugin-babel that referenced this issue Feb 18, 2017
aaronjensen added a commit to aaronjensen/eslint-plugin-babel that referenced this issue Feb 21, 2017
kentcdodds pushed a commit that referenced this issue Feb 27, 2017
* Add semi from eslint

* Add ClassProperty support to semi rule

Fixes #43
nicolo-ribaudo pushed a commit to babel/babel that referenced this issue Nov 14, 2019
* Add semi from eslint

* Add ClassProperty support to semi rule

Fixes babel/eslint-plugin-babel#43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants