Skip to content

Commit

Permalink
change import order for better style
Browse files Browse the repository at this point in the history
  • Loading branch information
Samantha-Zhan committed Nov 12, 2024
1 parent 4e4b985 commit bfead8d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/eslint-plugin/src/stylex-no-unused.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

'use strict';

import getSourceCode from './utils/getSourceCode';
/*:: import { Rule } from 'eslint'; */
import type {
CallExpression,
Expression,
Expand All @@ -25,6 +23,8 @@ import type {
ExportNamedDeclaration,
ReturnStatement,
} from 'estree';
import getSourceCode from './utils/getSourceCode';
/*:: import { Rule } from 'eslint'; */

type PropertyValue =
| Property
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/stylex-sort-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

'use strict';

import getSourceCode from './utils/getSourceCode';
import type { Token } from 'eslint/eslint-ast';
import type { RuleFixer, SourceCode } from 'eslint/eslint-rule';
import type {
Expand All @@ -21,6 +20,7 @@ import type {
ObjectExpression,
Comment,
} from 'estree';
import getSourceCode from './utils/getSourceCode';
import getPropertyName from './utils/getPropertyName';
import getPropertyPriorityAndType from './utils/getPropertyPriorityAndType';
/*:: import { Rule } from 'eslint'; */
Expand Down
8 changes: 1 addition & 7 deletions packages/eslint-plugin/src/stylex-valid-shorthands.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@ import type {
ObjectExpression,
Comment,
} from 'estree';

import type { SourceCode } from 'eslint/eslint-rule';

import type { Token } from 'eslint/eslint-ast';

import {
createBlockInlineTransformer,
createSpecificTransformer,
createDirectionalTransformer,
} from './utils/splitShorthands.js';

import { CANNOT_FIX } from './utils/splitShorthands.js';

/*:: import { Rule } from 'eslint'; */

import getSourceCode from './utils/getSourceCode';
/*:: import { Rule } from 'eslint'; */

const legacyNameMapping: $ReadOnly<{ [key: string]: ?string }> = {
marginStart: 'marginInlineStart',
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/utils/getSourceCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

'use strict';

/*:: import { Rule } from 'eslint'; */
import type { SourceCode } from 'eslint/eslint-rule';
/*:: import { Rule } from 'eslint'; */

// Fallback to legacy `getSourceCode()` for compatibility with older ESLint versions
export default function getSourceCode(context: Rule.RuleContext): SourceCode {
Expand Down

0 comments on commit bfead8d

Please sign in to comment.