Skip to content

Commit

Permalink
fix: remove unneeded changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nmn committed Sep 10, 2024
1 parent 5b10b20 commit b043eb1
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 12 deletions.
1 change: 1 addition & 0 deletions packages/dev-runtime/src/stylex-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function createWithFns<S: { ... }>(
if (origKey.startsWith('var(') && origKey.endsWith(')')) {
key = origKey.slice(4, -1);
}

if (typeof value === 'function') {
const [staticObj, inlineStylesFn] = splitStaticObj(
value as $FlowFixMe,
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-plugin/src/stylex-valid-shorthands.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ const stylexValidShorthands = {
if (typeof key === 'string' && legacyNameMapping[key] != null) {
context.report({
node: property,
// $FlowFixMe[invalid-computed-prop]
message: `Use "${legacyNameMapping[key]}" instead of legacy formats like "${key}" to adhere to logical property naming.`,
fix: (fixer) => {
// $FlowFixMe - We've already checked that key is a string and in legacyNameMapping
Expand Down
12 changes: 4 additions & 8 deletions packages/shared/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,10 @@ export const utils: {
export const messages: typeof m = m;
export const IncludedStyles: typeof _IncludedStyles = _IncludedStyles;
export const firstThatWorks: typeof stylexFirstThatWorks = stylexFirstThatWorks;
export const PSEUDO_CLASS_PRIORITIES: $ReadOnly<{
+[string]: ?number,
...typeof _PSEUDO_CLASS_PRIORITIES,
}> = _PSEUDO_CLASS_PRIORITIES;
export const AT_RULE_PRIORITIES: $ReadOnly<{
+[string]: ?number,
...typeof _AT_RULE_PRIORITIES,
}> = _AT_RULE_PRIORITIES;
export const PSEUDO_CLASS_PRIORITIES: typeof _PSEUDO_CLASS_PRIORITIES =
_PSEUDO_CLASS_PRIORITIES;
export const AT_RULE_PRIORITIES: typeof _AT_RULE_PRIORITIES =
_AT_RULE_PRIORITIES;
export const PSEUDO_ELEMENT_PRIORITY: number = _PSEUDO_ELEMENT_PRIORITY;

export type InjectableStyle = _InjectableStyle;
Expand Down
1 change: 0 additions & 1 deletion packages/shared/src/preprocess-rules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default function flatMapExpandedShorthands(
const expansion: (
string | number | null,
) => $ReadOnlyArray<[string, TStyleValue]> =
// $FlowFixMe[invalid-computed-prop]
expansions[options.styleResolution ?? 'application-order'][key];
if (expansion) {
if (Array.isArray(value)) {
Expand Down
1 change: 0 additions & 1 deletion packages/shared/src/stylex-define-vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export default function styleXDefineVars<Vars: VarsConfig>(
);

const injectableStyles = constructCssVariablesString(
// $FlowFixMe[incompatible-call] - Can't use a class when a plain object is expected
variablesMap,
themeNameHash,
);
Expand Down
1 change: 0 additions & 1 deletion packages/shared/src/utils/property-priorities.js
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,6 @@ export default function getPriority(key: string): number {
? key.slice(0, key.indexOf('('))
: key;

// $FlowFixMe[invalid-computed-prop]
return PSEUDO_CLASS_PRIORITIES[prop] ?? 40;
}

Expand Down

0 comments on commit b043eb1

Please sign in to comment.