Skip to content

Commit

Permalink
chore: bump eslint, migrate to configurajs/eslint and configurajs/pre…
Browse files Browse the repository at this point in the history
…ttier
  • Loading branch information
chouchouji committed Jan 8, 2025
1 parent fc6f502 commit 7e315c1
Show file tree
Hide file tree
Showing 10 changed files with 1,424 additions and 239 deletions.
5 changes: 0 additions & 5 deletions .eslintrc

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

8 changes: 4 additions & 4 deletions bin/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
import { release, publish, changelog, commitLint } from '../dist/index.js'
import { Command } from 'commander'
import fse from 'fs-extra'
import { changelog, commitLint, publish, release } from '../dist/index.js'

const program = new Command()

Expand All @@ -18,21 +18,21 @@ program
.option('-nt --npm-tag <npmTag>', 'Npm tag')
.option('-c --check-remote-version', 'Check remote version')
.description('Release all packages and generate changelogs')
.action(async (options) => release(options))
.action((options) => release(options))

program
.command('publish')
.option('-c --check-remote-version', 'Check remote version')
.option('-nt --npm-tag <npmTag>', 'Npm tag')
.description('Publish to npm')
.action(async (options) => publish(options))
.action((options) => publish(options))

program
.command('changelog')
.option('-rc --releaseCount <releaseCount>', 'Release count')
.option('-f --file <file>', 'Changelog filename')
.description('Generate changelog')
.action(async (options) => changelog(options))
.action((options) => changelog(options))

program
.command('commit-lint')
Expand Down
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { defineConfig } from '@configurajs/eslint'

export default defineConfig()
56 changes: 29 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@varlet/release",
"type": "module",
"version": "0.3.2",
"description": "publish all packages, generate changelogs and check commit messages",
"keywords": [
Expand All @@ -9,37 +8,38 @@
"changelog",
"commit-lint"
],
"author": "clencat <[email protected]>",
"license": "MIT",
"bugs": "https://github.com/varletjs/release/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/varletjs/release"
},
"bugs": "https://github.com/varletjs/release/issues",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"license": "MIT",
"author": "clencat <[email protected]>",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"bin": {
"vr": "bin/index.js"
},
"files": [
"dist"
],
"scripts": {
"dev": "tsup --watch",
"build": "tsup",
"release": "pnpm build && node bin/index.js release -c",
"lint": "eslint . --ext .ts,.js",
"format": "prettier --write .",
"clean": "rimraf node_modules dist",
"commit-lint": "node bin/index.js commit-lint"
"commit-lint": "node bin/index.js commit-lint",
"dev": "tsup --watch",
"format": "prettier --write .",
"lint": "eslint --fix .",
"release": "pnpm build && node bin/index.js release -c"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --allow-empty --concurrent false",
Expand All @@ -51,34 +51,36 @@
"eslint --fix"
]
},
"packageManager": "[email protected]",
"engines": {
"node": ">=16.0.0",
"pnpm": ">=9.0"
"dependencies": {
"@inquirer/prompts": "^6.0.1",
"commander": "^11.1.0",
"conventional-changelog": "^5.1.0",
"fs-extra": "^11.1.1",
"glob": "^10.3.10",
"nanospinner": "^1.1.0",
"picocolors": "^1.0.0",
"semver": "^7.5.4",
"tinyexec": "^0.3.0"
},
"devDependencies": {
"@configurajs/eslint": "^0.0.14",
"@configurajs/prettier": "^0.0.2",
"@types/conventional-changelog": "^3.1.5",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.9.0",
"@types/semver": "^7.5.5",
"@varlet/eslint-config": "^2.18.4",
"eslint": "^8.53.0",
"eslint": "^9.17.0",
"lint-staged": "^15.2.0",
"prettier": "^3.1.0",
"rimraf": "^6.0.1",
"simple-git-hooks": "^2.9.0",
"tsup": "^8.3.0",
"typescript": "^5.2.2"
},
"dependencies": {
"@inquirer/prompts": "^6.0.1",
"commander": "^11.1.0",
"conventional-changelog": "^5.1.0",
"fs-extra": "^11.1.1",
"glob": "^10.3.10",
"nanospinner": "^1.1.0",
"picocolors": "^1.0.0",
"semver": "^7.5.4",
"tinyexec": "^0.3.0"
"packageManager": "[email protected]",
"engines": {
"node": ">=16.0.0",
"pnpm": ">=9.0"
}
}
Loading

0 comments on commit 7e315c1

Please sign in to comment.