Class: Indentation
Defined in: | node_modules/gulp-coffeelint/node_modules/coffeelint/src/rules/indentation.coffee |
Variables Summary
- rule =
-
{ name: 'indentation', value: 2, level: 'error', message: 'Line contains inconsistent indentation', description: "This rule imposes a standard number of spaces to be used for\nindentation. Since whitespace is significant in CoffeeScript, it's\ncritical that a project chooses a standard indentation format and\nstays consistent. Other roads lead to darkness. <pre> <code>#\nEnabling this option will prevent this ugly\n###\nbut otherwise valid CoffeeScript.\n###\ntwoSpaces = () ->\n fourSpaces = () ->\n eightSpaces = () ->\n 'this is valid CoffeeScript'\n\n</code>\n</pre>\nTwo space indentation is enabled by default." }
- tokens =
-
['INDENT', '[', ']', '.']
Instance Method Summary
- # (void) lintToken(token, tokenApi) Return an error if the given indentation token is not correct.
- # (void) inArray() Return true if the current token is inside of an array.
- # (void) lintArray(token) Lint the given array token.
- # (void) handleChain(tokenApi, expected)
- # (void) getCorrectIndent(tokenApi) Returns a corrected INDENT value if the current line is part of a chained call.
Constructor Details
#
(void)
constructor()
Instance Method Details
#
(void)
lintToken(token, tokenApi)
Return an error if the given indentation token is not correct.
#
(void)
inArray()
Return true if the current token is inside of an array.
#
(void)
lintArray(token)
Lint the given array token.
#
(void)
handleChain(tokenApi, expected)
#
(void)
getCorrectIndent(tokenApi)
Returns a corrected INDENT value if the current line is part of a chained call. Otherwise returns original INDENT value.