mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 20:07:49 +00:00
Say goodbye to jscs.
This commit is contained in:
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@@ -67,7 +67,7 @@ established in the code.
|
|||||||
[JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for
|
[JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for
|
||||||
functions.
|
functions.
|
||||||
|
|
||||||
Guidelines are enforced using [JSCS](https://www.npmjs.com/package/jscs):
|
Guidelines are enforced using [ESLint](https://www.npmjs.com/package/eslint):
|
||||||
```bash
|
```bash
|
||||||
$ npm run style
|
$ npm run style
|
||||||
```
|
```
|
||||||
|
|||||||
97
.jscsrc
97
.jscsrc
@@ -1,97 +0,0 @@
|
|||||||
{
|
|
||||||
"maxErrors": "2000",
|
|
||||||
"maximumLineLength": {
|
|
||||||
"value": 180,
|
|
||||||
"allExcept": ["comments", "functionSignature", "regex"]
|
|
||||||
},
|
|
||||||
"requireCurlyBraces": [
|
|
||||||
"if",
|
|
||||||
"else",
|
|
||||||
"for",
|
|
||||||
"while",
|
|
||||||
"do",
|
|
||||||
"try",
|
|
||||||
"catch"
|
|
||||||
],
|
|
||||||
"requireOperatorBeforeLineBreak": [
|
|
||||||
"=",
|
|
||||||
"+",
|
|
||||||
"-",
|
|
||||||
"/",
|
|
||||||
"*",
|
|
||||||
"==",
|
|
||||||
"===",
|
|
||||||
"!=",
|
|
||||||
"!==",
|
|
||||||
">",
|
|
||||||
">=",
|
|
||||||
"<",
|
|
||||||
"<="
|
|
||||||
],
|
|
||||||
"requireSpaceAfterKeywords": [
|
|
||||||
"if",
|
|
||||||
"else",
|
|
||||||
"for",
|
|
||||||
"while",
|
|
||||||
"do",
|
|
||||||
"switch",
|
|
||||||
"return",
|
|
||||||
"try",
|
|
||||||
"catch"
|
|
||||||
],
|
|
||||||
"requireSpaceBeforeBinaryOperators": [
|
|
||||||
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
|
|
||||||
"&=", "|=", "^=",
|
|
||||||
|
|
||||||
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
|
|
||||||
"|", "^", "&&", "||", "===", "==", ">=",
|
|
||||||
"<=", "<", ">", "!=", "!=="
|
|
||||||
],
|
|
||||||
"requireSpacesInFunctionExpression": {
|
|
||||||
"beforeOpeningCurlyBrace": true
|
|
||||||
},
|
|
||||||
"requireCamelCaseOrUpperCaseIdentifiers": true,
|
|
||||||
"requireDotNotation": { "allExcept": ["keywords"] },
|
|
||||||
"requireEarlyReturn": true,
|
|
||||||
"requireLineFeedAtFileEnd": true,
|
|
||||||
"requireSemicolons": true,
|
|
||||||
"requireSpaceAfterBinaryOperators": true,
|
|
||||||
"requireSpacesInConditionalExpression": true,
|
|
||||||
"requireSpaceBeforeObjectValues": true,
|
|
||||||
"requireSpaceBeforeBlockStatements": true,
|
|
||||||
"requireSpacesInForStatement": true,
|
|
||||||
|
|
||||||
"validateIndentation": 2,
|
|
||||||
"validateParameterSeparator": ", ",
|
|
||||||
"validateQuoteMarks": { "mark": "'", "escape": true },
|
|
||||||
|
|
||||||
"disallowSpacesInAnonymousFunctionExpression": {
|
|
||||||
"beforeOpeningRoundBrace": true
|
|
||||||
},
|
|
||||||
"disallowSpacesInFunctionDeclaration": {
|
|
||||||
"beforeOpeningRoundBrace": true
|
|
||||||
},
|
|
||||||
"disallowSpacesInFunctionExpression": {
|
|
||||||
"beforeOpeningRoundBrace": true
|
|
||||||
},
|
|
||||||
"disallowKeywords": ["with"],
|
|
||||||
"disallowMixedSpacesAndTabs": true,
|
|
||||||
"disallowMultipleLineBreaks": true,
|
|
||||||
"disallowNewlineBeforeBlockStatements": true,
|
|
||||||
"disallowSpaceAfterObjectKeys": true,
|
|
||||||
"disallowSpaceAfterPrefixUnaryOperators": true,
|
|
||||||
"disallowSpacesInCallExpression": true,
|
|
||||||
"disallowSpacesInsideArrayBrackets": true,
|
|
||||||
"disallowSpacesInsideParentheses": true,
|
|
||||||
"disallowTrailingWhitespace": true,
|
|
||||||
"disallowUnusedVariables": true,
|
|
||||||
|
|
||||||
"jsDoc": {
|
|
||||||
"checkRedundantAccess": true,
|
|
||||||
"checkTypes": true,
|
|
||||||
"requireNewlineAfterDescription": true,
|
|
||||||
"requireParamDescription": true,
|
|
||||||
"requireParamTypes": true,
|
|
||||||
"requireReturnTypes": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -19,10 +19,10 @@
|
|||||||
"doc:sitehtml": "optional-dev-dependency marky-markdown@^9.0.1 && npm run doc:site && node lib/main/build-site",
|
"doc:sitehtml": "optional-dev-dependency marky-markdown@^9.0.1 && npm run doc:site && node lib/main/build-site",
|
||||||
"pretest": "npm run build",
|
"pretest": "npm run build",
|
||||||
"style": "npm run style:main && npm run style:fp && npm run style:perf && npm run style:test",
|
"style": "npm run style:main && npm run style:fp && npm run style:perf && npm run style:test",
|
||||||
"style:fp": "jscs fp/*.js lib/**/*.js",
|
"style:fp": "eslint fp/*.js lib/**/*.js",
|
||||||
"style:main": "jscs lodash.js",
|
"style:main": "eslint lodash.js",
|
||||||
"style:perf": "jscs perf/*.js perf/**/*.js",
|
"style:perf": "eslint perf/*.js perf/**/*.js",
|
||||||
"style:test": "jscs test/*.js test/**/*.js",
|
"style:test": "eslint test/*.js test/**/*.js",
|
||||||
"test": "npm run test:main && npm run test:fp",
|
"test": "npm run test:main && npm run test:fp",
|
||||||
"test:doc": "markdown-doctest doc/*.md",
|
"test:doc": "markdown-doctest doc/*.md",
|
||||||
"test:fp": "node test/test-fp",
|
"test:fp": "node test/test-fp",
|
||||||
@@ -46,7 +46,6 @@
|
|||||||
"glob": "^7.1.1",
|
"glob": "^7.1.1",
|
||||||
"istanbul": "0.4.5",
|
"istanbul": "0.4.5",
|
||||||
"jquery": "^3.1.1",
|
"jquery": "^3.1.1",
|
||||||
"jscs": "^3.0.7",
|
|
||||||
"lodash": "4.17.3",
|
"lodash": "4.17.3",
|
||||||
"lodash-doc-globals": "^0.1.1",
|
"lodash-doc-globals": "^0.1.1",
|
||||||
"markdown-doctest": "^0.9.1",
|
"markdown-doctest": "^0.9.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user