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

Use tsup #232

Merged
merged 3 commits into from
Sep 19, 2023
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
2 changes: 0 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ const { readGitignoreFiles } = require('eslint-gitignore');
module.exports = defineConfig({
ignorePatterns: [
...readGitignoreFiles(),
'src/index.cjs',
'src/index.js',
'.eslintrc.cjs', // Skip self linting
],
root: true,
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
- name: Check
run: pnpm run build

- name: Check scripts
run: pnpm run ts-check

- name: Test types
run: pnpm run typecheck

Expand Down
26 changes: 15 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,29 @@
"version": "1.23.0",
"description": "Provide a defineConfig function for .eslintrc.js files",
"scripts": {
"clean": "rimraf .eslintcache dist pnpm-lock.yaml node_modules",
"build": "tsc",
"clean": "rimraf coverage .eslintcache dist pnpm-lock.yaml node_modules",
"build": "tsup-node",
"format": "prettier --cache --write .",
"lint": "eslint --cache --cache-strategy content --report-unused-disable-directives .",
"lint:run": "eslint --cache --cache-strategy content --report-unused-disable-directives .",
"lint": "run-s build lint:run",
"typecheck": "vitest typecheck",
"ts-check": "tsc",
"test": "vitest",
"coverage": "vitest run --coverage",
"generate:rules": "tsx ./scripts/generate-rule-files/cli.ts",
"prepublishOnly": "pnpm run clean && pnpm install && pnpm run build",
"preflight": "pnpm install && run-s format lint build test typecheck"
"preflight": "pnpm install && run-s format lint ts-check test typecheck"
},
"type": "module",
"main": "src/index.cjs",
"module": "src/index.js",
"types": "src/index.d.ts",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./src/index.d.ts",
"import": "./src/index.js",
"require": "./src/index.cjs",
"default": "./src/index.js"
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
}
},
"keywords": [
Expand Down Expand Up @@ -70,6 +72,7 @@
"@types/node": "~20.4.8",
"@typescript-eslint/eslint-plugin": "~5.62.0",
"@typescript-eslint/parser": "~5.62.0",
"@vitest/coverage-v8": "~0.34.4",
"change-case": "~4.1.2",
"eslint": "~8.46.0",
"eslint-config-prettier": "~8.10.0",
Expand Down Expand Up @@ -106,6 +109,7 @@
"prettier-plugin-organize-imports": "~3.2.3",
"rimraf": "~5.0.1",
"ts-dedent": "~2.2.0",
"tsup": "~7.2.0",
"tsx": "~3.12.7",
"typescript": "~5.1.6",
"upper-case-first": "~2.0.2",
Expand Down
Loading