Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 26, 2024
1 parent b1b7eda commit c713107
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
7 changes: 3 additions & 4 deletions packages/case-police/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/* eslint-disable no-console */
import { existsSync, promises as fs } from 'node:fs'
import process from 'node:process'
import fg from 'fast-glob'
import isText from 'is-text-path'
import minimist from 'minimist'
import pLimit from 'p-limit'
import c from 'picocolors'
// @ts-expect-error missing types
import parseIgnore from 'parse-gitignore'
import isText from 'is-text-path'
import pLimit from 'p-limit'
import minimist from 'minimist'
import { version } from '../package.json'
import { buildRegex, loadDictPresets, replace } from './utils'

Expand Down
2 changes: 1 addition & 1 deletion packages/case-police/src/dirs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fileURLToPath } from 'node:url'
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'

export const distDir = fileURLToPath(new URL('../dist', import.meta.url))
export const dictDir = resolve(distDir, '../dict')
2 changes: 1 addition & 1 deletion packages/case-police/test/duplicate.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
import fg from 'fast-glob'
import { describe, expect, it } from 'vitest'
import { loadAllPresets, resolvePreset } from '../src/utils'

describe('duplicate', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/case-police/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'node:path'
import { existsSync, promises as fs } from 'node:fs'
import path from 'node:path'
import { describe, expect, it } from 'vitest'
import { replace, resolvePreset } from '../src/utils'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { RuleOption } from '../types'
import fs from 'node:fs'
import path from 'node:path'
import { run } from 'eslint-vitest-rule-tester'
import tsPaser from '@typescript-eslint/parser'
import type { RuleOption } from '../types'
import { run } from 'eslint-vitest-rule-tester'
import rule from './string-check'

const valids: ([string, [RuleOption]] | [string])[] = [
Expand Down
10 changes: 5 additions & 5 deletions packages/eslint-plugin-case-police/src/rule/string-check.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { join } from 'node:path'
import type { RuleListener } from '@typescript-eslint/utils/ts-eslint'
import type { TSESTree } from '@typescript-eslint/utils'
import { createSyncFn } from 'synckit'
import type { RuleListener } from '@typescript-eslint/utils/ts-eslint'
import type { RuleOption } from '../types'
import { join } from 'node:path'
import { replaceCore } from 'case-police'
import { createEslintRule } from '../utils'
import { createSyncFn } from 'synckit'
import { distDir } from '../dirs'
import type { RuleOption } from '../types'
import { createEslintRule } from '../utils'

export const RULE_NAME = 'string-check'
export type MessageIds = 'CasePoliceError'
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin-case-police/src/worker-load.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { runAsWorker } from 'synckit'
import { loadDictPresets } from 'case-police'
import type { RuleOption } from './types'
import { loadDictPresets } from 'case-police'
import { runAsWorker } from 'synckit'

runAsWorker(async (options: RuleOption) => {
const defaults = options.noDefault
Expand Down

0 comments on commit c713107

Please sign in to comment.