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" rule issue #2311

ALF-er opened this issue Apr 14, 2015 · 2 comments


None yet
4 participants
Copy link

commented Apr 14, 2015

Hello, I'm using eslint v0.19.0 and receive error

            widths =, // Width of keys, including
TypeError: undefined is not a function
    at verifyGroupAlignment (C:\Users\Illia\AppData\Roaming\npm\node_modules\eslint\lib\rules\key-spacing.js:217:33)
    at C:\Users\Illia\AppData\Roaming\npm\node_modules\eslint\lib\rules\key-spacing.js:251:13
    at Array.forEach (native)
    at verifyAlignment (C:\Users\Illia\AppData\Roaming\npm\node_modules\eslint\lib\rules\key-spacing.js:250:28)
    at EventEmitter.ObjectExpression (C:\Users\Illia\AppData\Roaming\npm\node_modules\eslint\lib\rules\key-spacing.js:292:21)
    at emitOne (events.js:82:20)
    at EventEmitter.emit (events.js:166:7)
    at Controller.controller.traverse.enter (C:\Users\Illia\AppData\Roaming\npm\node_modules\eslint\lib\eslint.js:726:25)
    at Controller.__execute (C:\Users\Illia\AppData\Roaming\npm\node_modules\eslint\node_modules\estraverse\estraverse.js:393:31)
    at Controller.traverse (C:\Users\Illia\AppData\Roaming\npm\node_modules\eslint\node_modules\estraverse\estraverse.js:491:28)

on file

/*eslint key-spacing: [2, { "align": "value" }]*/

        user: 2

It's bug, or I miss something?

@nzakas nzakas added the triage label Apr 14, 2015


This comment has been minimized.

Copy link

commented Apr 14, 2015

#2238 broke key-spacing on single-property object literals with alignment enabled. Working on this.

@btmills btmills added bug rule labels Apr 14, 2015

@btmills btmills closed this in ac77fd8 Apr 14, 2015

nzakas added a commit that referenced this issue Apr 14, 2015

Merge pull request #2315 from eslint/issue2311
Fix: key-spacing with single properties (fixes #2311)

This comment has been minimized.

Copy link

commented Apr 15, 2015

My apologies for introducing this regression, and thanks for fixing @btmills.

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

@eslint eslint bot added the archived due to age label Feb 7, 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.