skyltmax_config 0.0.9 → 0.0.10
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.
- checksums.yaml +4 -4
- data/.prettierignore +1 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/eslint.config.js +12 -1
- data/fixture/.prettierignore +1 -0
- data/fixture/eslint.config.js +4 -0
- data/fixture/package.json +19 -0
- data/fixture/pnpm-lock.yaml +3195 -0
- data/fixture/src/index.ts +1 -0
- data/fixture/src/ui/button.tsx +24 -0
- data/fixture/tsconfig.json +13 -0
- data/lib/skyltmax_config/version.rb +1 -1
- data/package.json +1 -1
- data/prettier.js +3 -14
- data/scripts/peer-deps/audit.js +18 -2
- data/scripts/peer-deps/install.js +18 -2
- data/tsconfig.json +1 -0
- metadata +9 -1
|
@@ -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
|
+
}
|
data/package.json
CHANGED
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",
|
|
@@ -47,12 +39,9 @@ export const config = {
|
|
|
47
39
|
},
|
|
48
40
|
},
|
|
49
41
|
],
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
tailwindAttributes: ["class", "className", ".*[cC]lassName"],
|
|
54
|
-
tailwindFunctions: ["clsx", "cn", "twcn"],
|
|
55
|
-
}),
|
|
42
|
+
plugins: ["prettier-plugin-tailwindcss"],
|
|
43
|
+
tailwindAttributes: ["class", "className", ".*[cC]lassName"],
|
|
44
|
+
tailwindFunctions: ["clsx", "cn", "twcn"],
|
|
56
45
|
}
|
|
57
46
|
|
|
58
47
|
// this is for backward compatibility
|
data/scripts/peer-deps/audit.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
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.
|
|
4
|
+
version: 0.0.10
|
|
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
|