Skip to content

Instantly share code, notes, and snippets.

@zoobestik
Last active December 19, 2015 18:29
Show Gist options
  • Save zoobestik/5999156 to your computer and use it in GitHub Desktop.
Save zoobestik/5999156 to your computer and use it in GitHub Desktop.
Тест-кейс для jscs с ключем от keyword 'for'
{
"requireCurlyBraces": ["if", "else", "for", "while", "do"],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return"],
"disallowQuotedKeysInObjects": true,
"disallowSpaceAfterObjectKeys": true,
"requireSpacesInsideObjectBrackets": "allButNested",
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["!", "?", "+", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireLeftStickedOperators": [","],
"disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
"disallowKeywords": ["with"],
"disallowMultipleLineBreaks": true,
"disallowKeywordsOnNewLine": ["else"],
"requireLineFeedAtFileEnd": true,
"validateJSDoc": {
"checkParamNames": true,
"requireParamTypes": true,
"checkRedundantParams": true
}
}
node_modules/.bin/jscs test.js
var test = {
tag: 'label',
attrs: { for: 'id_fontsize' },
content: ' — размер шрифта в строке поиска'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment