Skip to content
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

key-spacing can't align groups with getters/setters #4792

btmills opened this Issue Dec 23, 2015 · 0 comments


None yet
1 participant
Copy link

btmills commented Dec 23, 2015

Consider the following test case:

    code: [
        "    a: 42,",
        "    get b() { return 42; }",
    options: [{
        align: "colon"
  AssertionError: Should have no errors but had 1: [ { ruleId: 'key-spacing',
    severity: 1,
    message: 'Missing space after key "a".',
    line: 2,
    column: 5,
    nodeType: 'Identifier',
    source: '    a: 42,' } ]

I can't find any level of alignment that it considers valid.

For alignment, we should skip getters and setters just like we do other properties that lack a colon.

Working on this.

@btmills btmills closed this in e236e5e Dec 23, 2015

ilyavolodin added a commit that referenced this issue Dec 23, 2015

Merge pull request #4793 from eslint/issue4792
Fix: Handle getters and setters in key-spacing (fixes #4792)

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.