Skip to content

Commit

Permalink
refactor: use @src/ and @config/ alias import
Browse files Browse the repository at this point in the history
  • Loading branch information
0m4r committed Jan 1, 2025
1 parent aee72d6 commit fb9229a
Show file tree
Hide file tree
Showing 20 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion tests/unit/buildFigmaData.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defaultSettings } from '../../src/config/defaultSettings'
import { defaultSettings } from '@config/defaultSettings'
import buildFigmaData from '@utils/buildFigmaData'
import getTokenNodes from '@utils/getTokenNodes'
jest.mock('@utils/getTokenNodes', () => jest.fn())
Expand Down
46 changes: 23 additions & 23 deletions tests/unit/exportRawTokenArray.test.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@

import { exportRawTokenArray } from '@utils/getTokenJson'
import extractFonts from '../../src/extractor/extractFonts'
import extractEffects from '../../src/extractor/extractEffects'
import extractGrids from '../../src/extractor/extractGrids'
import extractColors from '../../src/extractor/extractColors'
import extractSizes from '../../src/extractor/extractSizes'
import extractSpacing from '../../src/extractor/extractSpacing'
import extractBorders from '../../src/extractor/extractBorders'
import extractRadii from '../../src/extractor/extractRadii'
import extractMotion from '../../src/extractor/extractMotion'
import extractBreakpoints from '../../src/extractor/extractBreakpoints'
import extractOpacities from '../../src/extractor/extractOpacities'
import extractFonts from '@src/extractor/extractFonts'
import extractEffects from '@src/extractor/extractEffects'
import extractGrids from '@src/extractor/extractGrids'
import extractColors from '@src/extractor/extractColors'
import extractSizes from '@src/extractor/extractSizes'
import extractSpacing from '@src/extractor/extractSpacing'
import extractBorders from '@src/extractor/extractBorders'
import extractRadii from '@src/extractor/extractRadii'
import extractMotion from '@src/extractor/extractMotion'
import extractBreakpoints from '@src/extractor/extractBreakpoints'
import extractOpacities from '@src/extractor/extractOpacities'
import buildFigmaData from '@utils/buildFigmaData'
import { defaultSettings } from '../../src/config/defaultSettings'
jest.mock('../../src/extractor/extractFonts', () => jest.fn())
jest.mock('../../src/extractor/extractEffects', () => jest.fn())
jest.mock('../../src/extractor/extractGrids', () => jest.fn())
jest.mock('../../src/extractor/extractColors', () => jest.fn())
jest.mock('../../src/extractor/extractSizes', () => jest.fn())
jest.mock('../../src/extractor/extractSpacing', () => jest.fn())
jest.mock('../../src/extractor/extractBorders', () => jest.fn())
jest.mock('../../src/extractor/extractRadii', () => jest.fn())
jest.mock('../../src/extractor/extractMotion', () => jest.fn())
jest.mock('../../src/extractor/extractBreakpoints', () => jest.fn())
jest.mock('../../src/extractor/extractOpacities', () => jest.fn())
import { defaultSettings } from '@config/defaultSettings'
jest.mock('@src/extractor/extractFonts', () => jest.fn())
jest.mock('@src/extractor/extractEffects', () => jest.fn())
jest.mock('@src/extractor/extractGrids', () => jest.fn())
jest.mock('@src/extractor/extractColors', () => jest.fn())
jest.mock('@src/extractor/extractSizes', () => jest.fn())
jest.mock('@src/extractor/extractSpacing', () => jest.fn())
jest.mock('@src/extractor/extractBorders', () => jest.fn())
jest.mock('@src/extractor/extractRadii', () => jest.fn())
jest.mock('@src/extractor/extractMotion', () => jest.fn())
jest.mock('@src/extractor/extractBreakpoints', () => jest.fn())
jest.mock('@src/extractor/extractOpacities', () => jest.fn())
jest.mock('@utils/buildFigmaData', () => jest.fn())

