- Single quotes, no semi
- Auto fix for formatting (aimed to be used standalone without Prettier)
- TypeScript, Vue, React out-of-box
- Lint also for json, yaml, markdown
- Sorted imports, dangling commas for cleaner commit diff
- Reasonable defaults, best practices, only one-line of config
pnpm add -D eslint @unonu/eslint-config
{
"extends": "@unonu"
}
OR
// package.json
{
"eslintConfig": {
"extends": "@unonu"
}
}
You don't need
.eslintignore
normally as it has been provided by the preset.
For example:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Create .vscode/settings.json
{
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
It is recommended not to use prettier when using eslint. This configuration has done quite a bit of formatting lint, leaving the rest of the flexibility and style to the developer.
Copy the .vscode
directory go to Your Project Root Directory
Copy the .github
directory go to Your Project Root Directory
Complete the commit message specification restriction and repair using Husky & lint-staged & COMMITLINT
- Copy the
.husky
directory andcommitlint.config.js
go to Your Project Root Directory - Edit your
.package.json
{
"scripts": {
"lint": "lint-staged",
"prepare": "husky install"
},
"lint-staged": {
"*.{vue,js,jsx,ts,tsx,json}": [
"eslint --fix",
"git add ." // Note that all files are automatically saved here, please use with `.gitignore`
]
}
}
.editorconfig
- Edit config.gitignore
Git ignore special filesLICENSE
Open Source LICENSEnetlify.toml
Netlify platform configurationpnpm-workspace.yaml
defines the root of the and enables you to include / exclude directories from the workspace.renovate.json
Use renovate to monitor third-party dependent updates
- unonu/vscode-settings - My VS Code settings
- unonu/eslint-config - My ESLint config
- unonu/ts-starter - My starter template for TypeScript library
- unonu/vitesse - My starter template for Vue & Vite app