@ackee/styleguide-backend-config
v0.5.1-alpha.2
Published
styleguide-backend-config
Downloads
1,961
Keywords
Readme
Ackee styleguide: Backend config
Configuration files for styleguide enforcement tools
Setup
npm i -D @ackee/styleguide-backend-config
ESLint
.eslintrc.js
or .eslintrc.cjs
for ESM projects
module.exports = require('@ackee/styleguide-backend-config/eslint')
{
// npm tasks
"eslint:check": "eslint --ignore-path .gitignore '**/*.ts' -f codeframe",
"eslint:fix": "npm run 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
"prettier:check": "prettier --ignore-path .gitignore --check '**/*.{ts,js,json,md}'",
"prettier:fix": "npm run prettier:check -- --write '**/*.{ts,js,json,md}'",
}
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.