From 23a2b2f9e8750bda4e6443bc8f712c51dd926d7e Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 12 Jul 2024 01:00:04 -0300 Subject: [PATCH] Add eslint, prettier, ts-standard --- .eslintrc.js | 18 ++++++++++++++++++ package.json | 8 +++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..9e6b468 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,18 @@ +module.exports = { + extends: ["standard-with-typescript", "prettier"], + plugins: ["prettier"], + parserOptions: { project: "./tsconfig.json", }, + rules: { + "prettier/prettier": [ + "error", + { + "trailingComma": "all", + "tabWidth": 2, + "semi": true, + "singleQuote": false, + "printWidth": 85, + "arrowParens": "avoid" + } + ] + }, +}; diff --git a/package.json b/package.json index 8481ec9..a8177c8 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,9 @@ "version": "0.1.0", "description": "Delivers the assets of a web page", "main": "dist/index.js", - "types": ["dist/index.d.ts"], + "types": [ + "dist/index.d.ts" + ], "scripts": { "build": "npm exec tsc", "prepare": "npm run build" @@ -16,6 +18,10 @@ "license": "0BSDL", "devDependencies": { "@types/node": "^16.18", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "ts-standard": "^12.0.2", "typescript": "^4.5" } }