@artossystems/solutions-scripts

CLI for common scripts for the Solutions Team's projects

Usage no npm install needed!

<script type="module">
  import artossystemsSolutionsScripts from 'https://cdn.skypack.dev/@artossystems/solutions-scripts';
</script>

README

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