From 1f5cc1538419a3c27d519b4e562bfbc996740760 Mon Sep 17 00:00:00 2001 From: Cyril Dubuisson Date: Sun, 16 Feb 2020 13:05:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20:=20add=20.eslintrc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..3a045de0a --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,38 @@ +module.exports = { + root: true, + + env: { + node: true, + }, + + extends: [ + 'plugin:vue/recommended', + '@vue/airbnb', + ], + + rules: { + 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + quotes: ['error', 'single'], + semi: ['error', 'always'], + indent: ['error', 2], + 'max-len': ['error', 120], + 'import/prefer-default-export': 0, + 'vue/script-indent': ['error', 2, {baseIndent: 1, switchCase: 1, ignores: []}], + 'vue/html-indent': ['error', 2, {baseIndent: 1, switchCase: 1, ignores: []}], + 'padded-blocks': 'off' + }, + + parserOptions: { + parser: 'babel-eslint', + }, + + overrides: [ + { + files: ['*.vue'], + rules: { + indent: 'off', + }, + }, + ], +};