Skip to content

Commit 66b5ad8

Browse files
authored
Fix misc. lints, replace and remove some deps (#1668)
1 parent 0b2c09e commit 66b5ad8

File tree

24 files changed

+49
-141
lines changed

24 files changed

+49
-141
lines changed

examples/remix/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"@remix-run/react": "^2.17.2",
1414
"@remix-run/serve": "^2.17.2",
1515
"@vanilla-extract/css": "workspace:*",
16-
"isbot": "^4",
1716
"react": "^18.2.0",
1817
"react-dom": "^18.2.0"
1918
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@
6262
"manypkg": {
6363
"workspaceProtocol": "require"
6464
},
65-
"packageManager": "pnpm@10.10.0"
65+
"packageManager": "pnpm@10.24.0"
6666
}

packages/css/src/conditionalRulesets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class ConditionalRuleset {
2222
*
2323
* e.g. mobile -> tablet, desktop
2424
*/
25-
precedenceLookup: Map<Query, Set<String>>;
25+
precedenceLookup: Map<Query, Set<string>>;
2626

2727
constructor() {
2828
this.ruleset = new Map();

packages/css/src/transformCss.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class Stylesheet {
287287
value &&
288288
(value.includes('"') ||
289289
value.includes("'") ||
290-
/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(
290+
/^([A-Za-z-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(
291291
value,
292292
))
293293
? value

packages/css/src/validateSelector.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import dedent from 'dedent';
44

55
// https://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
66
function escapeRegex(string: string) {
7-
return string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
7+
return string.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
88
}
99

1010
export const validateSelector = (
@@ -24,7 +24,7 @@ export const validateSelector = (
2424
try {
2525
selectorParts = parse(selector);
2626
} catch (err) {
27-
throw new Error(`Invalid selector: ${replaceTarget()}`);
27+
throw new Error(`Invalid selector: ${replaceTarget()}`, { cause: err });
2828
}
2929

3030
selectorParts.forEach((tokens) => {
@@ -67,6 +67,7 @@ export const validateSelector = (
6767
6868
If your selector is targeting something global, use the 'globalStyle' function instead, e.g. if you wanted to write ${'`& h1`'}, you should instead write 'globalStyle(${'`${parent} h1`'}, { ... })'
6969
`,
70+
{ cause: err },
7071
);
7172
}
7273
});

packages/css/src/vars.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export function createGlobalThemeContract(
165165
: (value as string);
166166

167167
const varName =
168-
typeof rawVarName === 'string' ? rawVarName.replace(/^\-\-/, '') : null;
168+
typeof rawVarName === 'string' ? rawVarName.replace(/^--/, '') : null;
169169

170170
if (
171171
typeof varName !== 'string' ||

packages/integration/src/processVanillaFile.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ function stringifyExports(
269269
} catch (err) {
270270
console.error(err);
271271

272-
throw new Error('Invalid function serialization params');
272+
throw new Error('Invalid function serialization params', {
273+
cause: err,
274+
});
273275
}
274276
}
275277

packages/sprinkles/src/createSprinkles.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@ export const createSprinkles =
170170
}
171171
}
172172

173-
const format = (v: string | number) =>
174-
typeof v === 'string' ? `"${v}"` : v;
175-
176173
const invalidPropValue = (
177174
prop: string,
178175
value: string | number,
@@ -277,3 +274,7 @@ export const createSprinkles =
277274
properties: new Set(sprinklesKeys),
278275
});
279276
};
277+
278+
function format(v: string | number) {
279+
return typeof v === 'string' ? `"${v}"` : v;
280+
}

pnpm-lock.yaml

Lines changed: 3 additions & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/code-block-loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const getAdapter = () => {
3838
};
3939

4040
function extractFilesFromCodeBlock(code) {
41-
const fileMatches = code.matchAll(/(?:\/\/\s(?<fileName>[\w\.]+\.tsx?))/g);
41+
const fileMatches = code.matchAll(/(?:\/\/\s(?<fileName>[\w.]+\.tsx?))/g);
4242

4343
let lastIndex = code.length - 1;
4444

0 commit comments

Comments
 (0)