[Linting] add lint-scripts
Opened this issue · 0 comments
psimk commented
@pota/lint-scripts
Commands
fix
- runs allfix
commands synchronously or in parallelfix:scripts
- runs a JavaScript/TypeScript code linter, with auto-fixingfix:style
- runs a CSS/SASS/Styled Components code linter, with auto-fixinglint
- runs alllint
commands synchronously or in parallellint:scripts
- runs a JavaScript/TypeScript code linterlint:style
- runs a CSS/SASS/Styled Components code linter
Description
We have already been using a setup similar to this in most of our templates, for example the @pota/muban-template
:
package.json
"scripts": {
"fix": "run-s fix:* && npm run format",
"fix:eslint": "npm run lint:eslint -- --fix",
"lint": "run-s lint:*",
"lint:eslint": "eslint . --ext .ts,.tsx --cache --cache-location node_modules/.cache/.eslintcache"
},
The fix
and lint
commands are implemented using npm-run-all, and fix:eslint
is just running lint
with an additional --fix
argument for eslint.
scripts
linting can be implemented using eslint and style
linting can be implemented using stylelint.
See #39 for context