just-the-docs/package.json
Matt Wang 56a2dc560a
Fix prettier usage (#1172)
After some discussion in #1166, I realized that our prettier workflow is somewhat broken! This PR fixes it, by:

- separating Stylelint & Prettier (and removing `stylelint-prettier`) to clearly separate linting versus formatting 
    - this is also helpful for the upcoming upgrading of Stylelint
- having Prettier ignore `assets/js/zzzz-search-data.json`; on `main`, `npm run format` fails because of this file (Prettier doesn't know how to interpret the front matter)
- change `npm test` to run both Stylelint and Prettier on CI (uses `npm-run-all` utility
    - had to add one `// prettier-ignore` in `_includes/mermaid_config.js`, which I think is reasonably placed
- removing an unused `script` (that doesn't work!)

This is a no-op on the site itself, just for our dev environment/CI.

Ref: https://github.com/just-the-docs/just-the-docs/pull/1166#discussion_r1110397592.

---

Separately, upgrading to Stylelint 15 will come with another interaction - the [deprecation of stylistic rules](https://stylelint.io/migration-guide/to-15#deprecated-stylistic-rules) + shift to Prettier should be nice!
2023-03-02 00:05:39 -08:00

23 lines
726 B
JSON

{
"name": "just-the-docs",
"version": "0.3.3",
"description": "A modern Jekyll theme for documentation",
"repository": "just-the-docs/just-the-docs",
"license": "MIT",
"bugs": "https://github.com/just-the-docs/just-the-docs/issues",
"devDependencies": {
"npm-run-all": "^4.1.5",
"prettier": "^2.8.4",
"stylelint": "^14.16.1",
"stylelint-config-prettier-scss": "0.0.1",
"stylelint-config-standard-scss": "^6.1.0"
},
"scripts": {
"lint": "npm-run-all --parallel --continue-on-error lint:*",
"lint:css": "stylelint '**/*.scss'",
"lint:formatting": "prettier --check '**/*.{scss,js,json}'",
"format": "prettier --write '**/*.{scss,js,json}'",
"test": "npm run lint"
}
}