Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"verbose" formatter does not work when called via this plugin #9

Open
andmor- opened this issue Nov 23, 2023 · 1 comment
Open

"verbose" formatter does not work when called via this plugin #9

andmor- opened this issue Nov 23, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@andmor-
Copy link

andmor- commented Nov 23, 2023

The following gulp pipe fails:

      gulpStylelint({
        failAfterError: true,
        fix: hasFixFlag(),
        reporters: [{ formatter: "verbose", console: true }]
      })

With the following debug output:

user@host ~$ gulp lintscss
[17:18:13] Using gulpfile ~/gulpfile.js
[17:18:13] Starting 'lintscss'...
[17:18:14] 'lintscss' errored after 783 ms
[17:18:14] TypeError in plugin "gulp-stylelint"
Message:
    Cannot read properties of undefined (reading 'ruleMetadata')
Stack:
TypeError: Cannot read properties of undefined (reading 'ruleMetadata')
    at printProblems (~/node_modules/stylelint/lib/formatters/verboseFormatter.js:72:33)
    at verboseFormatter (~/node_modules/stylelint/lib/formatters/verboseFormatter.js:92:3)
    at Object.apply ~/node_modules/import-lazy/index.js:16:20)
    at reporter (~/node_modules/@ronilaukkarinen/gulp-stylelint/src/reporter-factory.js:45:27)
    at ~/node_modules/@ronilaukkarinen/gulp-stylelint/src/index.js:132:38
    at Array.map (<anonymous>)
    at passLintResultsThroughReporters (~/node_modules/@ronilaukkarinen/gulp-stylelint/src/index.js:132:22)

npx stylelint -f "verbose" <filename> works fine.

@ronilaukkarinen ronilaukkarinen added the help wanted Extra attention is needed label Dec 21, 2023
@mh-nichts
Copy link

I reported the same issue on @olegskl/gulp-stylelint : olegskl#143

The error is the same when using "github" formatter, but when using other formatters (ex : "string") everything works well.

It seems that it's linked to some new functionalities of Stylelint : stylelint/stylelint#6166
So using an older version of Stylelint (ex : 14.9) is OK, but it breaks from 14.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants