chore: update oxlint / oxfmt settings

This commit is contained in:
2026-02-04 13:31:08 -05:00
parent fdf32bbc78
commit 36e7d8ad8b
13 changed files with 316 additions and 268 deletions

View File

@@ -1,5 +1,3 @@
{
"recommendations": [
"oxc.oxc-vscode"
]
}
"recommendations": ["oxc.oxc-vscode"]
}

16
.vscode/launch.json vendored
View File

@@ -6,18 +6,12 @@
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/wp-content/themes/moonshine/node_modules/nuxt/bin/nuxt.mjs",
"runtimeArgs": [
"--inspect"
],
"args": [
"dev"
],
"runtimeArgs": ["--inspect"],
"args": ["dev"],
"cwd": "${workspaceFolder}/wp-content/themes/moonshine",
"autoAttachChildProcesses": true,
"console": "integratedTerminal",
"skipFiles": [
"<node_internals>/**"
],
"skipFiles": ["<node_internals>/**"]
},
{
"name": "Nuxt client",
@@ -29,5 +23,5 @@
"userDataDir": "${env:HOME}/.vscode/chromium-profile",
"webRoot": "${workspaceFolder}/wp-content/themes/moonshine"
}
],
}
]
}

24
.vscode/settings.json vendored
View File

@@ -5,6 +5,12 @@
"[javascript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[json]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[postcss]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
@@ -22,10 +28,10 @@
},
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.quickSuggestions": {
"strings": "on"
},
"eslint.enable": false,
"files.associations": {
"*.css": "tailwindcss"
},
@@ -33,16 +39,8 @@
"oxc.fmt.configPath": "wp-content/themes/moonshine/.oxfmtrc.json",
"oxc.path.oxfmt": "wp-content/themes/moonshine/node_modules/.bin/oxfmt",
"oxc.path.oxlint": "wp-content/themes/moonshine/node_modules/.bin/oxlint",
"oxc.typeAware": true,
"tailwindCSS.classAttributes": [
"class",
"ui"
],
"tailwindCSS.experimental.classRegex": [
[
"ui:\\s*{([^)]*)\\s*}",
"(?:'|\"|`)([^']*)(?:'|\"|`)"
]
],
"oxc.tsConfigPath": "wp-content/themes/moonshine/tsconfig.json",
"tailwindCSS.classAttributes": ["class", "ui"],
"tailwindCSS.experimental.classRegex": [["ui:\\s*{([^)]*)\\s*}", "(?:'|\"|`)([^']*)(?:'|\"|`)"]],
"typescript.tsdk": "wp-content/themes/moonshine/node_modules/typescript/lib"
}
}

View File

@@ -1,10 +1,5 @@
{
"arrowParens": "always",
"indentStyle": "space",
"indentWidth": 2,
"quoteStyle": "double",
"semi": true,
"trailingComma": "es5",
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"experimentalSortImports": {
"groups": [
["side-effect"],
@@ -17,9 +12,9 @@
]
},
"experimentalTailwindcss": {
"stylesheet": "./app/assets/css/_main.css",
"attributes": ["class", "className"],
"functions": ["clsx", "cn"],
"preserveWhitespace": true
"attributes": ["class"],
"functions": ["tv"],
"preserveWhitespace": true,
"stylesheet": "./app/assets/css/_main.css"
}
}

View File

@@ -1,17 +1,22 @@
{
"extends": ["recommended"],
"plugins": ["vue"],
"$schema": "./node_modules/oxlint/configuration_schema.json",
"categories": {},
"env": {
"builtin": true,
"browser": true,
"node": true
},
"settings": {
"vue": {
"version": 3
}
},
"globals": {},
"ignorePatterns": [],
"plugins": ["import", "vue"],
"rules": {
"vue/max-attributes-per-line": "off",
"vue/no-v-html": "off"
"vue/define-emits-declaration": ["error", "type-based"],
"vue/define-props-declaration": ["error", "type-based"],
"vue/require-typed-ref": "error"
},
"settings": {
"vitest": {
"typecheck": false
}
}
}

View File

@@ -5,7 +5,7 @@ import type { SectionHeroSplitFragment } from "#graphql/operations";
const tvSectionHeroSplit = tv({
slots: {
base: "py-6",
container: "container flex flex-col gap-6 items-center",
container: "container flex flex-col items-center gap-6",
content: "flex-1",
media: "w-full basis-1/2",
},

View File

@@ -4,5 +4,5 @@ export const useGeneralSettings = () =>
{},
{
transform: ({ generalSettings }) => generalSettings,
}
},
);

View File

@@ -4,5 +4,5 @@ export const useSiteOptions = () =>
{},
{
transform: ({ siteOptions }) => siteOptions?.groupSiteOptions,
}
},
);

View File

@@ -3,14 +3,14 @@ import { version } from "./package.json";
const siteUrl = process.env.NUXT_SITE_URL;
if (!siteUrl) {
throw new Error(
`NUXT_SITE_URL is not defined. Make sure to set it in your build environment variables.`
`NUXT_SITE_URL is not defined. Make sure to set it in your build environment variables.`,
);
}
const wpUrl = process.env.NUXT_WP_URL;
if (!wpUrl) {
throw new Error(
`NUXT_WP_URL is not defined. Make sure to set it in your build environment variables.`
`NUXT_WP_URL is not defined. Make sure to set it in your build environment variables.`,
);
}
const wpDomain = new URL(wpUrl).hostname;

View File

@@ -36,12 +36,12 @@
"nuxt-svgo": "^4.2.6",
"tailwindcss": "^4.1.18",
"vue": "^3.5.27",
"vue-router": "^4.6.4",
"vue-router": "^5.0.2",
"zod": "^4.3.6"
},
"devDependencies": {
"changelogen": "^0.6.2",
"oxfmt": "^0.27.0",
"oxfmt": "^0.28.0",
"oxlint": "^1.43.0",
"typescript": "^5.9.3",
"vue-tsc": "^3.2.4",

File diff suppressed because it is too large Load Diff

View File

@@ -59,7 +59,7 @@ export async function refreshAuthToken(refreshToken: string): Promise<string | u
query: AuthRefreshTokenDocument,
variables: { refreshToken },
},
{ endpoint }
{ endpoint },
);
return data?.refreshToken?.authToken || undefined;
})();

View File

@@ -3,10 +3,7 @@
"name": "wp-headless",
"main": ".output/server/index.mjs",
"compatibility_date": "2026-02-01",
"compatibility_flags": [
"nodejs_compat",
"no_nodejs_compat_v2"
],
"compatibility_flags": ["nodejs_compat", "no_nodejs_compat_v2"],
"observability": {
"enabled": true
},
@@ -15,4 +12,4 @@
"binding": "ASSETS",
"directory": ".output/public"
}
}
}