Installation
JS Style Kit is available as an npm package. Install it with your package manager of choice:Basic Manual Setup
ESLint Configuration
Create aneslint.config.js
file in your project root:
Note: If you’re not usingSetup your"type": "module"
in your package.json, name your fileeslint.config.mjs
instead.
package.json
commands:
Note: The --max-warnings 0
option is important because all rules are set to warning by default.
Prettier Configuration
Create a.prettierrc.js
file in your project root:
.prettierrc.mjs
file.
Add the formatting commands to your package.json
:
Using the CLI (Experimental)
JS Style Kit includes a CLI to help set up your project quickly:- Install js-style-kit as a dev dependency
- Create configuration files
- Set up package.json scripts
- Configure VS Code settings
Note: The CLI is still in beta and works best with new projects.