@c4605/toolconfs

Some configuration files for my favorite tools

Usage no npm install needed!

<script type="module">
  import c4605Toolconfs from 'https://cdn.skypack.dev/@c4605/toolconfs';
</script>

README

@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.

    {
      "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:

    # ts
    yarn add @typescript-eslint/eslint-plugin @typescript-eslint/parser -D
    # prettier
    yarn add eslint-config-prettier eslint-plugin-prettier -D
    # react
    yarn add eslint-plugin-react eslint-plugin-react-hooks -D
    
  • .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')