History

fmt

Rhys Sullivan committed 6 months ago

Commit c92c57d1 parent 87ab5c7265 files · +5705 −8140Browse files

Showing the changes to scripts (5 of 265 files). Show all

Unified · Split

5 files
  1. scripts/check-release-notes.ts +2 −8
  2. scripts/oxlint-plugin-executor/rules/no-redundant-primitive-cast.js +2 −9
  3. scripts/oxlint-plugin-executor/rules/no-unsupported-effect-api.js +1 −2
  4. scripts/oxlint-plugin-executor/utils.js +3 −3
  5. scripts/publish-packages.ts +2 −6
scripts/check-release-notes.ts+2−8
@@ -61,11 +61,7 @@ const checkFile = (path: string): Violation[] => { · 60 unmodified lines
6161 };
6262
6363 const targets = process.argv.slice(2);
64−const defaultTarget = resolve(
65− import.meta.dir,
66− "..",
67− "apps/cli/release-notes/next.md",
68−);
64+const defaultTarget = resolve(import.meta.dir, "..", "apps/cli/release-notes/next.md");
6965 const paths = targets.length > 0 ? targets.map((p) => resolve(p)) : [defaultTarget];
7066
7167 let failed = false;
@@ -90,8 +86,6 @@ if (failed) { · 18 unmodified lines
9086 console.error(
9187 `\nForbidden Thanks handles: ${FORBIDDEN_THANKS_HANDLES.map((h) => `@${h}`).join(", ")}`,
9288 );
93− console.error(
94− "Use a credited external GitHub username, or omit the attribution entirely.",
95− );
89+ console.error("Use a credited external GitHub username, or omit the attribution entirely.");
9690 process.exit(1);
9791 }
scripts/oxlint-plugin-executor/rules/no-redundant-primitive-cast.js+2−9
@@ -3,11 +3,7 @@ import { isConfigOrTooling, unwrapExpression } from "../utils.js"; · 2 unmodified lines
33 const message =
44 "Avoid primitive casts like value as string. Remove redundant casts, or normalize unknown data with Schema/a typed adapter before use. Skill: wrdn-effect-schema-boundaries.";
55
6−const primitiveTypes = new Set([
7− "TSStringKeyword",
8− "TSNumberKeyword",
9− "TSBooleanKeyword",
10−]);
6+const primitiveTypes = new Set(["TSStringKeyword", "TSNumberKeyword", "TSBooleanKeyword"]);
117
128 const isPrimitiveType = (node) => primitiveTypes.has(node?.type);
139
@@ -31,10 +27,7 @@ export default { · 17 unmodified lines
3127 if (isConfigOrTooling(context.filename)) return {};
3228
3329 const check = (node) => {
34− if (
35− isPrimitiveType(node.typeAnnotation) &&
36− isPossiblyRedundantExpression(node.expression)
37− ) {
30+ if (isPrimitiveType(node.typeAnnotation) && isPossiblyRedundantExpression(node.expression)) {
3831 context.report({ node, message });
3932 }
4033 };
scripts/oxlint-plugin-executor/rules/no-unsupported-effect-api.js+1−2
@@ -15,8 +15,7 @@ const unsupported = new Map([ · 14 unmodified lines
1515 ],
1616 ]);
1717
18−const message = (name) =>
19− `${unsupported.get(name)} Skill: wrdn-effect-typed-errors.`;
18+const message = (name) => `${unsupported.get(name)} Skill: wrdn-effect-typed-errors.`;
2019
2120 export default {
2221 meta: {
scripts/oxlint-plugin-executor/utils.js+3−3
@@ -67,7 +67,8 @@ export function hasObjectProperty(node, name) { · 66 unmodified lines
6767
6868 export function getStringValue(node) {
6969 const expression = unwrapExpression(node);
70− if (expression?.type === "Literal" && typeof expression.value === "string") return expression.value;
70+ if (expression?.type === "Literal" && typeof expression.value === "string")
71+ return expression.value;
7172 if (expression?.type === "StringLiteral") return expression.value;
7273 return undefined;
7374 }
@@ -78,8 +79,7 @@ export function isIdentifier(node, name) { · 4 unmodified lines
7879
7980 export function isStringLiteral(node) {
8081 return (
81− (node?.type === "Literal" && typeof node.value === "string") ||
82− node?.type === "StringLiteral"
82+ (node?.type === "Literal" && typeof node.value === "string") || node?.type === "StringLiteral"
8383 );
8484 }
8585
scripts/publish-packages.ts+2−6
@@ -44,9 +44,7 @@ const PUBLIC_PACKAGE_DIRS = [ · 43 unmodified lines
4444 "packages/plugins/openapi",
4545 ] as const;
4646
47−const parseArgs = (
48− argv: ReadonlyArray<string>,
49−): { dryRun: boolean; prepareOnly: boolean } => {
47+const parseArgs = (argv: ReadonlyArray<string>): { dryRun: boolean; prepareOnly: boolean } => {
5048 let dryRun = false;
5149 let prepareOnly = false;
5250 for (const arg of argv) {
@@ -151,9 +149,7 @@ const applyWorkspaceVersions = async ( · 98 unmodified lines
151149 * `@effect-atom/*`, etc.) are real npm packages and pass through
152150 * unchanged.
153151 */
154− const renamePeerDepBlock = (
155− block: DependencyBlock | undefined,
156− ): DependencyBlock | undefined => {
152+ const renamePeerDepBlock = (block: DependencyBlock | undefined): DependencyBlock | undefined => {
157153 if (!block) return block;
158154 const next: DependencyBlock = {};
159155 let mutated = false;