@zumerbox/lint-preset
v0.1.0
Published
ESLint, Stylelint and Prettier presets bundled as ready-to-run binaries
Maintainers
Readme
@zumerbox/lint-preset
Bundled ESLint, Stylelint and Prettier presets, exposed as ready-to-run binaries. No config setup needed in the consumer project.
This package replaces and consolidates four previously separate packages:
| Old package | New binary |
| --- | --- |
| @zumerbox/js-lint | lint-js |
| @zumerbox/css-lint | lint-css |
| @zumerbox/scss-lint | lint-scss |
| @zumerbox/code-format | format |
The old packages are deprecated on npm.
Install
npm install @zumerbox/lint-preset --save-devOr run on demand without installing:
npx @zumerbox/lint-preset lint-jsUsage
npx lint-js [paths] [eslint flags] # ESLint with bundled config
npx lint-css [stylelint flags] # Stylelint over **/*.css
npx lint-scss [stylelint flags] # Stylelint over **/*.scss
npx format [prettier flags] # Prettier --check (add --write to fix)The format binary checks {.,docs,src,bin,test,mocks,app}/**/*.{js,html,md} by default.
What's in each preset
- ESLint — extends
eslint:recommendedandprettier. Envs: browser, node, es2021, jest.sourceType: module. - Stylelint (CSS) — extends
stylelint-config-standard. - Stylelint (SCSS) — extends
stylelint-config-standard-scss. - Prettier — no semicolons, single quotes, 2-space indent,
printWidth: 80,trailingComma: 'none'.
License
MIT
