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 3.0.0-beta.0 to 3.0.0

2

CHANGELOG.md

@@ -1,2 +0,2 @@

UNRELEASED v3.0.0
2017-06-12 v3.0.0 [migration guide](MIGRATION_TO_V3.md)
* **Breaking: lint script tags separately** #49 #55 #56

@@ -3,0 +3,0 @@ * ESLint 4 support #57

{
"name": "eslint-plugin-html",
"version": "3.0.0-beta.0",
"description": "An ESLint plugin to extract and lint scripts from HTML files.",
"version": "3.0.0",
"description": "A ESLint plugin to lint and fix inline scripts contained in HTML files.",
"license": "ISC",

@@ -23,15 +23,16 @@ "repository": {

"devDependencies": {
"eslint": "3",
"jest": "^20.0.0",
"prettier-eslint-cli": "^3.4.3",
"eslint": "^4.0.0",
"eslint-config-benoitz": "^1.0.0",
"jest": "^20.0.3",
"prettier-eslint-cli": "^4.1.0",
"semver": "^5.3.0"
},
"scripts": {
"prettier": "git ls -- '*.js' | xargs prettier-eslint",
"prettier": "git ls-files -- '*.js' | xargs prettier-eslint",
"validate": "npm run lint && npm run check-format && npm run test",
"test": "jest",
"lint": "eslint .",
"check-format": "[[ -z $(npm run -s prettier -- --list-different) ]]",
"check-format": "[ -z $(npm run -s prettier -- --list-different) ]",
"format": "npm run -s prettier -- --write"
}
}

@@ -6,8 +6,9 @@ eslint-plugin-html

This [`ESLint`](http://eslint.org) plugin extracts and lints scripts from HTML files.
This [`ESLint`](http://eslint.org) plugin allows linting and fixing inline scripts contained in HTML
files.
Only script tags with no type attribute or a type attribute containing a MIME type known to
represent JavaScript such as `text/javascript` or `application/javascript`, or `text/babel` will be
linted.
Migration to v3
---------------
If you are considering upgrading to v3, please read [this guide](MIGRATION_TO_V3.md).

@@ -50,2 +51,5 @@ Usage

> Note: all settings can be written either as `"html/key": value` or in a nested object `"html": {
> "key": value }`
### `html/html-extensions`

@@ -52,0 +56,0 @@

@@ -118,3 +118,3 @@ "use strict"

if (isESLintVersion(">= 4.0.0-alpha.0")) {
if (isESLintVersion(">= 4")) {
expect(messages.length).toBe(9)

@@ -188,3 +188,3 @@

if (isESLintVersion(">= 4.0.0-beta.0")) {
if (isESLintVersion(">= 4")) {
expect(messages.length).toBe(7)

@@ -277,3 +277,3 @@

if (isESLintVersion(">= 4.0.0-alpha.0")) {
if (isESLintVersion(">= 4")) {
expect(messages.length).toBe(6)

@@ -350,3 +350,3 @@

if (isESLintVersion(">= 3 || >= 4.0.0-beta.0")) {
if (isESLintVersion(">= 3")) {
expect(messages[1].message).toBe(

@@ -483,3 +483,3 @@ "File must be at most 1 lines long. It's 7 lines long."

if (isESLintVersion(">= 3.17.0 || >= 4.0.0-alpha.0")) {
if (isESLintVersion(">= 3.17.0")) {
// Since v3.17.0, no-extra-semi replaces all semicolons by a single semi colon instead of

@@ -603,3 +603,3 @@ // removing extra semi colons. See https://github.com/eslint/eslint/pull/8067 .

settings: {
"html/javascript-mime-types": "/^(application|text)\/foo$/",
"html/javascript-mime-types": "/^(application|text)/foo$/",
},

@@ -606,0 +606,0 @@ })

@@ -72,7 +72,7 @@ "use strict"

throw new Error(
oneLine`
oneLine`
Invalid value for html/report-bad-indent,
expected one of 0, 1, 2, "off", "warn" or "error"
`
)
)
}

@@ -89,6 +89,6 @@

? (Array.isArray(rawJavaScriptMIMETypes)
? rawJavaScriptMIMETypes
: [rawJavaScriptMIMETypes]).map(
(s) => (s.startsWith("/") ? compileRegExp(s) : s)
)
? rawJavaScriptMIMETypes
: [rawJavaScriptMIMETypes]).map(
(s) => (s.startsWith("/") ? compileRegExp(s) : s)
)
: [/^(application|text)\/(x-)?(javascript|babel|ecmascript-6)$/i]

@@ -95,0 +95,0 @@

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