describe('exportRawTokenArray', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractBorders.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import extractBorders from '../../src/extractor/extractBorders'
import extractBorders from '@src/extractor/extractBorders'
import { customTokenNode } from './data/customTokenNode.data'

describe('extracting borders', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractBreakpoints.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import extractBreakpoints from '../../src/extractor/extractBreakpoints'
import extractBreakpoints from '@src/extractor/extractBreakpoints'
import { customTokenNode } from './data/customTokenNode.data'

describe('extracting breakpoints', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractColors.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import extractColors from '../../src/extractor/extractColors'
import extractColors from '@src/extractor/extractColors'
import { paintStyleObjects } from './data/paintStyleObjects.data'

describe('extracting color fills', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractEffects.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import extractEffects from '../../src/extractor/extractEffects'
import extractEffects from '@src/extractor/extractEffects'
import { effectStyleObjects } from './data/effectStyleObjects.data'

describe('extracting effects', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractFonts.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import extractFonts from '../../src/extractor/extractFonts'
import extractFonts from '@src/extractor/extractFonts'
import { textStyleObjects, extractFontsOutput } from './data/textStyleObjects.data'

describe('extracting fonts', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractGrids.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import extractGrids from '../../src/extractor/extractGrids'
import extractGrids from '@src/extractor/extractGrids'
import { gridStyleObjects } from './data/gridStyleObjects.data'

describe('extracting grids', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractMotion.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import extractMotion, { __testing } from '../../src/extractor/extractMotion'
import extractMotion, { __testing } from '@src/extractor/extractMotion'
import { customTokenNode } from './data/customTokenNode.data'

describe('extracting motion tokens', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractOpacitites.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import extractOpacities from '../../src/extractor/extractOpacities'
import extractOpacities from '@src/extractor/extractOpacities'
import { customTokenNode } from './data/customTokenNode.data'

describe('extracting opacities', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractSizes.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import extractSizes from '../../src/extractor/extractSizes'
import extractSizes from '@src/extractor/extractSizes'
import { customTokenNode } from './data/customTokenNode.data'

describe('extracting sizes', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractSpacing.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import extractSpacing from '../../src/extractor/extractSpacing'
import extractSpacing from '@src/extractor/extractSpacing'
import { customTokenNode } from './data/customTokenNode.data'

describe('extracting spacing', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extractUtilities.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { filterByPrefix } from '../../src/extractor/extractUtilities'
import { filterByPrefix } from '@src/extractor/extractUtilities'

describe('filterByPrefix', () => {
const nodeList = [{
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/getFileId.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import getFileId from '@utils/getFileId'
import config from '../../src/config/config'
import config from '@config/config'

describe('getFileId', () => {
const figmaMock = {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/groupByName.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { groupByKeyAndName } from '@utils/groupByName'
import { defaultSettings } from '../../src/config/defaultSettings'
import { defaultSettings } from '@config/defaultSettings'

describe('groupByName', () => {
test('group tokens with name', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/prefixTokenName.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defaultSettings } from '../../src/config/defaultSettings'
import { defaultSettings } from '@config/defaultSettings'
import { prefixTokenName } from '@utils/prefixTokenName'

describe('prefixTokenName', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/settings.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getSettings, setSettings } from '@utils/settings'
import { stringifyJson } from '@utils/stringifyJson'
import { nameConversionType, tokenFormatType } from '@typings/settings'
import { defaultSettings } from '@src/config/defaultSettings'
import { defaultSettings } from '@config/defaultSettings'

beforeAll(() => {
// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/transformer.originalFormatTransformer.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { transformer } from '../../src/transformer/originalFormatTransformer'
import { transformer } from '@src/transformer/originalFormatTransformer'
import { extractedFigmaTokens } from './data/extractedFigmaTokens.data'
import { transformedOriginalTokens } from './data/transformedOriginalFormatTokens.data'

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/transformer.standardTransformer.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { transformer } from '../../src/transformer/standardTransformer'
import { transformer } from '@src/transformer/standardTransformer'
import { extractedFigmaTokens } from './data/extractedFigmaTokens.data'
import { transformedStandardTokens } from './data/transformedStandardTokens.data'

Expand Down
2 changes: 1 addition & 1 deletion types/pluginEvent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PluginCommands } from '../src/config/commands'
import { PluginCommands } from '@config/commands'

export type PluginMessage = {
command: PluginCommands
Expand Down

0 comments on commit fb9229a

Please sign in to comment.