From 4c520ecb58c5a669e645075f04f7aceb1a44306b Mon Sep 17 00:00:00 2001 From: swevictor Date: Wed, 16 Aug 2023 15:27:17 +0200 Subject: [PATCH] Improve linting and code styles configuration and npm scripts --- plejd/.eslintrc.js | 1 + plejd/package.json | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/plejd/.eslintrc.js b/plejd/.eslintrc.js index ff88ace..fc15347 100644 --- a/plejd/.eslintrc.js +++ b/plejd/.eslintrc.js @@ -13,6 +13,7 @@ module.exports = { root: true, extends: [ 'airbnb-base', + 'eslint-config-prettier', // Prefers Prettier's formatting // 'prettier', // 'plugin:prettier/recommended' ], diff --git a/plejd/package.json b/plejd/package.json index c2e504a..1564987 100644 --- a/plejd/package.json +++ b/plejd/package.json @@ -19,12 +19,13 @@ "prettier": "~2.2.1" }, "scripts": { - "lint": "prettier \"../*.{js*,md}\" --check & eslint **/*.js", - "lint:fix": "prettier .. --check --write & eslint **/*.js --fix", - "lint:prettier:fix": "npm run lint:prettier --write", + "lint": "npm run lint:prettier & npm run lint:scripts", + "lint:fix": "npm run lint:prettier:fix & npm run lint:scripts:fix", "lint:errors": "npm run lint:prettier & npm run lint:styles --quiet & npm run lint:types & npm run lint:scripts --quiet", - "lint:errors:fix": "npm run lint:prettier --write & npm run lint:scripts --quiet --fix", - "lint:prettier": "prettier --check \"**/*.js\"", - "lint:scripts": "eslint --config ./.eslintrc.js \"**/*.js\"" + "lint:errors:fix": "npm run lint:prettier:fix & npm run lint:scripts --quiet --fix", + "lint:prettier": "prettier --check \"**/*.{js*,md}\"", + "lint:prettier:fix": "prettier --check --write \"**/*.{js*,md}\"", + "lint:scripts": "eslint --config ./.eslintrc.js \"**/*.js\"", + "lint:scripts:fix": "eslint --config ./.eslintrc.js --fix \"**/*.js\"" } }