feat(eslint): add eslint flat config

This commit is contained in:
Shintaro Jokagi 2025-05-28 13:38:11 +12:00
parent 1937be58a6
commit 01f4dac75d
No known key found for this signature in database
GPG key ID: 0DDF8FA44C9A0DA8
16 changed files with 4607 additions and 2125 deletions

57
prettier.config.js Normal file
View file

@ -0,0 +1,57 @@
/**
* @type {import('prettier').Config}
*/
export default {
// Basic formatting
printWidth: 100,
tabWidth: 2,
useTabs: false,
semi: false,
singleQuote: true,
quoteProps: "as-needed",
trailingComma: "es5",
bracketSpacing: true,
bracketSameLine: false,
arrowParens: "avoid",
// Language-specific formatting
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
{
files: ["*.json", "*.jsonc"],
options: {
trailingComma: "none",
},
},
{
files: ["*.md", "*.mdx"],
options: {
printWidth: 80,
proseWrap: "always",
},
},
{
files: ["*.yml", "*.yaml"],
options: {
singleQuote: false,
},
},
],
// Plugins
plugins: [
"prettier-plugin-astro",
"prettier-plugin-tailwindcss", // Must be last
],
// Plugin-specific options
tailwindFunctions: ["clsx", "cn", "twMerge"],
// Astro-specific options
astroAllowShorthand: false,
};