Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: upgrade eslint to v9 and flag config #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .eslintrc.yml

This file was deleted.

36 changes: 36 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import * as hamster from '@hamster-bot/eslint-config'

/** @type {import('eslint').Linter.Config[]} */
export default [
...hamster.configs.typescript,
{
rules: {
/*
* We highly depend on `require` for dynamic import i18n files.
* FIXME: Maybe we can use `import` instead of `require` in the future.
*/
'@typescript-eslint/no-require-imports': 'off',
},
},
{
languageOptions: {
parserOptions: {
project: './tsconfig.eslint.json',
projectService: false,
},
},
},
{
ignores: [
'external',
'node_modules',
'lib',
'dist',
'coverage',
'docs/.vitepress/dist',
'docs/.vitepress/cache',
'packages/*/lib',
'packages/*/dist',
],
},
]
23 changes: 8 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,35 @@
"bump": "yakumo version",
"dep": "yakumo upgrade",
"pub": "yakumo publish",
"lint": "eslint --ext .tsx,.ts,.js .",
"format": "prettier --write .",
"lint": "eslint .",
"test": "yakumo mocha -r esbuild-register -r yml-register",
"test:text": "shx rm -rf coverage && c8 -r text yarn test",
"test:json": "shx rm -rf coverage && c8 -r json yarn test",
"test:html": "shx rm -rf coverage && c8 -r html yarn test"
},
"devDependencies": {
"@cordisjs/vitepress": "^3.2.7",
"@hamster-bot/eslint-config": "^1.0.5",
"@hamster-bot/eslint-config": "^2.3.0",
"@koishijs/plugin-database-memory": "^3.0.0",
"@koishijs/plugin-mock": "^2.6.5",
"@types/chai": "^4.3.12",
"@types/mocha": "^10.0.6",
"@types/node": "^20.14.9",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.14.1",
"c8": "^10.1.2",
"@types/node": "^22.1.0",
"c8": "^8.0.1",
"chai": "^5.1.0",
"esbuild": "^0.20.2",
"esbuild-register": "^3.5.0",
"eslint": "^8.57.0",
"eslint": "^9.8.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-mocha": "^10.3.0",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-mocha": "^10.5.0",
"jest-mock": "^29.7.0",
"koishi": "^4.17.2",
"koishi-plugin-puppeteer": "^3.8.2",
"mocha": "^10.4.0",
"prettier": "^3.2.5",
"sass": "^1.71.1",
"shx": "^0.3.4",
"typescript": "^5.4.2",
"typescript": "^5.5.4",
"typescript-eslint": "^8.0.1",
"vitepress": "^1.2.3",
"yakumo": "^0.3.13",
"yakumo-esbuild": "^0.3.26",
Expand Down
12 changes: 12 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
},
"include": [
"eslint.config.mjs",
"docs/.vitepress/*.ts",
"packages/*/src/**/*.ts",
"packages/*/tests/**/*.ts",
]
}
Loading
Loading