0.4.1 • Published 4 months ago
@ackee/styleguide-backend-config v0.4.1
Ackee styleguide: Backend config
Configuration files for styleguide enforcement tools
Setup
npm i -D @ackee/styleguide-backend-config
ESLint
.eslintrc.js
module.exports = require('@ackee/styleguide-backend-config/eslint')
{
// npm tasks
"cs:eslint:check": "eslint --ignore-path .gitignore '**/*.ts' -f codeframe",
"cs:eslint:fix": "npm run cs:eslint:check -- --fix"
}
For detailed rules description, see eslint
Prettier
npm install -D prettier
prettier.config.js
module.exports = require('@ackee/styleguide-backend-config/prettier')
{
// npm tasks
"cs:prettier:check": "prettier --ignore-path .gitignore --check '**/*.{ts,js,json,md}'",
"cs:prettier:fix": "npm run cs:prettier:check -- --write '**/*.{ts,js,json,md}'"
}
Editorconfig
npm install -D eclint
Copy .editorconfig
from this project
{
// npm tasks
"cs:eclint:check": "eclint check '**/*'",
"cs:eclint:fix": "eclint fix '**/*'"
}
Husky
.husky\pre-commit
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
.lintstagedrc
{
"*.ts": ["prettier --write", "eslint --fix"],
"*.{ts,js,json,md}": "prettier --write",
"*": ["eclint fix", "eclint check"]
}
Danger
dangerfile.ts
import {
danger,
warn,
message,
fail,
markdown,
schedule,
peril,
results,
} from 'danger'
import { runDangerRules } from '@ackee/styleguide-backend-config/danger'
void runDangerRules(
{ danger, warn, message, fail, markdown, schedule, peril, results },
{
/* pass options */
}
)
License
This project is licensed under MIT.
0.4.1
4 months ago
0.4.0
4 months ago
0.3.13
1 year ago
0.3.12
1 year ago
0.3.11
1 year ago
0.3.10
1 year ago
0.3.9
1 year ago
0.3.6
1 year ago
0.3.5
1 year ago
0.3.8
1 year ago
0.3.7
1 year ago
0.3.4
1 year ago
0.3.3
1 year ago
0.3.2
2 years ago
0.3.0
2 years ago
0.3.1
2 years ago
0.2.2
4 years ago
0.2.1
4 years ago
0.2.0
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.4
4 years ago
0.1.5
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago