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

Rewrite semicolonRule #2240

Merged
merged 5 commits into from
Mar 10, 2017
Merged

Rewrite semicolonRule #2240

merged 5 commits into from
Mar 10, 2017

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Feb 25, 2017

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

Simplify ASI checks for TypeAlias, import, export and debugger
Simplify checks for semicolon
[bugfix] semicolon Ignore comments when checking for unnecessary semicolon
[bugfix] semicolon Don't report unnecessary semicolon when followed by regex literal
[enhancement] semicolon New check for export statements, function overloads and shorthand module declaration
[enhancement] semicolon Report unnecessary semicolons in classes and in statement position (for option "always" too)
[enhancement] semicolon check for semicolon after method overload

Is there anything you'd like reviewers to focus on?

This is just the beginning to make option "never" fully ASI compatible.

Simplify ASI checks for TypeAlias, import, export and debugger
Simplify checks for semicolon
[bugfix] Ignore comments when checking for unnecessary semicolon
[bugfix] Don't report unnecessary semicolon when followed by regex literal
[enhancement] New check for export statements
[enhancement] Report unnecessary semicolons in classes and in statement position (for option "always"
 too)
Fix lint errors
[enhancement] check for semicolon after method overload
[enhancement] check for semicolon in type literals. To restore the old behaviour use the new options `ignore-type-literals`
[new-rule-option] `ignore-type-literals` added to `semicolon`
@ajafff
Copy link
Contributor Author

ajafff commented Mar 8, 2017

I reverted the changes regarding type literals for now, because they caused too much failures.
The rule will need better config options for this to be usable. I will add that in a followup PR once this one lands.

Copy link
Contributor

@nchen63 nchen63 left a comment

Choose a reason for hiding this comment

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

lgtm

@nchen63
Copy link
Contributor

nchen63 commented Mar 10, 2017

please resolve conflict

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants