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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ coverage
dist
.vscode
.DS_Store
.eslintcache
*.log*
*.env*
3 changes: 3 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://unpkg.com/oxfmt/configuration_schema.json"
}
4 changes: 4 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://unpkg.com/oxlint/configuration_schema.json",
"plugins": ["unicorn", "typescript", "oxc"]
}
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Changelog


## v0.0.5

[compare changes](https://github.com/unjs/codeup/compare/v0.0.4...v0.0.5)
Expand Down Expand Up @@ -86,12 +85,10 @@

## v0.0.1


### 🏡 Chore

- Lint ([becfa92](https://github.com/unjs/codeup/commit/becfa92))

### ❤️ Contributors

- Pooya Parsa ([@pi0](http://github.com/pi0))

14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ export default defineAction({
"eslint.config.mjs",
getConfigTemplate({
rules: eslintRC?.rules || {},
ignores: eslintignore.filter(
(i) => !["", "node_modules", "dist", "coverage"].includes(i),
),
ignores: eslintignore.filter((i) => !["", "node_modules", "dist", "coverage"].includes(i)),
}),
);

Expand All @@ -90,20 +88,14 @@ export default defineAction({
});

// Ensure latest eslint and preset versions are installed
await utils.addDevDependency([
"eslint@^9.0.0",
"eslint-config-unjs@^0.3.0",
]);
await utils.addDevDependency(["eslint@^9.0.0", "eslint-config-unjs@^0.3.0"]);

// Run lint:fix script once
await utils.runScript("lint:fix");
},
});

function getConfigTemplate(opts: {
rules: Record<string, unknown>;
ignores: string[];
}) {
function getConfigTemplate(opts: { rules: Record<string, unknown>; ignores: string[] }) {
return /* js */ `
import unjs from "eslint-config-unjs";

Expand Down
14 changes: 3 additions & 11 deletions actions/unjs/eslint-flat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export default defineAction({
"eslint.config.mjs",
getConfigTemplate({
rules: eslintRC?.rules || {},
ignores: eslintignore.filter(
(i) => !["", "node_modules", "dist", "coverage"].includes(i),
),
ignores: eslintignore.filter((i) => !["", "node_modules", "dist", "coverage"].includes(i)),
}),
);

Expand All @@ -44,20 +42,14 @@ export default defineAction({
});

// Ensure latest eslint and preset versions are installed
await utils.addDevDependency([
"eslint@^9.0.0",
"eslint-config-unjs@^0.3.0",
]);
await utils.addDevDependency(["eslint@^9.0.0", "eslint-config-unjs@^0.3.0"]);

// Run lint:fix script once
await utils.runScript("lint:fix");
},
});

function getConfigTemplate(opts: {
rules: Record<string, unknown>;
ignores: string[];
}) {
function getConfigTemplate(opts: { rules: Record<string, unknown>; ignores: string[] }) {
return /* js */ `
import unjs from "eslint-config-unjs";

Expand Down
4 changes: 1 addition & 3 deletions actions/unjs/update-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ export default defineAction({
}
});
const pm = await utils.detectPackageManager();
for (const lockfileName of [pm?.lockFile]
.flat()
.filter(Boolean) as string[]) {
for (const lockfileName of [pm?.lockFile].flat().filter(Boolean) as string[]) {
await utils.remove(lockfileName);
}
await utils.runPackageManagerCommand("install");
Expand Down
7 changes: 0 additions & 7 deletions eslint.config.mjs

This file was deleted.

25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"name": "codeup",
"version": "0.0.5",
"description": "Automated Codebase Maintainer.",
"repository": "unjs/codeup",
"license": "MIT",
"sideEffects": false,
"repository": "unjs/codeup",
"bin": "./dist/cli/index.mjs",
"files": [
"dist"
],
"type": "module",
"sideEffects": false,
"types": "./dist/index.d.ts",
"exports": {
".": "./dist/index.mjs",
"./utils": "./dist/utils/index.mjs"
},
"types": "./dist/index.d.mts",
"bin": "./dist/cli/index.mjs",
"files": [
"dist"
],
"scripts": {
"build": "obuild",
"codeup": "jiti ./dist/cli/index.mjs",
"lint": "eslint . && prettier -c .",
"lint:fix": "automd && eslint . --fix && prettier -w .",
"lint": "oxlint && oxfmt --check",
"format": "automd && oxlint --fix && oxfmt",
"prepack": "pnpm build",
"play": "jiti playground",
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags && pnpm build --stub",
Expand All @@ -43,10 +43,9 @@
"@typescript/native-preview": "^7.0.0-dev.20260129.1",
"automd": "^0.4.2",
"changelogen": "^0.6.2",
"eslint": "^9.39.2",
"eslint-config-unjs": "^0.6.2",
"obuild": "^0.4.22",
"prettier": "^3.8.1",
"obuild": "^0.4.14",
"oxfmt": "^0.27.0",
"oxlint": "^1.42.0",
"typescript": "^5.9.3"
},
"packageManager": "pnpm@10.28.2"
Expand Down
Loading
Loading