Skip to content
Merged
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
12 changes: 0 additions & 12 deletions .eslintrc.json

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: pnpm test

typecheck:
name: Type Check
name: Lint and Type Check
runs-on: ubuntu-latest

steps:
Expand All @@ -57,5 +57,8 @@ jobs:
- name: Install deps
run: pnpm install

- name: Lint
run: pnpm lint

- name: Type-check
run: pnpm type-check
6 changes: 3 additions & 3 deletions demo.citty.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineCommand, createMain, CommandDef } from 'citty';
import { defineCommand, createMain, CommandDef, ArgsDef } from 'citty';
import tab from './src/citty';

const main = defineCommand({
Expand Down Expand Up @@ -58,7 +58,7 @@ const lintCommand = defineCommand({
main.subCommands = {
dev: devCommand,
lint: lintCommand,
} as Record<string, CommandDef<any>>;
} as Record<string, CommandDef<ArgsDef>>;

const completion = await tab(main, {
subCommands: {
Expand Down Expand Up @@ -121,7 +121,7 @@ const completion = await tab(main, {
},
});

completion;
void completion;

const cli = createMain(main);

Expand Down
19 changes: 19 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import eslintjs from '@eslint/js';
import { configs as tseslintConfigs } from 'typescript-eslint';
import prettierConfig from 'eslint-config-prettier';

const { configs: eslintConfigs } = eslintjs;

export default [
{
...eslintConfigs.recommended,
files: ['src/**/*.ts'],
},
...tseslintConfigs.strict,
{
rules: {
'@typescript-eslint/no-unused-vars': 'off',
},
},
prettierConfig,
];
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"format": "prettier --write .",
"format:check": "prettier --check .",
"build": "tsup",
"prepare": "pnpm build"
"prepare": "pnpm build",
"lint": "eslint src \"./*.ts\""
},
"files": [
"dist"
Expand All @@ -21,15 +22,13 @@
"license": "ISC",
"devDependencies": {
"@types/node": "^22.7.4",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"cac": "^6.7.14",
"citty": "^0.1.6",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.2.2",
"prettier": "^3.4.2",
"prettier": "^3.5.2",
"tsup": "^8.3.6",
"tsx": "^4.19.1",
"typescript-eslint": "^8.25.0",
"typescript": "^5.7.3",
"vitest": "^2.1.3"
},
Expand Down
Loading