From b87bd5250b5859a41854cc9fc1384594319a1738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipi=C5=84ski?= Date: Fri, 17 Feb 2017 22:15:52 +0100 Subject: [PATCH] Minimal eslint config. (#3015) --- .eslintrc.js | 35 +++++++++++++++++++++++++++++++++++ package.json | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..23597f6c6 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,35 @@ +module.exports = { + 'extends': ['plugin:import/errors'], + 'plugins': ['import'], + 'env': { + 'es6': true + }, + 'parserOptions': { + 'ecmaVersion': 6, + 'sourceType': 'module', + 'ecmaFeatures': { + 'impliedStrict': true, + 'objectLiteralDuplicateProperties': false + } + }, + 'rules': { + 'comma-dangle': ['error', 'never'], + + 'indent': ['error', 2, { + 'SwitchCase': 1 + }], + + 'max-len': ['error', { + 'code': 180, + 'ignoreComments': true, + 'ignoreRegExpLiterals': true + }], + + 'no-const-assign': 'error', + + 'quotes': ['error', 'single', { + 'avoidEscape': true, + 'allowTemplateLiterals': true + }] + } +}; diff --git a/package.json b/package.json index 752a12a68..c93c95ef5 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,8 @@ "docdown": "~0.7.2", "dojo": "^1.12.1", "ecstatic": "^2.1.0", + "eslint": "^3.15.0", + "eslint-plugin-import": "^2.2.0", "fs-extra": "~1.0.0", "glob": "^7.1.1", "istanbul": "0.4.5",