@artossystems/solutions-scripts

0.0.11 • Public • Published

solutions-scripts

CLI toolbox for common scripts for JavaScript and TypeScript projects.

Installation

yarn add -D @artossystems/solutions-scripts

Scripts

pre-commit

solutions-scripts comes with Husky and lint-staged. The pre-commit script will run prettier and linting over staged files. Add the following to your package.json:

{
  "husky": {
    "hooks": {
      "pre-commit": "solutions-scripts pre-commit"
    }
  }
}

lint

solutions-scripts comes with a rather strict ESLint configuration. By default it will run against your whole project, except files covered by your .gitignore, unless you provide your own eslintignore file or --ignore-path.

{
  "scripts": {
    "lint": "solutions-scripts lint"
  }
}

The configuration will detect TypeScript and React projects and apply rules accordingly.

For IDE integration, add your own ESLint config and extend the provided config:

{
  "eslintConfig": {
    "extends": [
      "./node_modules/@artossystems/solutions-scripts/dist/config/eslintrc"
    ]
  }
}

The same can be done for the Prettier config:

{
  "prettier": "./node_modules/@artossystems/solutions-scripts/dist/config/prettierrc"
}

Inspiration

This is heavily inspired by kcd-scripts. Check out Kent's blog posts: Concerning toolkits and Tools without config.

Publish

npm publish --access public

Readme

Keywords

none

Package Sidebar

Install

npm i @artossystems/solutions-scripts

Weekly Downloads

6

Version

0.0.11

License

MIT

Unpacked Size

66.4 kB

Total Files

18

Last publish

Collaborators

  • alexp_artos
  • nahuseyoum
  • fluorostani
  • andybry
  • jim_wilde
  • adrijardi