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" } }