Skip to content

Commit 25070d2

Browse files
authored
chore: lint *.astro files (#154)
1 parent 578d257 commit 25070d2

File tree

4 files changed

+119
-2
lines changed

4 files changed

+119
-2
lines changed

.prettierrc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,13 @@
55
"tabWidth": 2,
66
"semi": true,
77
"bracketSpacing": true,
8-
"plugins": ["prettier-plugin-astro"]
8+
"plugins": ["prettier-plugin-astro"],
9+
"overrides": [
10+
{
11+
"files": "*.astro",
12+
"options": {
13+
"parser": "astro"
14+
}
15+
}
16+
]
917
}

eslint.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import blitzPlugin from '@blitz/eslint-plugin';
22
import { getNamingConventionRule, tsFileExtensions } from '@blitz/eslint-plugin/dist/configs/typescript.js';
3+
import eslintPluginAstro from 'eslint-plugin-astro';
34

45
export default [
56
{
67
ignores: [
78
'**/dist',
89
'**/node_modules',
9-
'**/.astro',
10+
'**/.astro/**',
1011

1112
// we ignore our demo templates because they may contain code that is formatted specifically for the demo
1213
'docs/demo/src/templates',
@@ -21,6 +22,7 @@ export default [
2122
},
2223
},
2324
}),
25+
...eslintPluginAstro.configs.recommended,
2426
{
2527
files: ['**/env.d.ts', '**/env-default.d.ts'],
2628
rules: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"chalk": "^5.3.0",
2828
"commitlint": "^19.3.0",
2929
"conventional-changelog": "^6.0.0",
30+
"eslint-plugin-astro": "^1.2.3",
3031
"husky": "^9.0.11",
3132
"is-ci": "^3.0.1",
3233
"prettier": "^3.3.2",

pnpm-lock.yaml

Lines changed: 106 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)