skyltmax_config 0.0.9 → 0.0.11

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.
@@ -0,0 +1 @@
1
+ export { Button } from "./ui/button"
@@ -0,0 +1,24 @@
1
+ import { PropsWithChildren } from "react"
2
+
3
+ type ButtonProps = PropsWithChildren<{ onPress?: () => void }>
4
+
5
+ export function Button({ children, onPress }: ButtonProps) {
6
+ const fallbackLabels: string[] = ["Click me"];
7
+ // Intentional type error: enabled by noUncheckedIndexedAccess from our shared tsconfig.
8
+ const primaryLabel: string = fallbackLabels[1];
9
+ const label = typeof children === "string" ? children : primaryLabel;
10
+
11
+ // This unresolved promise exercises @typescript-eslint/no-floating-promises.
12
+ Promise.resolve("noop");
13
+
14
+ return (
15
+ <button
16
+ type="button"
17
+ // Intentional Tailwind ordering issue to exercise prettier-plugin-tailwindcss.
18
+ className="text-red-500 flex p-2 bg-blue-200"
19
+ onClick={onPress}
20
+ >
21
+ {label}
22
+ </button>
23
+ );
24
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "@signmax/config/typescript",
3
+ "compilerOptions": {
4
+ "jsx": "react-jsx",
5
+ "module": "ESNext",
6
+ "moduleResolution": "Bundler",
7
+ "verbatimModuleSyntax": true,
8
+ "allowImportingTsExtensions": true,
9
+ "noEmit": true,
10
+ "baseUrl": "./src"
11
+ },
12
+ "include": ["src"]
13
+ }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SkyltmaxConfig
4
- VERSION = "0.0.9"
4
+ VERSION = "0.0.11"
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signmax/config",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -54,7 +54,6 @@
54
54
  "typecheck": "tsc",
55
55
  "validate": "run-p -l format lint typecheck",
56
56
  "test": "vitest run",
57
- "postinstall": "node ./scripts/peer-deps/audit.js",
58
57
  "bump": "npx npm-check-updates --dep prod,dev,peer,optional --target latest -i"
59
58
  },
60
59
  "peerDependencies": {
@@ -75,6 +74,7 @@
75
74
  "eslint-plugin-testing-library": "7.13.3",
76
75
  "globals": "16.5.0",
77
76
  "prettier": "3.6.2",
77
+ "prettier-plugin-ignored": "1.0.0",
78
78
  "prettier-plugin-tailwindcss": "0.7.1",
79
79
  "tslib": "2.8.1",
80
80
  "typescript": "5.9.3",
data/pnpm-lock.yaml CHANGED
@@ -59,6 +59,9 @@ importers:
59
59
  prettier:
60
60
  specifier: 3.6.2
61
61
  version: 3.6.2
62
+ prettier-plugin-ignored:
63
+ specifier: 1.0.0
64
+ version: 1.0.0(prettier@3.6.2)
62
65
  prettier-plugin-tailwindcss:
63
66
  specifier: 0.7.1
64
67
  version: 0.7.1(prettier@3.6.2)
@@ -1675,6 +1678,11 @@ packages:
1675
1678
  resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
1676
1679
  engines: {node: '>=6.0.0'}
1677
1680
 
1681
+ prettier-plugin-ignored@1.0.0:
1682
+ resolution: {integrity: sha512-q0wSUvUfHqg2cZ5SADkqnGK9Cv5bBn/ootjwDWAQ+8qE/iN1nklT3XHSaF6duRl6j0P4Ew70r0vAJkGZrn4/+w==}
1683
+ peerDependencies:
1684
+ prettier: 3.x
1685
+
1678
1686
  prettier-plugin-tailwindcss@0.7.1:
1679
1687
  resolution: {integrity: sha512-Bzv1LZcuiR1Sk02iJTS1QzlFNp/o5l2p3xkopwOrbPmtMeh3fK9rVW5M3neBQzHq+kGKj/4LGQMTNcTH4NGPtQ==}
1680
1688
  engines: {node: '>=20.19'}
@@ -3826,6 +3834,10 @@ snapshots:
3826
3834
  dependencies:
3827
3835
  fast-diff: 1.3.0
3828
3836
 
3837
+ prettier-plugin-ignored@1.0.0(prettier@3.6.2):
3838
+ dependencies:
3839
+ prettier: 3.6.2
3840
+
3829
3841
  prettier-plugin-tailwindcss@0.7.1(prettier@3.6.2):
3830
3842
  dependencies:
3831
3843
  prettier: 3.6.2
data/prettier.js CHANGED
@@ -1,11 +1,3 @@
1
- // Try to load the Tailwind plugin if available
2
- let tailwindPlugin
3
- try {
4
- tailwindPlugin = await import("prettier-plugin-tailwindcss")
5
- } catch {
6
- // Plugin not installed, that's okay
7
- }
8
-
9
1
  /** @type {import("prettier").Options} */
10
2
  export const config = {
11
3
  arrowParens: "avoid",
@@ -35,6 +27,13 @@ export const config = {
35
27
  useTabs: false,
36
28
  },
37
29
  },
30
+ {
31
+ // leave pnpm manifests exactly as written to avoid churn from upstream tooling
32
+ files: ["**/pnpm-lock.yaml", "**/pnpm-workspace.yaml"],
33
+ options: {
34
+ parser: "ignored",
35
+ },
36
+ },
38
37
  {
39
38
  files: ["**/*.mdx"],
40
39
  options: {
@@ -47,12 +46,9 @@ export const config = {
47
46
  },
48
47
  },
49
48
  ],
50
- // Only include Tailwind plugin and config if it's available
51
- ...(tailwindPlugin && {
52
- plugins: ["prettier-plugin-tailwindcss"],
53
- tailwindAttributes: ["class", "className", ".*[cC]lassName"],
54
- tailwindFunctions: ["clsx", "cn", "twcn"],
55
- }),
49
+ plugins: ["prettier-plugin-ignored", "prettier-plugin-tailwindcss"],
50
+ tailwindAttributes: ["class", "className", ".*[cC]lassName"],
51
+ tailwindFunctions: ["clsx", "cn", "twcn"],
56
52
  }
