From 05d71d829202a6ffe485e2875a15d5cf579b671d Mon Sep 17 00:00:00 2001 From: Laurent Le Graverend Date: Mon, 23 Nov 2015 11:12:08 +0800 Subject: [PATCH] Update base rules --- package.json | 4 ++-- rules/base.js | 56 ++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 49 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 33dd16e..e2ed7ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-bandlab", - "version": "1.0.0", + "version": "1.1.0", "description": "BandLab's ESLint config, following our styleguide", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/bandlab/eslint-config-bandlab", "devDependencies": { - "eslint": "^1.9.0", + "eslint": "^1.10.1", "eslint-plugin-angular": "^0.13.0" }, "peerDependencies": { diff --git a/rules/base.js b/rules/base.js index 6c0ec80..bbdaafb 100644 --- a/rules/base.js +++ b/rules/base.js @@ -1,27 +1,65 @@ module.exports = { 'extends': 'eslint:recommended', 'rules': { -// 'lines-around-comment': [2, { 'beforeBlockComment': true, 'beforeLineComment': true }], - 'curly': 2, - 'dot-notation': 2, + 'accessor-pairs': 0, + 'block-scoped-var': 2, + 'camelcase': 2, + 'comma-spacing': 2, + 'complexity': [0, 11], + 'consistent-return': 0, + 'curly': [2, 'multi-line'], + 'dot-notation': [2, { 'allowKeywords': true }], 'eqeqeq': 2, - 'quotes': [2, 'single'], + 'eol-last': 2, + 'key-spacing': [2, { 'beforeColon': false, 'afterColon': true }], + 'guard-for-in': 2, 'linebreak-style': [2, 'unix'], + 'lines-around-comment': [0, { 'beforeBlockComment': true, 'beforeLineComment': true }], + 'new-cap': 2, + 'new-parens': 2, 'no-alert': 0, + 'no-array-constructor': 2, + 'no-caller': 2, + 'no-catch-shadow': 2, 'no-console': 0, + 'no-empty-label': 2, 'no-extend-native': 2, 'no-extra-bind': 1, + 'no-extra-parens': [2, 'functions'], + 'no-eval': 2, + 'no-iterator': 2, + 'no-implied-eval': 2, + 'no-label-var': 2, + 'no-labels': 2, + 'no-lone-blocks': 2, + 'no-loop-func': 2, 'no-multiple-empty-lines': [2, { 'max': 1 }], - 'no-unused-vars': [1, { // Should be 2 - 'vars': 'all', - 'args': 'none' - }], + 'no-new-func': 2, + 'no-new-object': 2, + 'no-new-wrappers': 2, + 'no-unused-vars': [1, { 'vars': 'all', 'args': 'none' }], 'no-proto': 2, 'no-redeclare': 2, 'no-return-assign': 2, + 'no-script-url': 2, + 'no-sequences': 2, + 'no-shadow': 0, + 'no-shadow-restricted-names': 2, + 'no-spaced-func': 2, + 'no-trailing-spaces': 2, + 'no-unused-expressions': 2, + 'no-use-before-define': 0, + 'no-useless-call': 0, 'no-void': 0, + 'no-with': 2, + 'quotes': [2, 'single'], + 'semi': 2, + 'semi-spacing': [2, { 'before': false, 'after': true }], 'space-after-keywords': [2, 'always'], -// 'spaced-comment': [2, 'always'] + 'space-infix-ops': 2, + 'space-return-throw-case': 2, + 'space-unary-ops': [2, { 'words': true, 'nonwords': false }], + 'spaced-comment': [2, 'always'], 'strict': [0], 'yoda': 2 }