Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- name: Lint Files
run: npm run lint

- name: Lint Files, Dependencies, & Exports
run: npm run lint:unused

- name: Check Formatting
run: npm run fmt:check

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Publish to JSR
run: |
if [ -f "jsr.json" ]; then
npx jsr publish
npx -y jsr publish
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that everywhere else uses jsr@latest, only this one doesn't have @latest. 🤔

else
echo "No jsr.json file found, skipping JSR publish."
fi
Expand Down
37 changes: 37 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignore": ["templates/**/*"],
"workspaces": {
".": { "entry": ["scripts/*.js", "tools/*.js", ".github/workflows/*.yml"] },
"packages/compat": {
"ignoreDependencies": ["eslint"],
"entry": ["tests/**/*.{js,ts}"],
"project": ["src/**/*.{js,ts}", "tests/*.{js,ts}"]
},
"packages/config-array": {
"entry": ["tests/**/*.{js,ts}", "rollup.std__path-config.js"],
"project": ["src/**/*.{js,ts}", "tests/**/*.{js,ts}"]
},
"packages/config-helpers": {
"entry": ["tests/**/*.{js,ts}"],
"project": ["src/**/*.{js,ts}", "tests/**/*.{js,ts}"]
},
"packages/core": { "project": ["src/**/*.{js,ts}"] },
"packages/mcp": {
"entry": ["tests/**/*.{js,ts}"],
"project": ["src/**/*.{js,ts}", "tests/**/*.{js,ts}"]
},
"packages/migrate-config": {
"entry": ["src/migrate-config.js", "tests/**/*.{js,ts}"],
"project": ["src/**/*.{js,ts}", "tests/*.{js,ts}"]
},
"packages/object-schema": {
"entry": ["tests/**/*.{js,ts}", "src/types.ts"],
"project": ["src/**/*.{js,ts}", "tests/**/*.{js,ts}"]
},
"packages/plugin-kit": {
"entry": ["tests/**/*.{js,ts}"],
"project": ["src/**/*.{js,ts}", "tests/**/*.{js,ts}"]
}
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"prepare": "npm run build",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"lint:unused": "knip",
"fmt": "prettier --write .",
"fmt:check": "prettier --check .",
"test:jsr": "npm run test:jsr --workspaces --if-present",
Expand Down Expand Up @@ -39,6 +40,7 @@
"eslint": "^9.27.0",
"eslint-config-eslint": "^11.0.0",
"got": "^14.4.1",
"knip": "^5.62.0",
"lint-staged": "^15.2.0",
"mocha": "^11.5.0",
"prettier": "^3.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"scripts": {
"build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts",
"build": "rollup -c && tsc -p tsconfig.esm.json && npm run build:cts",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test": "mocha tests/*.js",
"test:coverage": "c8 npm test"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/compat/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.base.json",
"files": ["src/index.js"],
"compilerOptions": {
"outDir": "dist/esm"
"outDir": "dist/esm",
"types": ["mocha", "@eslint/core", "node"]
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given these packages are all using mocha, I was wondering if we could move it to tsconfig.base.json? (That way we wouldn't have to add it in each package's tsconfig.json)

}
2 changes: 1 addition & 1 deletion packages/config-array/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts",
"build:std__path": "rollup -c rollup.std__path-config.js && node fix-std__path-imports",
"build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts && npm run build:std__path",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"pretest": "npm run build",
"test": "mocha tests/",
"test:coverage": "c8 npm test"
Expand Down
3 changes: 2 additions & 1 deletion packages/config-array/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.base.json",
"files": ["src/index.js"],
"compilerOptions": {
"outDir": "dist/esm"
"outDir": "dist/esm",
"types": ["mocha"]
}
}
3 changes: 1 addition & 2 deletions packages/config-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js",
"build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts",
"build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test": "mocha tests/*.js",
"test:coverage": "c8 npm test",
"test:types": "tsc -p tests/types/tsconfig.json"
Expand All @@ -47,7 +47,6 @@
},
"homepage": "https://github.com/eslint/rewrite/tree/main/packages/config-helpers#readme",
"devDependencies": {
"@eslint/core": "^0.15.2",
"eslint": "^9.27.0",
"rollup-plugin-copy": "^3.5.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"build:cts": "node -e \"fs.cpSync('dist/esm/types.d.ts', 'dist/cjs/types.d.cts')\"",
"build": "tsc && npm run build:cts",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test:types": "tsc -p tests/types/tsconfig.json"
},
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion packages/migrate-config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.base.json",
"files": ["src/migrate-config-cli.js"],
"compilerOptions": {
"outDir": "dist/esm"
"outDir": "dist/esm",
"types": ["mocha", "@types/eslint"]
}
}
2 changes: 1 addition & 1 deletion packages/object-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"scripts": {
"build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts",
"build": "rollup -c && tsc -p tsconfig.esm.json && npm run build:cts",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test": "mocha tests/",
"test:coverage": "c8 npm test"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/object-schema/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.base.json",
"files": ["src/index.js"],
"compilerOptions": {
"outDir": "dist/esm"
"outDir": "dist/esm",
"types": ["mocha"]
}
}
2 changes: 1 addition & 1 deletion packages/plugin-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"pretest": "npm run build",
"test": "mocha tests/",
"test:coverage": "c8 npm test",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test:types": "tsc -p tests/types/tsconfig.json"
},
"keywords": [
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-kit/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"files": ["src/index.js"],
"compilerOptions": {
"outDir": "dist/esm",
"strict": true
"strict": true,
"types": ["mocha"]
}
}
2 changes: 1 addition & 1 deletion scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function publishPackagesToJsr(packageDirs) {

console.log(`Publishing ${packageDir}...`);
try {
exec(`npx jsr publish`, {
exec(`npx -y jsr publish`, {
stdio: "inherit",
env: process.env,
cwd: packageDir,
Expand Down
2 changes: 1 addition & 1 deletion templates/package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js",
"build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts",
"build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test": "mocha tests/*.js",
"test:coverage": "c8 npm test"
},
Expand Down
Loading