Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Semicolons become mandatory after a class property #2112

Closed
ChrisCinelli opened this issue Jan 31, 2016 · 6 comments
Closed

Semicolons become mandatory after a class property #2112

ChrisCinelli opened this issue Jan 31, 2016 · 6 comments
Labels

Comments

@ChrisCinelli
Copy link

Babel 6.4 started reporting errors when a class property do not end in a semicolon.
jscs seems not even be bother that the semicolons are missing there.

In particular it would be great if --fix- could fix this problem since we now have hundreds of classes and almost all files are missing multiple semicolons.

See also http://stackoverflow.com/questions/35103415/autofix-babel-6-4-a-semicolon-is-required-after-a-class-property

@hzoo
Copy link
Member

hzoo commented Jan 31, 2016

Yeah you can use the requireSemicolons rule for this.

@markelog
Copy link
Member

@hzoo so we can close this, right?

@ChrisCinelli
Copy link
Author

I am using atom-jscs. This is my .jscrc:

{
  "preset": "airbnb",
  "disallowSpacesInAnonymousFunctionExpression": null,
  "validateLineBreaks": "LF",
  "validateIndentation": 2,
  "excludeFiles": ["build/**", "node_modules/**"],
  "requireSemicolons" : true,
  "esnext": true,
  "validateQuoteMarks": null
}

Class properties without a semicolon are not highlighted with a linting error and not fixed.

@hzoo
Copy link
Member

hzoo commented Feb 1, 2016

Did you update to jscs 2.9.0? It was added in that version

@ChrisCinelli
Copy link
Author

No, I am using Atom-linter-jscs that apparently has not update yet.
See also : AtomLinter/linter-jscs#171 and https://github.com/AtomLinter/linter-jscs/commits/master/package.json

@hzoo
Copy link
Member

hzoo commented Feb 2, 2016

You should be able to reinstall that package and it would have the latest dependency right? It's using ^ https://github.com/AtomLinter/linter-jscs/blob/master/package.json#L18

Either way you should be good to go when they update so goina close

@hzoo hzoo closed this as completed Feb 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants