mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-13 17:57:11 +00:00
64a39ae460
There was a pre-existing jshint config (.jshintrc) file that this upgrades based on the equivalent files for VisualEditor and OOjs UI. Change-Id: I3ecb0e65cc7ff090b7457be895917fbd8b8afd18
98 lines
1.7 KiB
Plaintext
98 lines
1.7 KiB
Plaintext
{
|
|
"requireCurlyBraces": [
|
|
"if",
|
|
"else",
|
|
"for",
|
|
"while",
|
|
"do",
|
|
"try",
|
|
"catch"
|
|
],
|
|
"requireSpaceAfterKeywords": [
|
|
"if",
|
|
"else",
|
|
"for",
|
|
"while",
|
|
"do",
|
|
"switch",
|
|
"return",
|
|
"try",
|
|
"catch",
|
|
"function"
|
|
],
|
|
"requireSpaceBeforeBlockStatements": true,
|
|
"requireParenthesesAroundIIFE": true,
|
|
"requireSpacesInConditionalExpression": true,
|
|
"disallowSpacesInNamedFunctionExpression": {
|
|
"beforeOpeningRoundBrace": true
|
|
},
|
|
"disallowSpacesInFunctionDeclaration": {
|
|
"beforeOpeningRoundBrace": true
|
|
},
|
|
"requireMultipleVarDecl": "onevar",
|
|
"requireBlocksOnNewline": 1,
|
|
"disallowEmptyBlocks": true,
|
|
"requireSpacesInsideObjectBrackets": "all",
|
|
"disallowDanglingUnderscores": true,
|
|
"disallowSpaceAfterObjectKeys": true,
|
|
"requireCommaBeforeLineBreak": true,
|
|
"disallowSpaceAfterPrefixUnaryOperators": [
|
|
"++",
|
|
"--",
|
|
"+",
|
|
"-",
|
|
"~",
|
|
"!"
|
|
],
|
|
"disallowSpaceBeforePostfixUnaryOperators": [
|
|
"++",
|
|
"--"
|
|
],
|
|
"disallowSpaceBeforeBinaryOperators": [
|
|
","
|
|
],
|
|
"requireSpaceBeforeBinaryOperators": [
|
|
"=",
|
|
"+",
|
|
"-",
|
|
"/",
|
|
"*",
|
|
"==",
|
|
"===",
|
|
"!=",
|
|
"!==",
|
|
">",
|
|
">=",
|
|
"<",
|
|
"<="
|
|
],
|
|
"requireSpaceAfterBinaryOperators": [
|
|
"=",
|
|
"+",
|
|
"-",
|
|
"/",
|
|
"*",
|
|
"==",
|
|
"===",
|
|
"!=",
|
|
"!==",
|
|
">",
|
|
">=",
|
|
"<",
|
|
"<="
|
|
],
|
|
"requireCamelCaseOrUpperCaseIdentifiers": true,
|
|
"disallowKeywords": [ "with" ],
|
|
"disallowMultipleLineBreaks": true,
|
|
"validateLineBreaks": "LF",
|
|
"validateQuoteMarks": "'",
|
|
"disallowMixedSpacesAndTabs": true,
|
|
"disallowTrailingWhitespace": true,
|
|
"disallowTrailingComma": true,
|
|
"disallowKeywordsOnNewLine": ["else"],
|
|
"requireLineFeedAtFileEnd": true,
|
|
"requireCapitalizedConstructors": true,
|
|
"requireDotNotation": true,
|
|
"disallowYodaConditions": true
|
|
}
|