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

Nested components trigger the "invalid element name" rule #9

Open
Ambrosia opened this issue Apr 5, 2017 · 2 comments
Open

Nested components trigger the "invalid element name" rule #9

Ambrosia opened this issue Apr 5, 2017 · 2 comments

Comments

@Ambrosia
Copy link

Ambrosia commented Apr 5, 2017

Hi,

This page advises you to set a component's positioning in the parent component. However, actually doing this triggers the invalid element name rule.

Perhaps it would be a good idea to stop this and instead add a new rule that triggers if the nested component applies the positioning properties not mentioned here (with a different error).

@fiskhandlarn
Copy link

+1!

@lederer
Copy link

lederer commented Jan 13, 2018

A workaround is to configure the element rule in .stylelintrc to use a regexp that accepts both component and element names. Eg:

"rules": {
    "rscss/class-format": [
        true,
        {
            "element": "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$"
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants