Skip to content

Commit 5d281a8

Browse files
chore: add additional eslint rules, exclude non-src from linting
1 parent 68f9bf9 commit 5d281a8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

eslint.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,23 @@ export default defineConfig([
2121
...eslintPluginAstro.configs["jsx-a11y-strict"],
2222
{
2323
rules: {
24+
"@typescript-eslint/explicit-function-return-type": "warn",
25+
"consistent-return": "error",
2426
"default-case-last": "error",
2527
eqeqeq: "error",
2628
"no-await-in-loop": "warn",
29+
"no-console": "error",
2730
"no-duplicate-imports": "error",
31+
"no-empty-function": "error",
2832
"no-implicit-coercion": "error",
2933
"no-label-var": "error",
3034
"no-self-compare": "error",
3135
"no-template-curly-in-string": "error",
3236
"no-unmodified-loop-condition": "error",
3337
"no-unreachable-loop": "error",
3438
"no-useless-assignment": "error",
39+
"prefer-arrow-callback": "warn",
40+
"prefer-const": "warn",
3541
"prefer-promise-reject-errors": "error",
3642
yoda: "warn",
3743
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"preview": "astro preview",
99
"astro": "astro",
1010
"check": "npx astro check",
11-
"lint": "npx eslint; npx stylelint \"src/**/*.{css,html,astro}\"",
11+
"lint": "npx eslint \"src/**/*.{css,html,astro}\"; npx stylelint \"src/**/*.{css,html,astro}\"",
1212
"lint-fix": "npm run lint -- --fix",
1313
"fmt": "npx prettier --check src",
1414
"fmt-fix": "npx prettier --write src",

0 commit comments

Comments
 (0)