{"id":20710702,"url":"https://github.com/nice-move/eslint-plugin-html","last_synced_at":"2026-02-10T20:06:55.755Z","repository":{"id":57683215,"uuid":"480221303","full_name":"nice-move/eslint-plugin-html","owner":"nice-move","description":"ESLint plugin for script tags in HTML files","archived":false,"fork":false,"pushed_at":"2025-01-02T08:52:04.000Z","size":315,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-27T11:38:41.015Z","etag":null,"topics":["eslint","eslint-plugin","html"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nice-move.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-11T04:05:17.000Z","updated_at":"2025-01-02T08:52:08.000Z","dependencies_parsed_at":"2024-12-25T07:30:59.948Z","dependency_job_id":"15ebe54b-f1b4-40cb-a816-6053628af22a","html_url":"https://github.com/nice-move/eslint-plugin-html","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"03b3ab470cc7857c841af02cf3e7f4a0bbfa68d8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nice-move/eslint-plugin-html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-move%2Feslint-plugin-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-move%2Feslint-plugin-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-move%2Feslint-plugin-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-move%2Feslint-plugin-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nice-move","download_url":"https://codeload.github.com/nice-move/eslint-plugin-html/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-move%2Feslint-plugin-html/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29314704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint","eslint-plugin","html"],"created_at":"2024-11-17T02:12:54.409Z","updated_at":"2026-02-10T20:06:55.731Z","avatar_url":"https://github.com/nice-move.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @nice-move/eslint-plugin-html\n\n[ESLint] plugin to lint script tags in HTML.\n\n[![npm][npm-badge]][npm-url]\n[![github][github-badge]][github-url]\n![node][node-badge]\n\n[eslint]: https://eslint.org/\n[npm-url]: https://www.npmjs.com/package/@nice-move/eslint-plugin-html\n[npm-badge]: https://img.shields.io/npm/v/@nice-move/eslint-plugin-html.svg?style=flat-square\u0026logo=npm\n[github-url]: https://github.com/nice-move/eslint-plugin-html\n[github-badge]: https://img.shields.io/npm/l/@nice-move/eslint-plugin-html.svg?style=flat-square\u0026colorB=blue\u0026logo=github\n[node-badge]: https://img.shields.io/node/v/@nice-move/eslint-plugin-html.svg?style=flat-square\u0026colorB=green\u0026logo=node.js\n\n## Installation\n\n```bash\nnpm install @nice-move/eslint-plugin-html --save-dev\n```\n\n## Usage\n\n### Eslint 8.x\n\n```cjs\n// eslintrc.js\n\nmodule.exports = {\n  extends: ['plugin:@nice-move/html/recommended']\n};\n\n// or\n\nmodule.exports = {\n  extends: ['plugin:@nice-move/html/base']\n};\n\n// or\n\nmodule.exports = {\n  overrides: [\n    {\n      files: ['*.{htm,html}'],\n      plugins: ['@nice-move/eslint-plugin-html']\n    },\n    {\n      files: ['**/*.{htm,html}/**/html-script-legacy.js'],\n      parserOptions: {\n        sourceType: 'script'\n      }\n    },\n    {\n      files: ['**/*.{htm,html}/**/html-script-module.js'],\n      parserOptions: {\n        sourceType: 'module'\n      }\n    }\n  ]\n};\n```\n\n### Eslint 9.x\n\n```mjs\n// eslint.config.mjs\n\nimport {\n  base,\n  recommended\n} from '@nice-move/eslint-plugin-html/lib/configs-next.mjs';\n\nlet configs = [...base];\n\n// or\n\nconfigs = [...recommended];\n\n// or\n\nconfigs = [\n  {\n    files: ['*.{htm,html}'],\n    processor: '@nice-move/html/html',\n    plugins: {\n      '@nice-move/html': plugin\n    }\n  },\n  {\n    files: ['**/*.{htm,html}/**/html-script-legacy.js'],\n    parserOptions: {\n      sourceType: 'script'\n    }\n  },\n  {\n    files: ['**/*.{htm,html}/**/html-script-module.js'],\n    parserOptions: {\n      sourceType: 'module'\n    }\n  }\n];\n\nexport default config;\n```\n\n## Todos\n\n- [ ] SVG support\n\n## Tips\n\n### Different from [eslint-plugin-html](https://github.com/BenoitZugmeyer/eslint-plugin-html)\n\n`@nice-move/eslint-plugin-html` using [processor](https://eslint.org/docs/developer-guide/working-with-plugins#processors-in-plugins) to treat `\u003cscript\u003e` and `\u003cscript type=\"module\"\u003e` differently.\n\nSee: https://github.com/BenoitZugmeyer/eslint-plugin-html/issues/139\n\nAnd `@nice-move/eslint-plugin-html` is bundle-able.\n\n### [Visual Studio Code](https://code.visualstudio.com/) support\n\nWhen using [Eslint for VS Code](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint), you may need to add following code to settings:\n\n```jsonc\n// example: settings.json or .vscode/settings.json\n// I don't know why `eslint-plugin-html` don't need this.\n{\n  \"eslint.validate\": [\"html\"]\n}\n```\n\n## Known Issues\n\n### Not compatible with [import/first](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md) rule.\n\nSee: https://github.com/import-js/eslint-plugin-import/issues/2407\n\n```xhtml --hack:not-html\n\u003cscript\u003e\n  import 'http://something';\n\n  console.log('this example trigger error');\n\u003c/script\u003e\n```\n\n### Can't share variable between multiple script tags\n\nSee: [Reason why](#different-from-eslint-plugin-html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-move%2Feslint-plugin-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnice-move%2Feslint-plugin-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-move%2Feslint-plugin-html/lists"}