Skip to content

Latest commit

 

History

History

toolconfs

@c4605/toolconfs

Some configuration files for usual tools

  • commitlintrc.js: commitlint checks if your commit messages meet the conventional commit format.

    // .commitlintrc.js
    module.exports = {
      extends: ['@c4605/toolconfs/commitlintrc'],
      rules: {},
    }

    And install packages:

    yarn add @commitlint/config-conventional -D
  • prettierrc.yml: Prettier is an opinionated code formatter.

    // package.json
    {
      "prettier": "@c4605/toolconfs/prettierrc"
    }
  • renovate.json: Automated dependency updates service.

    {
      "extends": ["github>bolasblack/js-metarepo:packages/toolconfs/renovate"]
    }
  • tsconfig.json: The presence of a tsconfig.json file in a directory indicates that the directory is the root of a TypeScript project. The tsconfig.json file specifies the root files and the compiler options required to compile the project.

    {
      "$schema": "https://json.schemastore.org/tsconfig.json",
      "extends": "@c4605/toolconfs/tsconfig",
      "extends": "@c4605/toolconfs/tsconfig-node",
      "extends": "@c4605/toolconfs/tsconfig-esModule"
    }
  • eslintrc.[type].js: eslint config for TypeScript

    // .eslintrc.js
    module.exports = {
      extends: [
        "./node_modules/@c4605/toolconfs/eslintrc.base",
        "./node_modules/@c4605/toolconfs/eslintrc.prettier",
        "./node_modules/@c4605/toolconfs/eslintrc.ts",
      ],
      parserOptions: {
        project: './tsconfig.json',
      },
    }

    And install packages:

    yarn add -D eslint \
      @typescript-eslint/eslint-plugin @typescript-eslint/parser \
      eslint-config-prettier eslint-plugin-prettier \
      eslint-plugin-react eslint-plugin-react-hooks
  • .githooks: git hook more freely and quickly

  • lint-staged.config.js: Run linters against staged git files and don't let 💩 slip into your code base!

    module.exports = require('@c4605/toolconfs/lint-staged.config')