0.5.0 • Published 11 months ago

@ackee/styleguide-backend-config v0.5.0

Weekly downloads
1,101
License
MIT
Repository
github
Last release
11 months ago

npm.io

Ackee styleguide: Backend config

Configuration files for styleguide enforcement tools

npm.io npm.io

Setup

npm i -D @ackee/styleguide-backend-config

ESLint

.eslintrc.js

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}'",
}

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"
}

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.2-alpha.2

11 months ago

0.4.2-alpha.1

11 months ago

0.4.2-alpha.0

1 year ago

0.5.0

11 months ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.13

2 years ago

0.3.12

2 years ago

0.3.11

2 years ago

0.3.10

2 years ago

0.3.9

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.0

3 years ago

0.3.1

3 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.4

5 years ago

0.1.5

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago