Skip to content

Commit

Permalink
style: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jul 14, 2023
1 parent e52cc17 commit 892be67
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
@@ -1,3 +1,4 @@
{
"editor.formatOnSave": true
"editor.formatOnSave": true,
"eslint.experimental.useFlatConfig": true
}
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -60,7 +60,7 @@
"access": "public"
},
"scripts": {
"lint": "eslint . --ext .js,.ts,.json,.md",
"lint": "eslint .",
"lint:fix": "pnpm run lint --fix",
"build": "pnpm check && tsup",
"test": "tsx ./src/cli.ts --update && vitest",
Expand Down
2 changes: 1 addition & 1 deletion src/command.ts
@@ -1,14 +1,14 @@
import consola from 'consola'
import { INSTALL_COMMANDS } from './constant'
import {
type PackageManager,
calcHash,
calcMtime,
checkHash,
checkMtime,
storeHash,
storeMtime,
} from '.'
import type { PackageManager } from './constant'

export async function update(pm: PackageManager) {
await Promise.all([
Expand Down
3 changes: 1 addition & 2 deletions src/helper.ts
Expand Up @@ -2,8 +2,7 @@ import { basename, resolve } from 'node:path'
import { existsSync } from 'node:fs'
import { readFile } from 'node:fs/promises'
import { findUp } from 'find-up'
import { AGENTS_AND_LOCKS, LOCKS } from './constant'
import type { PackageManager } from './constant'
import { AGENTS_AND_LOCKS, LOCKS, type PackageManager } from './constant'

// fork from https://github.com/antfu/ni/blob/main/src/detect.ts, but remove some unnecessary functions here.
export const getProjectInfo = async ({
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -6,13 +6,13 @@ import { ensureDir } from 'fs-extra'
import { getProjectInfo } from './helper'
import {
PMS,
type PackageManager,
cacheDir,
hashFile,
lockFileMap,
mtimeFile,
rcFileMap,
} from './constant'
import type { PackageManager } from './constant'

export * from './constant'
export * from './command'
Expand Down
6 changes: 3 additions & 3 deletions src/nuxt.ts
@@ -1,9 +1,9 @@
import { defineNuxtModule } from '@nuxt/kit'
import { PROJECT_NAME, check, getPackageManager } from '.'
import type { PackageManager } from '.'
import type {} from '@nuxt/schema'
import { consola } from 'consola'
import { PROJECT_NAME, type PackageManager, check, getPackageManager } from '.'
import {} from '@nuxt/schema'

// eslint-disable-next-line import/no-default-export
export default defineNuxtModule<{
enabled?: boolean
packageManager?: PackageManager
Expand Down

0 comments on commit 892be67

Please sign in to comment.