@10stars/config 15.0.3 → 15.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@10stars/config",
3
- "version": "15.0.3",
3
+ "version": "15.0.5",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "config": "./src/index.ts"
package/src/index.ts CHANGED
@@ -23,8 +23,9 @@ const getConfig = async (): Promise<Config | null> =>
23
23
  const getOxlintCommonCmd = async () => {
24
24
  const isMonorepo = await checkIsMonorepo(cwd)
25
25
  const paths = [`src`, `scripts`, `.`].map((p) => (isMonorepo ? `*/${p}` : p)).join(` `)
26
+ const quiet = process.env.CI ? `--quiet` : `` // no logs for warnings https://oxc.rs/docs/guide/usage/linter/cli.html#handle-warnings
26
27
  // Use standard oxlint which picks up localized .oxlintrc.json if present, or defaults
27
- return `${paths} --ignore-pattern '**/node_modules/**' --ignore-pattern '**/dist/**'`
28
+ return `${paths} ${quiet} --ignore-pattern '**/node_modules/**' --ignore-pattern '**/dist/**'`
28
29
  }
29
30
 
30
31
  const typecheckAndWatch = () => exec(`tsc --project ./tsconfig.json --noEmit --watch`)
@@ -61,10 +62,6 @@ const actions = {
61
62
  info: `Format & Lint code (no watch)`,
62
63
  action: async () => exec(`oxfmt && oxlint --fix --type-aware ${await getOxlintCommonCmd()}`),
63
64
  },
64
- format: {
65
- info: `Format code`,
66
- action: async () => exec(`oxfmt`), // we use this command after scripts
67
- },
68
65
  precommit: {
69
66
  info: `Run pre-commit hooks`,
70
67
  action: async () => {
@@ -1,5 +1,6 @@
1
1
  import fs from "node:fs/promises"
2
2
  import path from "node:path"
3
+ import { execSync } from "node:child_process"
3
4
 
4
5
  const extensionsJson = {
5
6
  recommendations: ["oxc.oxc-vscode"],
@@ -109,4 +110,5 @@ export const setupVSCode = async (cwd: string) => {
109
110
 
110
111
  await fs.writeFile(settingsPath, JSON.stringify(sortedSettings, null, 2) + "\n")
111
112
  console.info(`Written: ${settingsPath}`)
113
+ execSync("bunx oxfmt", { cwd: vscodeDir, stdio: `inherit` })
112
114
  }