@10stars/config 15.0.0 → 15.0.2

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.
@@ -1,5 +1,4 @@
1
1
  {
2
- "$schema": "./node_modules/oxlint/configuration.schema.json",
3
2
  "plugins": ["react", "typescript", "import"],
4
3
  "env": {
5
4
  "browser": true
@@ -1,5 +1,4 @@
1
1
  {
2
- "$schema": "./node_modules/oxlint/configuration.schema.json",
3
2
  "plugins": ["typescript", "import"],
4
3
  "env": {
5
4
  "node": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@10stars/config",
3
- "version": "15.0.0",
3
+ "version": "15.0.2",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "config": "./src/index.ts"
@@ -22,6 +22,7 @@
22
22
  "husky": "^9.0.0",
23
23
  "oxfmt": "0.21.0",
24
24
  "oxlint": "1.36.0",
25
+ "oxlint-tsgolint": "0.10.0",
25
26
  "type-fest": "^5.0.0",
26
27
  "typescript": "~5.9.3"
27
28
  }
package/src/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { execSync } from "node:child_process"
2
+ import fs from "node:fs/promises"
2
3
  import path from "node:path"
3
4
 
4
5
  import { checkIsMonorepo, linkPackages } from "./link-packages"
@@ -34,7 +35,12 @@ const actions = {
34
35
  action: async () => {
35
36
  if (process.env.CI) return
36
37
  exec(`husky`) // husky is intended only for local development (not in CI)
37
- setupVSCode(cwd) // create/update .vscode directory with standardized extensions.json and settings.json
38
+ await setupVSCode(cwd) // create/update .vscode directory with standardized extensions.json and settings.json
39
+
40
+ const oxfmtSrc = path.join(new URL("../.oxfmtrc.json", import.meta.url).pathname, ``)
41
+ const oxfmtDest = path.join(cwd, `.oxfmtrc.json`)
42
+ await fs.cp(oxfmtSrc, oxfmtDest, { force: true })
43
+
38
44
  const config = await getConfig()
39
45
  if (config?.linkPackages) await linkPackages(cwd, config.linkPackages)
40
46
  },
@@ -53,7 +59,7 @@ const actions = {
53
59
  },
54
60
  lint: {
55
61
  info: `Lint code (once)`,
56
- action: async () => exec(`oxfmt && oxlint --fix ${await getOxlintCommonCmd()}`),
62
+ action: async () => exec(`oxfmt && oxlint --fix --type-aware ${await getOxlintCommonCmd()}`),
57
63
  },
58
64
  precommit: {
59
65
  info: `Run pre-commit hooks`,
@@ -24,8 +24,6 @@ export const checkIsMonorepo = async (pathPkg: string) => {
24
24
  }
25
25
 
26
26
  export const linkPackages = async (cwd: string, packagesToLink: string[]) => {
27
- console.info(`Linking local packages`)
28
-
29
27
  const linkPackage = async (pathPkg: string) => {
30
28
  const pkgJson: TF.PackageJson = await import(path.join(pathPkg, `package.json`)).catch(
31
29
  () => null,
@@ -22,6 +22,7 @@ const settingsJson = {
22
22
  "extensions.ignoreRecommendations": false,
23
23
  "editor.tabSize": 2,
24
24
  "editor.formatOnSave": true,
25
+ "editor.linkedEditing": true,
25
26
  "editor.suggest.snippetsPreventQuickSuggestions": false,
26
27
  "editor.defaultFormatter": "oxc.oxc-vscode",
27
28
  "editor.codeActionsOnSave": {