BenoitZugmeyer / eslint-plugin-html

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

Error: Failed to load plugin 'html' declared in '.eslintrc.js': eslint-plugin-html error: It seems that eslint is not loaded #128

Closed huangjihua closed 4 years ago

huangjihua commented 4 years ago

Description

 Error: Child compilation failed:
  Module build failed (from ./node_modules/eslint-loader/index.js):
  Error: Failed to load plugin 'html' declared in '.eslintrc.js': eslint-plugin-html error: It seems that eslint is not loaded. If you t  hink it is a bug, please file a report at https://github.com/BenoitZugmeyer/eslint-plugin-html/issues

  - index.js:83 iterateESLintModules
    [vr-showcar]/[eslint-plugin-html]/src/index.js:83:11

  - index.js:24 Object.
    [vr-showcar]/[eslint-plugin-html]/src/index.js:24:1

  - loader.js:776 Module._compile
    internal/modules/cjs/loader.js:776:30

  - index.js:99 Module._compile
    [vr-showcar]/[pirates]/lib/index.js:99:24

  - loader.js:787 Module._extensions..js
    internal/modules/cjs/loader.js:787:10

  - index.js:104 Object.newLoader [as .js]
    [vr-showcar]/[pirates]/lib/index.js:104:7

  - loader.js:653 Module.load
    internal/modules/cjs/loader.js:653:32

  - loader.js:593 tryModuleLoad
    internal/modules/cjs/loader.js:593:12

  - loader.js:585 Function.Module._load
    internal/modules/cjs/loader.js:585:3

  - loader.js:690 Module.require
    internal/modules/cjs/loader.js:690:17

  - helpers.js:25 require
    internal/modules/cjs/helpers.js:25:18

  - config-array-factory.js:1043 ConfigArrayFactory._loadPlugin
    [vr-showcar]/[eslint]/lib/cli-engine/config-array-factory.js:1043:42

  - config-array-factory.js:915 names.reduce
    [vr-showcar]/[eslint]/lib/cli-engine/config-array-factory.js:915:33

  - Array.reduce

  - config-array-factory.js:911 ConfigArrayFactory._loadPlugins
    [vr-showcar]/[eslint]/lib/cli-engine/config-array-factory.js:911:22

Setup configuration

module.exports = { "parser": "babel-eslint", "env": { "browser": true, "mocha": true, "node": true, "es6": true, "amd": true, "jquery":true }, parserOptions: { sourceType: "module" }, plugins: [ 'html', "standard", "promise" ], "rules": { "arrow-parens": 0, "one-var-declaration-per-line": 2, "no-cond-assign": 2, "no-console": 2, "no-constant-condition": 2, "no-control-regex": 2, "no-debugger": 1, "no-dupe-keys": 2, "no-duplicate-case": 2, "no-empty": 1, "no-empty-character-class": 2, "no-ex-assign": 2, "no-extra-boolean-cast": 2, "no-extra-parens": 2, "no-extra-semi": 2, "no-func-assign": 2, "no-inner-declarations": 2, "no-invalid-regexp": 2, "no-irregular-whitespace": 2, "no-negated-in-lhs": 2, "no-obj-calls": 2, "no-regex-spaces": 2, "no-sparse-arrays": 2, "no-unreachable": 2, "no-var": 0, "use-isnan": 2, "require-jsdoc": [0, { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": false } }], "valid-jsdoc": [1, { "requireReturn": false }], "valid-typeof": 2, "block-scoped-var": 2, "complexity": 0, "consistent-return": 2, "curly": 2, "default-case": 0, "semi": [2, "always"], "semi-spacing": [2, {"before": false, "after": true}], "keyword-spacing": 2, "space-before-blocks": [2, "always"], "space-before-function-paren": [2, {"anonymous": "always", "named": "never"}], "space-infix-ops": 2, "space-unary-ops": [1, {"words": true, "nonwords": false}], "spaced-comment": [2, "always", {"exceptions": ["-"]}], "wrap-regex": 2, "max-len": [2, 150], "max-params": [1, 5] } }

BenoitZugmeyer commented 4 years ago

Your version of eslint-plugin-html is quite outdated, and doesn't support the newer ESLint versions. Could you update it ?