Skip to content

Commit c576c26

Browse files
committed
fix(lint): fix linting
1 parent d65b447 commit c576c26

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export const $tokens = (path: DesignTokensPaths, key: keyof DesignToken = 'varia
4343
const { $dt } = jiti(import.meta.url)(module)
4444

4545
const fail = () => {
46-
// eslint-disable-next-line no-console
4746
const _key = key ? `.${key as string}` : ''
47+
// eslint-disable-next-line no-console
4848
console.log(`Could not find the token ${path}${_key}!`)
4949
}
5050

src/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { ViteDevServer } from 'vite'
1010
import { defu } from 'defu'
1111
import type { Nitro } from 'nitropack'
1212
import { generateTokens } from './runtime/server/utils'
13-
import { logger, name, version, NuxtLayer, resolveTokens, MODULE_DEFAULTS, createTokensDir, deleteTokensDir } from './utils'
13+
import { logger, name, version, NuxtLayer, resolveTokens, MODULE_DEFAULTS, createTokensDir } from './utils'
1414
import type { NuxtDesignTokens, ModuleOptions } from './index'
1515

1616
export default defineNuxtModule<ModuleOptions>({

src/utils.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { mkdir, rmdir } from 'fs/promises'
1+
import { mkdir } from 'fs/promises'
22
import { existsSync } from 'fs'
33
import { defu } from 'defu'
44
import { resolve } from 'pathe'
@@ -73,10 +73,6 @@ export const resolveTokens = (layers: NuxtLayer[]) => {
7373
return { tokensFilePaths, tokens }
7474
}
7575

76-
export const deleteTokensDir = async (path: string) => {
77-
if (existsSync(path)) { await rmdir(path, { recursive: true }) }
78-
}
79-
8076
export const createTokensDir = async (path: string) => {
8177
if (!existsSync(path)) { await mkdir(path, { recursive: true }) }
8278
}

0 commit comments

Comments
 (0)