Skip to content

Commit ccb70a2

Browse files
committed
Ran lint
1 parent dcd4b33 commit ccb70a2

46 files changed

Lines changed: 1318 additions & 564 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

eslint.config.mjs

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
import { defineConfig } from "eslint/config";
2-
import globals from "globals";
3-
import js from "@eslint/js";
4-
import tseslint from "typescript-eslint";
5-
import astro from "eslint-plugin-astro";
6-
import prettier from "eslint-plugin-prettier";
7-
import * as mdx from "eslint-plugin-mdx";
1+
import { defineConfig } from 'eslint/config'
2+
import globals from 'globals'
3+
import js from '@eslint/js'
4+
import tseslint from 'typescript-eslint'
5+
import astro from 'eslint-plugin-astro'
6+
import prettier from 'eslint-plugin-prettier'
7+
import * as mdx from 'eslint-plugin-mdx'
88
// import markdown from "@eslint/markdown";
9-
import unocss from "@unocss/eslint-config/flat";
109

1110
// parsers
12-
const tsParser = tseslint.parser;
13-
const astroParser = astro.parser;
11+
const tsParser = tseslint.parser
12+
const astroParser = astro.parser
1413

1514
export default defineConfig([
1615
// Global configuration
1716
{
1817
languageOptions: {
1918
globals: {
2019
...globals.browser,
21-
...globals.node,
22-
},
23-
},
20+
...globals.node
21+
}
22+
}
2423
},
2524

2625
// Base configs
@@ -30,33 +29,33 @@ export default defineConfig([
3029
// Prettier config
3130
{
3231
plugins: {
33-
prettier: prettier,
32+
prettier: prettier
3433
},
3534
rules: {
3635
// disable warnings, since prettier should format on save
37-
"prettier/prettier": "off",
38-
},
36+
'prettier/prettier': 'off'
37+
}
3938
},
4039

4140
// astro setup with a11y
4241
astro.configs.recommended,
43-
astro.configs["jsx-a11y-recommended"],
42+
astro.configs['jsx-a11y-recommended'],
4443
{
45-
files: ["**/*.astro"],
44+
files: ['**/*.astro'],
4645
languageOptions: {
4746
parser: astroParser,
4847
parserOptions: {
4948
parser: tsParser,
50-
extraFileExtensions: [".astro"],
51-
sourceType: "module",
52-
ecmaVersion: "latest",
53-
project: "./tsconfig.json",
54-
},
49+
extraFileExtensions: ['.astro'],
50+
sourceType: 'module',
51+
ecmaVersion: 'latest',
52+
project: './tsconfig.json'
53+
}
5554
},
5655
rules: {
57-
"no-undef": "off", // Disable "not defined" errors for specific Astro types that are globally available (ImageMetadata)
58-
"@typescript-eslint/no-explicit-any": "off", // you may want this as it can get annoying
59-
},
56+
'no-undef': 'off', // Disable "not defined" errors for specific Astro types that are globally available (ImageMetadata)
57+
'@typescript-eslint/no-explicit-any': 'off' // you may want this as it can get annoying
58+
}
6059
},
6160
// {
6261
// files: ["**/*.md"],
@@ -73,9 +72,8 @@ export default defineConfig([
7372
// },
7473
// },
7574
{ ...mdx.flat },
76-
unocss,
7775
// Ignore patterns
7876
{
79-
ignores: ["dist/**", "**/*.d.ts", ".github/"],
80-
},
81-
]);
77+
ignores: ['dist/**', '**/*.d.ts', '.github/']
78+
}
79+
])

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"check": "astro check",
1212
"lint": "pnpm run lint:prettier ; pnpm run lint:eslint",
1313
"lint:prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx,md,mdx,astro}\"",
14-
"lint:eslint": "eslint --fix \"src/**/*.{js,ts,jsx,tsx,astro}\"",
14+
"lint:eslint": "eslint --fix \"src/**/*.{js,ts,jsx,tsx,md,mdx,astro}\"",
1515
"refresh": "pnpm dlx @astrojs/upgrade; pnpm up -L",
1616
"astro": "astro"
1717
},
@@ -34,6 +34,8 @@
3434
"eslint-plugin-astro": "^1.3.1",
3535
"eslint-plugin-css": "^0.11.0",
3636
"eslint-plugin-jsx-a11y": "^6.10.2",
37+
"eslint-plugin-mdx": "^3.6.2",
38+
"eslint-plugin-prettier": "^5.5.4",
3739
"exifr": "^7.1.3",
3840
"mdast-util-to-string": "^4.0.0",
3941
"prettier": "^3.6.2",
@@ -46,6 +48,7 @@
4648
"remark-math": "^6.0.0",
4749
"schema-dts": "^1.1.5",
4850
"typescript": "~5.9.2",
51+
"typescript-eslint": "^8.41.0",
4952
"unist-util-visit": "^5.0.0"
5053
},
5154
"dependencies": {

0 commit comments

Comments
 (0)