mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57:49 +00:00
Porting applicable jscs configuration to eslint.
* jsdocs validation off now
This commit is contained in:
38
.eslintrc.js
38
.eslintrc.js
@@ -13,8 +13,16 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'rules': {
|
'rules': {
|
||||||
|
'array-bracket-spacing': ['error', 'never'],
|
||||||
|
|
||||||
'comma-dangle': ['error', 'never'],
|
'comma-dangle': ['error', 'never'],
|
||||||
|
|
||||||
|
'camelcase': ['error', {
|
||||||
|
'properties': 'never'
|
||||||
|
}],
|
||||||
|
|
||||||
|
'eol-last': ['error'],
|
||||||
|
|
||||||
'indent': ['error', 2, {
|
'indent': ['error', 2, {
|
||||||
'SwitchCase': 1
|
'SwitchCase': 1
|
||||||
}],
|
}],
|
||||||
@@ -32,6 +40,36 @@ module.exports = {
|
|||||||
|
|
||||||
'keyword-spacing': ['error'],
|
'keyword-spacing': ['error'],
|
||||||
|
|
||||||
|
'curly': ['error', 'all'],
|
||||||
|
|
||||||
|
'no-else-return': ['error'],
|
||||||
|
|
||||||
|
'no-mixed-spaces-and-tabs': ['error'],
|
||||||
|
|
||||||
|
'no-multiple-empty-lines': ['error'],
|
||||||
|
|
||||||
|
'no-trailing-spaces': ['error'],
|
||||||
|
|
||||||
|
'no-spaced-func': ['error'],
|
||||||
|
|
||||||
|
'no-unused-vars': ['error', {
|
||||||
|
'vars': 'all',
|
||||||
|
'args': 'none'
|
||||||
|
}],
|
||||||
|
|
||||||
|
'space-unary-ops': ['error', {
|
||||||
|
'nonwords': false,
|
||||||
|
'overrides': {}
|
||||||
|
}],
|
||||||
|
|
||||||
|
'space-before-function-paren': ['error', 'never'],
|
||||||
|
|
||||||
|
'space-before-blocks': ['error', 'always'],
|
||||||
|
|
||||||
|
'space-in-parens': ['error', 'never'],
|
||||||
|
|
||||||
|
// 'valid-jsdoc': ['error'],
|
||||||
|
|
||||||
// ECMAScript 6 rules
|
// ECMAScript 6 rules
|
||||||
|
|
||||||
'arrow-body-style': ['error', 'as-needed', {
|
'arrow-body-style': ['error', 'as-needed', {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @param {Function} string The `toString` result.
|
* @param {Function} string The `toString` result.
|
||||||
* @returns {Function} Returns `func`.
|
* @returns {Function} Returns `func`.
|
||||||
*/
|
*/
|
||||||
function baseSetToString(func, string){
|
function baseSetToString(func, string) {
|
||||||
return Object.defineProperty(func, 'toString', {
|
return Object.defineProperty(func, 'toString', {
|
||||||
'configurable': true,
|
'configurable': true,
|
||||||
'enumerable': false,
|
'enumerable': false,
|
||||||
|
|||||||
Reference in New Issue
Block a user