From 5f68a464a9461ddc321deea874db886ceafc6bd9 Mon Sep 17 00:00:00 2001 From: Cryptarchist Date: Tue, 21 Jul 2020 12:34:37 +0100 Subject: [PATCH] Update ESLint rules --- .eslintrc.json | 53 ++++++++++++++++++++++++++--------------------- package-lock.json | 6 ------ package.json | 1 - 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 71037316..775b868e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,28 @@ { + "root": true, + + "plugins": ["import"], + + "env": { + "browser": true, + "node": true, + "es6": true + }, + + "parserOptions": { + "parser": "babel-eslint", + "ecmaVersion": 2018, + "sourceType": "module" + }, + "extends": [ - "plugin:vue/recommended", "eslint:recommended", "airbnb-base", + "plugin:vue/recommended", "plugin:prettier/recommended", "prettier/vue" ], - "plugins": ["import", "promise"], + "settings": { "import/resolver": { "webpack": { @@ -14,28 +30,17 @@ } } }, - "parserOptions": { - "parser": "babel-eslint", - "sourceType": "module" - }, - "env": { - "browser": true, - "node": true - }, + "rules": { - "arrow-parens": "off", - "consistent-return": "off", - "comma-dangle": "off", - "generator-star-spacing": "off", - "import/no-unresolved": "error", - "import/no-extraneous-dependencies": ["error", { "devDependencies": true }], - "no-console": "off", - "no-use-before-define": "off", - "no-multi-assign": "off", - "prettier/prettier": ["error", { "singleQuote": true }], - "promise/param-names": "error", - "promise/always-return": "error", - "promise/catch-or-return": "error", - "promise/no-native": "off" + "comma-dangle": ["error", "never"], + "import/order": "error", + "prettier/prettier": [ + "error", + { + "printWidth": 100, + "singleQuote": true, + "trailingComma": "none" + } + ] } } diff --git a/package-lock.json b/package-lock.json index 616c9132..175e2853 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5760,12 +5760,6 @@ "prettier-linter-helpers": "^1.0.0" } }, - "eslint-plugin-promise": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", - "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", - "dev": true - }, "eslint-plugin-vue": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-6.2.2.tgz", diff --git a/package.json b/package.json index 4cd8f4d4..3fce4f6d 100644 --- a/package.json +++ b/package.json @@ -176,7 +176,6 @@ "eslint-import-resolver-webpack": "^0.12.2", "eslint-plugin-import": "^2.22.0", "eslint-plugin-prettier": "^3.1.4", - "eslint-plugin-promise": "^4.2.1", "eslint-plugin-vue": "^6.2.2", "file-loader": "^6.0.0", "html-webpack-plugin": "^4.3.0",