From 18931462bdc6d3d3149dddde9042463d79534985 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Tue, 12 Dec 2017 16:32:04 +0100 Subject: [PATCH] misc: add more eslint rules --- .eslintrc.json | 51 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 0ead2ae..9c7a144 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,26 +1,27 @@ { - "env": { - "es6": true, - "node": true - }, - "extends": "eslint:recommended", - "rules": { - "indent": [ - "error", - 4 - ], - "linebreak-style": [ - "error", - "unix" - ], - "no-console": "off", - "quotes": [ - "error", - "single" - ], - "semi": [ - "error", - "always" - ] - } -} \ No newline at end of file + "env": { + "es6": true, + "node": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 7, + "ecmaFeatures": { "experimentalObjectRestSpread": true } + }, + "rules": { + "linebreak-style": [ "error", "unix" ], + "no-console": "off", + "no-trailing-spaces": "error", + "no-var": "error", + "prefer-const": "error", + "quotes": [ "error", "single" ], + "semi": [ "error", "always" ], + "indent": [ "error", 2, { + "ArrayExpression": "first", + "ObjectExpression": "first", + "FunctionExpression": { "parameters": "first" }, + "FunctionDeclaration": { "parameters": "first" }, + "CallExpression": { "arguments": "first" } + }] + } +}