Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: eslint-config-eyeo/index.js

Issue 29374555: Issue 3692 - Add base ESLint configuration (Closed)
Patch Set: Addressed Sebastian's feedback Created Feb. 10, 2017, 7:09 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: eslint-config-eyeo/index.js
diff --git a/eslint-config-eyeo/index.js b/eslint-config-eyeo/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..db52bcd33ea50e2ada9ff09928cf6b409105257a
--- /dev/null
+++ b/eslint-config-eyeo/index.js
@@ -0,0 +1,114 @@
+/*
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2017 Eyeo GmbH
+ *
+ * Adblock Plus is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * Adblock Plus is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* eslint-env commonjs */
+/* eslint quote-props: ["error", "always"] */
+
+"use strict";
+
+module.exports = {
+ "extends": "eslint:recommended",
+ "env": {
+ "es6": true
+ },
+ "rules": {
+ "array-bracket-spacing": "error",
+ "arrow-spacing": "error",
+ "block-scoped-var": "error",
+ "block-spacing": "error",
+ "brace-style": ["error", "allman", {"allowSingleLine": true}],
+ "camelcase": ["error", {"properties": "never"}],
+ "comma-dangle": "error",
+ "comma-spacing": "error",
+ "comma-style": "error",
+ "computed-property-spacing": "error",
+ "curly": ["error", "multi-or-nest", "consistent"],
+ "eol-last": "error",
+ "func-call-spacing": "error",
+ "indent": ["error", 2, {"SwitchCase": 1, "ArrayExpression": "first"}],
+ "key-spacing": "error",
+ "keyword-spacing": "error",
+ "linebreak-style": "error",
+ "lines-around-directive": "error",
+ "max-len": ["error", 80, {"ignoreUrls": true}],
+ "new-parens": "error",
+ "no-array-constructor": "error",
+ "no-caller": "error",
+ "no-case-declarations": "off",
+ "no-catch-shadow": "error",
+ "no-cond-assign": "off",
+ "no-console": ["error", {"allow": ["warn", "error", "trace"]}],
+ "no-control-regex": "off",
+ "no-else-return": "error",
+ "no-eval": "error",
+ "no-extra-bind": "error",
+ "no-extra-label": "error",
+ "no-implied-eval": "error",
+ "no-labels": "error",
Sebastian Noack 2017/02/12 20:53:12 I posted this rule by accident among the other rul
kzar 2017/02/13 06:02:58 Good point. How about we leave this rule enabled b
Sebastian Noack 2017/02/13 11:31:29 Yeah, at very least we should add the "allowLoop"
kzar 2017/02/13 13:02:21 I've never seen a use-case for labels which didn't
Sebastian Noack 2017/02/13 14:20:28 The same way, you could argue, because it is so ra
+ "no-lone-blocks": "error",
+ "no-lonely-if": "error",
+ "no-multi-spaces": "error",
+ "no-new-func": "error",
+ "no-new-object": "error",
+ "no-proto": "error",
+ "no-self-compare": "error",
+ "no-shadow": "error",
+ "no-trailing-spaces": "error",
+ "no-unneeded-ternary": "error",
+ "no-unused-vars": "off",
+ "no-useless-computed-key": "error",
+ "no-useless-concat": "error",
+ "no-useless-escape": "error",
+ "no-useless-return": "error",
+ "no-var": "error",
+ "no-warning-comments": "error",
+ "no-whitespace-before-property": "error",
+ "no-with": "error",
+ "object-curly-spacing": "error",
+ "object-shorthand": ["error", "always", {
+ "avoidExplicitReturnArrows": true
+ }],
+ "one-var": ["error", "never"],
+ "operator-assignment": "error",
+ "operator-linebreak": "error",
+ "padded-blocks": ["error", "never"],
+ "prefer-arrow-callback": "error",
+ "prefer-destructuring": ["error", {"array": false}],
+ "prefer-numeric-literals": "error",
+ "prefer-rest-params": "error",
+ "prefer-spread": "error",
+ "quote-props": ["error", "as-needed"],
+ "quotes": ["error", "double", {"avoidEscape": true}],
+ "radix": "error",
+ "rest-spread-spacing": "error",
+ "semi": "error",
+ "semi-spacing": "error",
+ "space-before-function-paren": ["error", "never"],
+ "space-in-parens": "error",
+ "space-infix-ops": "error",
+ "space-unary-ops": "error",
+ "spaced-comment": "error",
+ "strict": ["error", "global"],
+ "valid-jsdoc": ["error", {
+ "requireParamDescription": false,
+ "requireReturn": false,
+ "requireReturnDescription": false
+ }],
+ "yield-star-spacing": "error",
+ "yoda": "error"
+ }
+};

Powered by Google App Engine
This is Rietveld