Skip to content

Commit

Permalink
build: Added eslint checks for JS inlined into HTML files
Browse files Browse the repository at this point in the history
  • Loading branch information
cederberg committed Mar 17, 2024
1 parent 75ac28a commit d950258
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"parserOptions": {
"ecmaVersion": 2020
},
"plugins": [
"html"
],
"settings": {
"html/html-extensions": [".html", ".tmpl"]
},
"extends": "eslint:recommended",
"globals": {
"global": "readonly",
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ test-html:
npx html-validate 'doc/*.html' 'src/plugin/*/files/index.tmpl'

test-js:
npx eslint 'src/plugin/**/*.{js,cjs,mjs}' \
npx eslint src/plugin --ext '.js,.cjs,.mjs,.html,.tmpl' \
--ignore-pattern 'src/plugin/legacy/**/*.js' \
--ignore-pattern '**/*.min.js' \
--ignore-pattern '**/MochiKit.js'
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"devDependencies": {
"esbuild": "^0.20.1",
"eslint": "^8.44.0",
"eslint-plugin-html": "^8.0.0",
"highlight.js": "^11.8.0",
"html-validate": "^8.0.5",
"jsdoc": "^4.0.2",
Expand Down

0 comments on commit d950258

Please sign in to comment.