This repository contains shared configuration files used to configure my personal development environment and projects.
- eslint
- cspell
- markdownlint
- vite
- tsconfig
- unwritten
- changelogen
npm i --save-dev @schoero/configs
// .vscode/extensions.json
{
"recommendations": [
"dbaeumer.vscode-eslint",
"DavidAnson.vscode-markdownlint",
"streetsidesoftware.code-spell-checker"
]
}
// .vscode/launch.json
{
"configurations": [
{
"args": [
"run",
"${relativeFileDirname}/${fileBasenameNoExtension}"
],
"autoAttachChildProcesses": true,
"console": "integratedTerminal",
"name": "debug current test file",
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
"request": "launch",
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"smartStep": true,
"type": "node"
},
{
"args": [
"run",
"${relativeFileDirname}/${fileBasenameNoExtension}"
],
"autoAttachChildProcesses": true,
"console": "integratedTerminal",
"name": "debug current test file with node internals",
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
"request": "launch",
"skipFiles": [],
"smartStep": true,
"type": "node"
}
],
"version": "0.2.0"
}
// package.json
{
"scripts": {
// vite
"build": "vite build",
"prebuild": "npm run typecheck && npm run lint && npm run spellcheck",
"typecheck": "tsc --noEmit",
// eslint
"eslint": "eslint --ext .ts,.tsx,.js,.jsx,.json,.jsonc,.yml,.md .",
"eslint:ci": "npm run eslint -- --max-warnings 0",
"eslint:fix": "npm run eslint -- --fix",
"lint": "npm run eslint && npm run markdownlint",
"lint:ci": "npm run eslint:ci && npm run markdownlint:ci",
"lint:fix": "npm run eslint:fix && npm run markdownlint:fix",
// markdownlint
"markdownlint": "markdownlint-cli2 '**/*.md' '#node_modules'",
"markdownlint:ci": "npm run markdownlint",
"markdownlint:fix": "npm run markdownlint -- --fix",
// changelogen
"postrelease:alpha": "npm run postrelease",
"postrelease:beta": "npm run postrelease",
"postrelease:latest": "eslint --fix package.json && markdownlint-cli2-fix 'CHANGELOG.md'",
"prerelease:alpha": "npm run test -- --run && npm run build",
"prerelease:beta": "npm run test -- --run && npm run build",
"prerelease:latest": "npm run test -- --run && npm run build",
"publish:alpha": "npm run publish:latest -- --publishTag alpha",
"publish:beta": "npm run publish:latest -- --publishTag beta",
"publish:latest": "changelogen gh release && changelogen --publish",
"release:alpha": "npm run release -- --prerelease alpha",
"release:beta": "npm run release -- --prerelease beta",
"release:latest": "changelogen --bump --output --no-tag",
// cspell
"spellcheck": "cspell .",
"spellcheck:ci": "npm run spellcheck -- --no-progress",
"test": "vitest -c ./vite.config.ts"
}
}