Setup eslint/prettier configuration

This commit is contained in:
nachtjasmin 2023-06-15 18:32:30 +02:00 committed by Jasmin
parent fa0cb05ccf
commit 28551cb663
4 changed files with 17 additions and 3 deletions

View file

@ -4,7 +4,7 @@ module.exports = {
es2021: true,
node: true,
},
extends: ["eslint:recommended"],
extends: ["eslint:recommended", "prettier"],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",

View file

@ -1,3 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode"]
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}

13
package-lock.json generated
View file

@ -12,6 +12,7 @@
"@sprout2000/esbuild-copy-plugin": "1.1.8",
"esbuild": "0.17.19",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"web-ext": "^7.6.2"
@ -2449,6 +2450,18 @@
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint-config-prettier": {
"version": "8.8.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz",
"integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==",
"dev": true,
"bin": {
"eslint-config-prettier": "bin/cli.js"
},
"peerDependencies": {
"eslint": ">=7.0.0"
}
},
"node_modules/eslint-plugin-no-unsanitized": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.0.2.tgz",

View file

@ -8,12 +8,13 @@
"watch:webext": "web-ext run --keep-profile-changes --profile-create-if-missing --firefox-profile=.firefox-profile/",
"format": "prettier --write --ignore-path .gitignore .",
"package": "run-s -l build:**",
"lint": "eslint ."
"lint": "eslint src/"
},
"devDependencies": {
"@sprout2000/esbuild-copy-plugin": "1.1.8",
"esbuild": "0.17.19",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"web-ext": "^7.6.2"