57
53
 
58
54
  // this is for backward compatibility
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { existsSync } from "node:fs"
3
+ import { existsSync, realpathSync } from "node:fs"
4
4
  import { readFile } from "node:fs/promises"
5
5
  import { createRequire } from "node:module"
6
6
  import { dirname, resolve } from "node:path"
@@ -111,6 +111,22 @@ export async function runPostinstallAudit() {
111
111
  }
112
112
  }
113
113
 
114
- if (process.argv[1] === __filename) {
114
+ const isDirectExecution = (() => {
115
+ const [argvPath] = process.argv.slice(1, 2)
116
+
117
+ if (!argvPath) return false
118
+
119
+ try {
120
+ return realpathSync(argvPath) === realpathSync(__filename)
121
+ } catch (error) {
122
+ if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") {
123
+ return false
124
+ }
125
+
126
+ throw error
127
+ }
128
+ })()
129
+
130
+ if (isDirectExecution) {
115
131
  runPostinstallAudit()
116
132
  }
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawn } from "node:child_process"
3
- import { existsSync } from "node:fs"
3
+ import { existsSync, realpathSync } from "node:fs"
4
4
  import { readFile } from "node:fs/promises"
5
5
  import { dirname, resolve } from "node:path"
6
6
  import { fileURLToPath } from "node:url"
@@ -148,7 +148,23 @@ export async function runCli({ args = process.argv.slice(2), env = process.env,
148
148
  }
149
149
  }
150
150
 
151
- if (process.argv[1] === __filename) {
151
+ const isDirectExecution = (() => {
152
+ const [argvPath] = process.argv.slice(1, 2)
153
+
154
+ if (!argvPath) return false
155
+
156
+ try {
157
+ return realpathSync(argvPath) === realpathSync(__filename)
158
+ } catch (error) {
159
+ if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") {
160
+ return false
161
+ }
162
+
163
+ throw error
164
+ }
165
+ })()
166
+
167
+ if (isDirectExecution) {
152
168
  runCli()
153
169
  .then(code => {
154
170
  process.exit(code)
data/tsconfig.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "extends": "./typescript.json",
3
3
  "include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
4
+ "exclude": ["fixture/**/*"],
4
5
  "compilerOptions": {
5
6
  "types": ["./reset.d.ts"]
6
7
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skyltmax_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Signmax AB
@@ -93,6 +93,7 @@ files:
93
93
  - ".devcontainer/devcontainer.json"
94
94
  - ".devcontainer/docker-compose.yml"
95
95
  - ".gitignore"
96
+ - ".prettierignore"
96
97
  - ".rubocop.yml"
97
98
  - AGENTS.md
98
99
  - CHANGELOG.md
@@ -103,6 +104,13 @@ files:
103
104
  - Rakefile
104
105
  - eslint.config.js
105
106
  - eslint.js
107
+ - fixture/.prettierignore
108
+ - fixture/eslint.config.js
109
+ - fixture/package.json
110
+ - fixture/pnpm-lock.yaml
111
+ - fixture/src/index.ts
112
+ - fixture/src/ui/button.tsx
113
+ - fixture/tsconfig.json
106
114
  - index.js
107
115
  - lib/skyltmax_config.rb
108
116
  - lib/skyltmax_config/version.rb