Socket
Socket
Sign inDemoInstall

eslint-plugin-html

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-html - npm Package Compare versions

Comparing version 6.0.3 to 6.1.0

src/getFileMode.js

3

CHANGELOG.md

@@ -0,1 +1,4 @@

2020-09-06 v6.1.0
* Allow dots in extensions #127
2020-08-08 v6.0.3

@@ -2,0 +5,0 @@ * Update dependencies

2

package.json
{
"name": "eslint-plugin-html",
"version": "6.0.3",
"version": "6.1.0",
"description": "A ESLint plugin to lint and fix inline scripts contained in HTML files.",

@@ -5,0 +5,0 @@ "license": "ISC",

@@ -8,2 +8,3 @@ "use strict"

const getSettings = require("./settings").getSettings
const getFileMode = require("./getFileMode")

@@ -112,17 +113,2 @@ const PREPARE_RULE_NAME = "__eslint-plugin-html-prepare"

function getMode(pluginSettings, filenameOrOptions) {
const filename =
typeof filenameOrOptions === "object"
? filenameOrOptions.filename
: filenameOrOptions
const extension = path.extname(filename || "")
if (pluginSettings.htmlExtensions.indexOf(extension) >= 0) {
return "html"
}
if (pluginSettings.xmlExtensions.indexOf(extension) >= 0) {
return "xml"
}
}
function patch(Linter) {

@@ -150,3 +136,3 @@ const verifyMethodName = Linter.prototype._verifyWithoutProcessors

const pluginSettings = getSettings(config.settings || {})
const mode = getMode(pluginSettings, filenameOrOptions)
const mode = getFileMode(pluginSettings, filenameOrOptions)

@@ -153,0 +139,0 @@ if (!mode || typeof textOrSourceCode !== "string") {

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