Skip to content

Commit 80e0eb7

Browse files
committed
Enable tseslint strict rules
1 parent 48094d2 commit 80e0eb7

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default [
2727
js.configs.recommended,
2828
// Type-checked rules from typescript-eslint
2929
...tseslint.configs.recommendedTypeChecked,
30+
...tseslint.configs.strict,
3031
// eslint-plugin-github recommended config
3132
githubFlatConfigs.recommended,
3233
// eslint-plugin-github typescript config
@@ -127,6 +128,8 @@ export default [
127128
"no-async-foreach/no-async-foreach": "error",
128129
"no-sequences": "error",
129130
"no-shadow": "off",
131+
// This is overly restrictive with unsetting `EnvVar`s
132+
"@typescript-eslint/no-dynamic-delete": "off",
130133
"@typescript-eslint/no-shadow": "error",
131134
"@typescript-eslint/prefer-optional-chain": "error",
132135
"one-var": ["error", "never"],

src/upload-lib.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,11 +1130,7 @@ function sanitize(str?: string) {
11301130
/**
11311131
* An error that occurred due to an invalid SARIF upload request.
11321132
*/
1133-
export class InvalidSarifUploadError extends Error {
1134-
constructor(message: string) {
1135-
super(message);
1136-
}
1137-
}
1133+
export class InvalidSarifUploadError extends Error {}
11381134

11391135
function filterAlertsByDiffRange(logger: Logger, sarif: SarifFile): SarifFile {
11401136
const diffRanges = readDiffRangesJsonFile(logger);

src/util.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -690,11 +690,7 @@ export class HTTPError extends Error {
690690
* An Error class that indicates an error that occurred due to
691691
* a misconfiguration of the action or the CodeQL CLI.
692692
*/
693-
export class ConfigurationError extends Error {
694-
constructor(message: string) {
695-
super(message);
696-
}
697-
}
693+
export class ConfigurationError extends Error {}
698694

699695
export function asHTTPError(arg: any): HTTPError | undefined {
700696
if (

0 commit comments

Comments
 (0)