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",