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

Pre-commit hook failing on x-class selector & :local pseudo-class #2275

Closed
asiuse opened this issue Feb 16, 2024 · 1 comment
Closed

Pre-commit hook failing on x-class selector & :local pseudo-class #2275

asiuse opened this issue Feb 16, 2024 · 1 comment

Comments

@asiuse
Copy link

asiuse commented Feb 16, 2024

Example, pre-commit hook fails with x-class selector pattern:

Expected ".t-dark" to match pattern "/^[a-z][a-zA-Z0-9]+$/"

Another example, pre-commit hook fails with :local pseudo-class selector:

Unexpected unknown pseudo-class selector ":local"

Example SCSS:

:global .t-dark {
    :local .CustomDropdown .Switcher {
        color: var(--color-text);
    }
}

Errors:

Error: Invalid class or id selector syntax
    at transform (/home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:198:1)
    at /home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:79:1
    at Array.map (<anonymous>)
    at transform (/home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:79:1)
    at /home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:128:1
    at Array.map (<anonymous>)
    at transform (/home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:128:1)
    at /home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:79:1
    at Array.map (<anonymous>)
    at transform (/home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:79:1)
    at /home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:54:1
    at Array.map (<anonymous>)
    at transform (/home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:46:1)
    at Processor.func (/home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:238:1)
    at localizeNode (/home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:239:1)
    at /home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:511:1
    at Object.Once (/home/asiuse/workspace/preferences-trading-plugin/server-war/src/main/frontend/node_modules/@swissquote/crafty-preset-postcss/dist/webpack:/node_modules/postcss-modules-local-by-default/src/index.js:501:1)
@onigoetz
Copy link
Member

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

No branches or pull requests

2 participants