0.2.5 • Published 5 months ago

@haydenull/fabric v0.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@haydenull/fabric

A collection of configuration files containing prettier, eslint, tsconfig and more

Usage

Install the package

pnpm add @haydenull/fabric -D

ESLint eslint-config

in .eslintrc.cjs

module.exports = {
  extends: [require.resolve('@haydenull/fabric/eslint/react')],
}

Prettier prettier

in prettier.config.cjs

module.exports = {
  ...require("@haydenull/fabric/prettier"),
}

Git verify commit

  1. install husky
  2. add commit-msg hook
npx husky add .husky/commit-msg 'npx haydenull-fabric verify-commit'

TypeScript tsconfig

in tsconfig.json

{
  "extends": "@haydenull/fabric/tsconfig/tsconfig.json",
}

czg czg

  1. global install
npm install -g czg

2.in cz.config.js

/** @type {import('czg').CommitizenGitOptions} */
module.exports = {
  ...require('@haydenull/fabric/cz'),
  scopes: [/** your scopes */],
}

Recommended

Use lint-staged

  1. Install
pnpm add -D lint-staged
  1. in package.json
{
  "lint-staged": {
    "**/*.{js,jsx,ts,tsx}": [
      "npx prettier --write",
      "npx eslint --fix"
    ]
  }
}
  1. add git hooks
npx husky add .husky/pre-commit 'npx lint-staged'

type check before commit

  1. in package.json
{
  "scripts": {
    "typecheck": "tsc --noEmit"
  }
}
  1. add git hooks
npx husky add .husky/pre-commit 'npm run typecheck'

spell check

Install Code Spell Checker Plugin for VSCode.

0.2.5

5 months ago

0.2.4

9 months ago

0.2.3

9 months ago

0.2.2

9 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.0

10 months ago

0.0.1-dev.13

10 months ago

0.0.1-dev.12

10 months ago

0.0.1-dev.11

10 months ago

0.0.1-dev.10

10 months ago

0.0.1-dev.9

10 months ago

0.0.1-dev.8

10 months ago

0.0.1-dev.7

10 months ago

0.0.1-dev.6

10 months ago

0.0.1-dev.5

10 months ago

0.0.1-dev.4

10 months ago

0.0.1-dev.3

10 months ago

0.0.1-dev.2

10 months ago

0.0.1-dev.1

10 months ago

0.0.1

10 months ago