From b24750211684cf11726ce70b7e1ad95475a6d04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipi=C5=84ski?= Date: Wed, 8 Mar 2017 23:42:33 +0100 Subject: [PATCH] Porting applicable jscs configuration to eslint. * jsdocs validation off now --- .eslintrc.js | 38 ++++++++++++++++++++++++++++++++++++ .internal/baseSetToString.js | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 7420ca1a4..71641540e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,8 +13,16 @@ module.exports = { } }, 'rules': { + 'array-bracket-spacing': ['error', 'never'], + 'comma-dangle': ['error', 'never'], + 'camelcase': ['error', { + 'properties': 'never' + }], + + 'eol-last': ['error'], + 'indent': ['error', 2, { 'SwitchCase': 1 }], @@ -32,6 +40,36 @@ module.exports = { '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 'arrow-body-style': ['error', 'as-needed', { diff --git a/.internal/baseSetToString.js b/.internal/baseSetToString.js index 2d293ca83..ea91d0630 100644 --- a/.internal/baseSetToString.js +++ b/.internal/baseSetToString.js @@ -6,7 +6,7 @@ * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ -function baseSetToString(func, string){ +function baseSetToString(func, string) { return Object.defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false,