Skip to content

"valid" and "brackets": false positives on Stylus hashes #464

@TokugawaTakeshi

Description

@TokugawaTakeshi

Below expression is absolutely valid for Stylus. Its a mixin invocation with object (called "hash" in stylus) parameter:

provideImprovedListComponent({
  positionalRelationship: {
    withTypographyElements: {
      typographyProperties: ArticleTypographyProperties
    }
  }
})

With rules "valid" and "brackets", I have 11 warnings only for this expression::

  line 11  -  property is not valid    provideImprovedListComponent({
  line 12  -  unnecessary bracket      positionalRelationship: {
  line 12  -  property is not valid    positionalRelationship: {
  line 13  -  unnecessary bracket      withTypographyElements: {
  line 13  -  property is not valid    withTypographyElements: {
  line 14  -  unnecessary colon found  typographyProperties: ArticleTypographyProperties
  line 14  -  property is not valid    typographyProperties: ArticleTypographyProperties
  line 15  -  unnecessary bracket      }
  line 16  -  unnecessary bracket      }
  line 17  -  unnecessary bracket      })
  line 17  -  property is not valid    })

property is not valid

From the documentation of valid rule:

"Check that a property is valid CSS or HTML.".

Here is not a CSS property.

unnecessary bracket

From the documentation of brackets rule

When 'always', expect {} when declaring a selector.

Here is not a selector.

Because hashes is basic functionality in Stylus, I can't understand if you answer something like "We don't support hashes".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions