stylelint: Fix errors when running flow on stylelint as a dependency

Describe the issue. Is it a bug or a feature request (new rule, new option, etc.)?

A bug where running flow against version 7.10.1 causes 40 errors.

What stylelint configuration is needed to reproduce this issue?

install ‘flow-bin’ and run npm run flow without excluding node_module

Which version of stylelint are you using?

7.10.1

What actually happened (e.g. what warnings or errors you are getting)?

node_modules/stylelint/lib/utils/hasEmptyBlock.js:11
 11:   statement/*: postcss$rule | postcss$atRule*/
                    ^^^^^^^^^^^^ identifier `postcss$rule`. Could not resolve name

node_modules/stylelint/lib/utils/hasEmptyBlock.js:11
 11:   statement/*: postcss$rule | postcss$atRule*/
                                   ^^^^^^^^^^^^^^ identifier `postcss$atRule`. Could not resolve name

node_modules/stylelint/lib/utils/isKeyframeRule.js:7
  7: module.exports = function (rule/*: postcss$rule*/)/*: boolean*/ {
                                        ^^^^^^^^^^^^ identifier `postcss$rule`. Could not resolve name

node_modules/stylelint/lib/utils/isStandardSyntaxAtRule.js:10
 10: module.exports = function (atRule/*: postcss$atRule*/)/*: boolean*/ {
                                          ^^^^^^^^^^^^^^ identifier `postcss$atRule`. Could not resolve name

I have added stylelint under [ignore] in .flowconfig but projects should not have to exclude node modules if not when imports of modules need to be stubbed,

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 15 (12 by maintainers)

Most upvoted comments

Reproduced with flow-bin@0.49.1, but errors disappear with flow-bin@0.53.0. Seems like we can safely close 🎈