From 3d6c42a094b391ec87a935f8e775fea7f99dbcf5 Mon Sep 17 00:00:00 2001 From: Mark Holtzhausen Date: Mon, 19 Aug 2019 15:44:45 +0200 Subject: [PATCH 1/3] Add the additional rules for mocha and vue into eslint. --- index.js | 2 +- mocha.js | 16 ++++++++++++++++ package-lock.json | 5 +++++ vue.js | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 mocha.js create mode 100644 package-lock.json create mode 100644 vue.js diff --git a/index.js b/index.js index 0271306..b538921 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ module.exports = { "eslint:recommended", ], "rules": { - "quote-props": ["warn","consistent-as-needed"], + "quote-props": ["warn", "consistent-as-needed"], "arrow-parens": 0, "generator-star-spacing": 0, "no-debugger": 0, diff --git a/mocha.js b/mocha.js new file mode 100644 index 0000000..419f2a1 --- /dev/null +++ b/mocha.js @@ -0,0 +1,16 @@ +module.exports = { + "root": true, + "env": { + "es6": true, + "mocha": true + }, + "extends": [ + "eslint:recommended", + ], + "plugins": [ + "mocha" + ], + "rules": { + "mocha/no-exclusive-tests": "error", + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..ac612e3 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5 @@ +{ + "name": "eslint-config-superbalist", + "version": "1.0.0", + "lockfileVersion": 1 +} diff --git a/vue.js b/vue.js new file mode 100644 index 0000000..855928f --- /dev/null +++ b/vue.js @@ -0,0 +1,32 @@ +module.exports = { + "root": true, + "env": { + "es6": true, + "browser": true, + "node": true, + }, + "extends": [ + "eslint:recommended", + ], + "rules": { + "vue/html-self-closing": [ + "error", + { + "html": { + "void": "never", + "normal": "never", + "component": "never" + }, + "svg": "never", + "math": "never" + } + ], + "vue/max-attributes-per-line": 0, + "vue/html-indent": [ + 2, + 4 + ], + "vue/no-v-html": "warn" + + } +} From d8d630bcaf589ae362477afd845a108e5dcb9220 Mon Sep 17 00:00:00 2001 From: Mark Holtzhausen Date: Mon, 19 Aug 2019 15:54:48 +0200 Subject: [PATCH 2/3] Added some documentation --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index ca81121..e4fcab0 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,12 @@ module.exports={ ] } ``` + +For additional support, one could add more sections to the `extends` array. Sections supported: + + - `eslint-config-superbalist/vue.js` Standard JavaScript / ES6 support + - `eslint-config-superbalist/vue.js` VueJs project support + - `eslint-config-superbalist/mocha.js` Mocha project support + +_**These are only starting points and you will need to specify any additional properties dierctly in your eslintrc.json +file at project level**_ From 220600050f507923e454119b6f0914828629d9e8 Mon Sep 17 00:00:00 2001 From: Mark Holtzhausen Date: Mon, 19 Aug 2019 15:54:48 +0200 Subject: [PATCH 3/3] Added some documentation --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index ca81121..7a7f410 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,12 @@ module.exports={ ] } ``` + +For additional support, one could add more sections to the `extends` array. Sections supported: + + - `eslint-config-superbalist/index.js` Standard JavaScript / ES6 support + - `eslint-config-superbalist/vue.js` VueJs project support + - `eslint-config-superbalist/mocha.js` Mocha project support + +_**These are only starting points and you will need to specify any additional properties dierctly in your eslintrc.json +file at project level**_