Gathering detailed insights and metrics for @nice-move/eslint-plugin-html
Gathering detailed insights and metrics for @nice-move/eslint-plugin-html
Gathering detailed insights and metrics for @nice-move/eslint-plugin-html
Gathering detailed insights and metrics for @nice-move/eslint-plugin-html
ESLint plugin for script tags in HTML files
npm install @nice-move/eslint-plugin-html
Typescript
Module System
Min. Node Version
Node Version
NPM Version
49.7
Supply Chain
92.2
Quality
73.5
Maintenance
100
Vulnerability
98.9
License
JavaScript (98.95%)
Shell (1.05%)
Total Downloads
16,365
Last Day
2
Last Week
178
Last Month
395
Last Year
5,147
8 Commits
1 Watching
1 Branches
1 Contributors
Latest Version
0.1.0
Package Id
@nice-move/eslint-plugin-html@0.1.0
Unpacked Size
10.07 kB
Size
3.75 kB
File Count
9
NPM Version
11.0.0
Node Version
22.12.0
Publised On
25 Dec 2024
Cumulative downloads
Total Downloads
Last day
-90.9%
2
Compared to previous day
Last week
235.8%
178
Compared to previous week
Last month
2.6%
395
Compared to previous month
Last year
-18.6%
5,147
Compared to previous year
2
1
ESLint plugin to lint script tags in HTML.
1npm install @nice-move/eslint-plugin-html --save-dev
1// eslintrc.js 2 3module.exports = { 4 extends: ['plugin:@nice-move/html/recommended'] 5}; 6 7// or 8 9module.exports = { 10 extends: ['plugin:@nice-move/html/base'] 11}; 12 13// or 14 15module.exports = { 16 overrides: [ 17 { 18 files: ['*.{htm,html}'], 19 plugins: ['@nice-move/eslint-plugin-html'] 20 }, 21 { 22 files: ['**/*.{htm,html}/**/html-script-legacy.js'], 23 parserOptions: { 24 sourceType: 'script' 25 } 26 }, 27 { 28 files: ['**/*.{htm,html}/**/html-script-module.js'], 29 parserOptions: { 30 sourceType: 'module' 31 } 32 } 33 ] 34};
1// eslint.config.mjs 2 3import { 4 base, 5 recommended 6} from '@nice-move/eslint-plugin-html/lib/configs-next.mjs'; 7 8let configs = [...base]; 9 10// or 11 12configs = [...recommended]; 13 14// or 15 16configs = [ 17 { 18 files: ['*.{htm,html}'], 19 processor: '@nice-move/html/html', 20 plugins: { 21 '@nice-move/html': plugin 22 } 23 }, 24 { 25 files: ['**/*.{htm,html}/**/html-script-legacy.js'], 26 parserOptions: { 27 sourceType: 'script' 28 } 29 }, 30 { 31 files: ['**/*.{htm,html}/**/html-script-module.js'], 32 parserOptions: { 33 sourceType: 'module' 34 } 35 } 36]; 37 38export default config;
@nice-move/eslint-plugin-html
using processor to treat <script>
and <script type="module">
differently.
See: https://github.com/BenoitZugmeyer/eslint-plugin-html/issues/139
And @nice-move/eslint-plugin-html
is bundle-able.
When using Eslint for VS Code, you may need to add following code to settings:
1// example: settings.json or .vscode/settings.json 2// I don't know why `eslint-plugin-html` don't need this. 3{ 4 "eslint.validate": ["html"] 5}
See: https://github.com/import-js/eslint-plugin-import/issues/2407
1<script> 2 import 'http://something'; 3 4 console.log('this example trigger error'); 5</script>
See: Reason why
No vulnerabilities found.
No security vulnerabilities found.