Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ineshbose committed Jul 11, 2024
1 parent 6bb93e2 commit d11f4f2
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { existsSync } from 'node:fs'
import { defineNuxtConfig } from 'nuxt/config'
import { resolve } from 'pathe'
import { consola } from 'consola'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import typography from '@tailwindcss/typography'

import type { ModuleHooks, ModuleOptions } from '../src/types'
Expand Down
6 changes: 0 additions & 6 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ type InlineTWConfig = _Omit<TWConfig, 'content' | 'plugins' | 'safelist'> & {
safelist?: Exclude<NonNullable<TWConfig['safelist']>[number], Record<string, any>>[]
}

type ExtendTWConfig = {
content?:
| TWConfig['content']
| ((contentDefaults: Array<string>) => TWConfig['content'])
}

type BoolObj<T extends Record<string, any>> = boolean | Partial<T>

export type ViewerConfig = {
Expand Down
4 changes: 2 additions & 2 deletions test/configs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('tailwindcss module configs', async () => {
// Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
// expect(output).toContain('Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.')

expect(output).toContain('[warn] [nuxt:tailwindcss] Failed to load config \`./malformed-tailwind.config.js\` due to the error below. Skipping..')
expect(output).toContain('[warn] [nuxt:tailwindcss] Failed to load config `./malformed-tailwind.config.js` due to the error below. Skipping..')
})

test('ts config file is loaded and merged', () => {
Expand All @@ -88,7 +88,7 @@ describe('tailwindcss module configs', async () => {

expect(contentFiles[0]).toBe('ts-content/**/*.md')
expect(contentFiles[1]).toBe('./custom-theme/**/*.vue')
expect(contentFiles.filter(c => /{[AE],[ae]}/.test(c)).length).toBe(0)
expect(contentFiles.filter(c => /\{[AE],[ae]\}/.test(c)).length).toBe(0)
expect([...contentFiles].pop()).toBe('my-custom-content')
})

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/basic/override-tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default {
content: contentDefaults => [
contentDefaults[0],
'./custom-theme/**/*.vue',
...contentDefaults.filter(c => !/{[AE],[ae]}/.test(c)),
...contentDefaults.filter(c => !/\{[AE],[ae]\}/.test(c)),
],
theme: {
extend: {
Expand Down
1 change: 0 additions & 1 deletion test/sink.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ describe.skipIf(!existsSync(fixturePath))('nuxt.com', async () => {
beforeAll(() => {
const generateCommand = exec(`cd ${fixturePath} && pnpm generate`)

// eslint-disable-next-line no-constant-condition
while (true) {
if (
existsSync(`${fixturePath}.output/public/index.html`)
Expand Down

0 comments on commit d11f4f2

Please sign in to comment.