Socket
Socket
Sign inDemoInstall

eslint-plugin-html

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-html

A ESLint plugin to lint and fix inline scripts contained in HTML files.


Version published
Weekly downloads
426K
decreased by-15.21%
Maintainers
1
Weekly downloads
 
Created

What is eslint-plugin-html?

eslint-plugin-html is an ESLint plugin that allows you to lint and fix inline scripts contained in HTML files. It helps ensure that your JavaScript code within HTML files adheres to the coding standards and best practices defined by your ESLint configuration.

What are eslint-plugin-html's main functionalities?

Linting inline scripts in HTML files

This feature allows you to lint JavaScript code that is embedded within HTML files. The plugin parses the HTML file, extracts the inline scripts, and applies ESLint rules to them.

<!DOCTYPE html>
<html>
<head>
  <title>Example</title>
  <script>
    var foo = 'bar';
    console.log(foo);
  </script>
</head>
<body>
  <h1>Hello, world!</h1>
</body>
</html>

Fixing issues in inline scripts

In addition to linting, eslint-plugin-html can also automatically fix certain issues in your inline scripts, just like ESLint does for standalone JavaScript files.

<!DOCTYPE html>
<html>
<head>
  <title>Example</title>
  <script>
    var foo = 'bar';
    console.log(foo);
  </script>
</head>
<body>
  <h1>Hello, world!</h1>
</body>
</html>

Other packages similar to eslint-plugin-html

Keywords

FAQs

Package last updated on 25 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc