BenoitZugmeyer / eslint-plugin-html

An ESLint plugin to extract and lint scripts from HTML files.
ISC License
430 stars 51 forks source link

fails with eslint@4.6.0 (api refactor) #77

Closed SimulatedGREG closed 7 years ago

SimulatedGREG commented 7 years ago

SourceCodeFixer module has been refactored. Attemping to use eslint-plugin-html with eslint@4.6.0 results with the below error log.

sourceText.startsWith is not a function
TypeError: sourceText.startsWith is not a function
    at Function.SourceCodeFixer.applyFixes (/Users/gregholguin/Documents/Projects/playground/k/node_modules/eslint/lib/util/source-code-fixer.js:76:26)
    at Function.SourceCodeFixer.applyFixes (/Users/gregholguin/Documents/Projects/playground/k/node_modules/eslint-plugin-html/src/index.js:152:23)
    at Linter.verifyAndFix (/Users/gregholguin/Documents/Projects/playground/k/node_modules/eslint/lib/linter.js:1258:43)
    at processText (/Users/gregholguin/Documents/Projects/playground/k/node_modules/eslint/lib/cli-engine.js:196:34)
    at processFile (/Users/gregholguin/Documents/Projects/playground/k/node_modules/eslint/lib/cli-engine.js:245:18)
    at executeOnFile (/Users/gregholguin/Documents/Projects/playground/k/node_modules/eslint/lib/cli-engine.js:585:25)
    at fileList.forEach.fileInfo (/Users/gregholguin/Documents/Projects/playground/k/node_modules/eslint/lib/cli-engine.js:622:13)
    at Array.forEach (<anonymous>)
    at CLIEngine.executeOnFiles (/Users/gregholguin/Documents/Projects/playground/k/node_modules/eslint/lib/cli-engine.js:621:18)
    at Object.execute (/Users/gregholguin/Documents/Projects/playground/k/node_modules/eslint/lib/cli.js:181:107)

https://github.com/eslint/eslint/issues/9204 https://github.com/SimulatedGREG/electron-vue/issues/379

BenoitZugmeyer commented 7 years ago

Thank you for the report! I published a new version to support ESLint 4.6.