Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hd-scripts

hugomrdias1kMIT9.1.0

My personal config and scripts for web projects

cli-app, cli

readme

hd-scripts NPM Version NPM License tests

My personal config and scripts for projects

Install

pnpm install hd-scripts

Usage

package.json

{
  "main": "src/index.js",
  "types": "dist/src/index.d.ts",
  "files": ["dist/src", "src", "index.js", "cli.js"],
  "scripts": {
    "lint": "eslint . && prettier --check **/*.{js,ts,yml,json} --ignore-path .gitignore && tsc"
  },
  "simple-git-hooks": {
    "pre-commit": "npx lint-staged"
  },
  "lint-staged": {
    "*.{js,ts,md,yml,json}": "prettier --write",
    "*": "eslint --fix"
  },
  "eslintConfig": {
    "extends": "./node_modules/hd-scripts/eslint/index.js",
    "ignorePatterns": ["node_modules", "coverage", "dist", "docs"],
    // for preact
    "rules": {
      "react/no-unknown-property": "off",
      "react/prop-types": "off"
    },
    "settings": {
      "react": {
        "pragma": "h",
        "version": "18.0"
      }
    }
  },
  "prettier": "hd-scripts/prettier.config.js"
}

tsconfig.json

{
  "extends": "hd-scripts/tsconfig.json",
  "compilerOptions": {
    "outDir": "dist",
    "emitDeclarationOnly": true
  },
  "include": ["src", "test.js", "cli.js", "package.json"]
}

For typescript code bases:

{
  "extends": "hd-scripts/tsconfig.json",
  "compilerOptions": {
    "outDir": "dist",
    "module": "NodeNext",
    "moduleResolution": "NodeNext"
  },
  "include": ["src", "test.js", "cli.js", "package.json"]
}

In monorepos you can install hd-scripts only in the root and extends the root tsconfig.json in the packages.

License

MIT © Hugo Dias

changelog

Changelog

9.1.0 (2024-03-11)

Features

Bug Fixes

9.0.6 (2023-10-10)

Bug Fixes

  • remove more rules from markdown (f6ac7d2)

9.0.5 (2023-09-26)

Bug Fixes

  • disable no process in md (b8a148b)

9.0.4 (2023-09-26)

Bug Fixes

  • disable no-empty-mapping-value (345fd09)

9.0.3 (2023-09-26)

Bug Fixes

  • turn off valid-types and no-undef in md (c8c03d6)

9.0.2 (2023-09-26)

Bug Fixes

9.0.1 (2023-09-25)

Bug Fixes

9.0.0 (2023-09-25)

⚠ BREAKING CHANGES

  • add support for json, yaml, html, md and more

Features

  • add support for json, yaml, html, md and more (08ef023)

8.1.2 (2023-09-13)

Bug Fixes

  • find the nearest tsconfig.json (7bcf8ad)

8.1.1 (2023-09-13)

Bug Fixes

8.1.0 (2023-09-13)

Features

  • update deps and tweaks extensions (c03d549)

8.0.0 (2023-08-17)

⚠ BREAKING CHANGES

  • update deps

Features

7.0.0 (2023-06-13)

⚠ BREAKING CHANGES

  • update pkgs and jsdoc ts

Features

  • update pkgs and jsdoc ts (9b727a6)

6.0.0 (2023-04-06)

⚠ BREAKING CHANGES

  • update typescript and other deps

Features

  • update typescript and other deps (e04fb42)

5.0.0 (2023-03-08)

⚠ BREAKING CHANGES

  • update deps (#34)

Features

4.1.0 (2023-02-01)

Features

  • rm 'jsdoc/no-undefined-types': 'off' for js (#32) (abb640e)

4.0.0 (2023-01-18)

⚠ BREAKING CHANGES

  • big deps update

Features

3.0.2 (2022-10-12)

Bug Fixes

3.0.1 (2022-10-12)

Bug Fixes

3.0.0 (2022-10-12)

⚠ BREAKING CHANGES

  • add support for preact eslint config and update deps
  • upgrade deps and use standard ts

Features

  • add support for preact eslint config and update deps (53b1e36)
  • upgrade deps and use standard ts (8b0248a)

2.1.0 (2022-08-27)

Features

  • bring back standard-with-typescript and fix prettier (66cc25d)

2.0.1 (2022-05-24)

Bug Fixes

  • eslint ecmaVersion 2022 (2efd8bd)

2.0.0 (2022-05-24)

⚠ BREAKING CHANGES

  • update deps
  • bump deps to support eslint 8

Features

1.1.2 (2022-03-29)

Bug Fixes

1.1.1 (2022-02-17)

Bug Fixes

  • update eslint config to match unicorn (d2da324)

1.1.0 (2022-02-17)

Features

1.0.0 (2021-07-07)

⚠ BREAKING CHANGES

  • new plugin

Features

0.1.1 (2021-04-05)

Bug Fixes

0.1.0 (2021-04-05)

Features