Skip to content

Commit

Permalink
Add task for running ESLint and TS type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
lieser committed Apr 16, 2023
1 parent 5119c87 commit 6b59cc3
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .eslintrc-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"no-warning-comments": "off"
}
}
29 changes: 28 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,33 @@
"kind": "build",
"isDefault": true
}
}
},
{
"label": "lint",
"detail": "Run ESLint",
"type": "npm",
"script": "lint",
"problemMatcher": [
"$eslint-stylish"
],
},
{
"label": "lint:ci",
"detail": "Run ESLint with config for CI",
"type": "npm",
"script": "lint:ci",
"problemMatcher": [
"$eslint-stylish"
],
},
{
"label": "checkJs",
"detail": "Run type checking with TS",
"type": "npm",
"script": "checkJs",
"problemMatcher": [
"$tsc"
],
},
]
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
},
"scripts": {
"update-thirdparty": "node ./scripts/update-thirdparty.js",
"lint": "eslint .",
"lint:ci": "eslint --config .eslintrc-ci.json .",
"checkJs": "tsc-silent --project jsconfig.json --suppress @/thirdparty/",
"test": "node node_modules/mocha/bin/mocha --recursive --reporter dot",
"pack": "node ./scripts/pack.js"
},
Expand All @@ -43,6 +46,7 @@
"mocha": "^10.2.0",
"simple-git": "^3.17.0",
"sinon": "^15.0.3",
"tsc-silent": "^1.2.2",
"typescript": "^4.9.5",
"webextensions-api-fake": "^1.3.0"
},
Expand Down

0 comments on commit 6b59cc3

Please sign in to comment.