Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: BenoitZugmeyer/eslint-plugin-html
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.0.3
Choose a base ref
...
head repository: BenoitZugmeyer/eslint-plugin-html
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.0.4
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on May 12, 2019

  1. Copy the full SHA
    ced2723 View commit details
  2. Copy the full SHA
    ae77420 View commit details
  3. 5.0.4

    BenoitZugmeyer committed May 12, 2019
    Copy the full SHA
    080627d View commit details
Showing with 11 additions and 3 deletions.
  1. +3 −0 CHANGELOG.md
  2. +1 −1 npm-shrinkwrap.json
  3. +1 −1 package.json
  4. +6 −1 src/index.js
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2019-05-12 v5.0.4
* Fix support for ESLint v6.0.0-alpha.1 #117

2019-02-02 v5.0.3
* Fix support for `parserOptions.ecmaFeatures.globalReturn: true` while sharing scope between multiple script tags

2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-html",
"version": "5.0.3",
"version": "5.0.4",
"description": "A ESLint plugin to lint and fix inline scripts contained in HTML files.",
"license": "ISC",
"repository": {
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -114,7 +114,8 @@ function getMode(pluginSettings, filenameOrOptions) {
}
}

function patch(Linter) {
function patch(moduleExports) {
const Linter = moduleExports.Linter ? moduleExports.Linter : moduleExports
const verify = Linter.prototype.verify

// ignore if verify function is already been patched sometime before
@@ -128,6 +129,10 @@ function patch(Linter) {
filenameOrOptions,
saveState
) {
if (typeof config.extractConfig === "function") {
return verify.call(this, textOrSourceCode, config, filenameOrOptions)
}

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