diff --git a/.eslintrc.yml b/.eslintrc.yml index 2c0d644..4bc7196 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -1,2 +1,5 @@ extends: - '@hamster-bot/eslint-config/typescript' + +ignorePatterns: + - 'lib/**/*' diff --git a/package.json b/package.json index cd609ff..dba0e73 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "dev": "yarn build:tsup", "build:tsup": "tsup", "test": "mocha -r tsx -r yml-register --extension .spec.ts ./__tests__", - "lint": "eslint src/**/*.ts && yarn prettier --check", + "lint": "eslint './**/*.{js,ts,tsx}' && yarn prettier --check", "format": "yarn prettier --write", "prettier": "prettier '**/*.{js,ts,json,yml,yaml,md}' '!dist/**/*'" }, diff --git a/src/api.ts b/src/api.ts index bf88b78..0bc8c46 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,5 +1,5 @@ import { Context, Service } from 'koishi' -import type { SentencesParams } from 'koishi-plugin-hitokoto-sentences' +import { SentencesParams } from 'koishi-plugin-hitokoto-sentences' import { Config } from '.' diff --git a/tsup.config.ts b/tsup.config.ts index 2b535e5..b7f6145 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,3 +1,5 @@ +/* eslint-disable import/no-named-as-default-member */ +/* eslint-disable import/default */ import yaml from 'esbuild-plugin-yaml' import { defineConfig } from 'tsup' @@ -7,6 +9,6 @@ export default defineConfig({ format: ['cjs'], clean: true, outDir: 'lib', - esbuildPlugins: [yaml.yamlPlugin()], + esbuildPlugins: [yaml.yamlPlugin({})], esbuildOptions(options, context) {}, })