mirror of
https://github.com/rust-lang/mdBook.git
synced 2025-12-27 07:54:20 -05:00
This updates eslint to lint on the toc.js.hbs file. This file uses a small amount of hbs templating which eslint can't handle. This adds a hacky preprocessor which will strips out the handlebars tags so that the file can be linted.
11 lines
354 B
JSON
11 lines
354 B
JSON
{
|
|
"dependencies": {
|
|
"browser-ui-test": "0.21.1",
|
|
"eslint": "^9.34.0"
|
|
},
|
|
"scripts": {
|
|
"lint": "eslint --no-warn-ignored crates/mdbook-html/front-end/*js crates/mdbook-html/front-end/**/*js crates/mdbook-html/front-end/**/*js.hbs",
|
|
"lint-fix": "eslint --fix crates/mdbook-html/front-end/*js crates/mdbook-html/front-end/**/*js"
|
|
}
|
|
}
|