Stylelint: Unknown word (CssSyntaxError)
See original GitHub issueWhat steps are needed to reproduce the bug?
I just upgrade stylelint from version 13.13.1 to 14.2.0 and I start to get this error Stylelint: Unknown word (CssSyntaxError)
on ts files.
I read this migration doc https://stylelint.io/migration-guide/to-14 but it not helped me.
and here is my relevant devDependencies
I’m using
"stylelint": "^14.2.0",
"stylelint-config-sass-guidelines": "^9.0.1",
"stylelint-config-standard": "^24.0.0",
What Stylelint configuration is needed to reproduce the bug?
{
"extends": "stylelint-config-sass-guidelines",
"rules": {
"length-zero-no-unit": true,
"unit-no-unknown": true,
"property-no-unknown": true,
"color-no-invalid-hex": true,
"color-no-hex": true,
"function-disallowed-list": ["/^rgb/", "/^hsl/"],
"color-named": "never",
"declaration-block-no-duplicate-properties": true,
"selector-pseudo-element-no-unknown": [true, { "ignorePseudoElements": ["ng-deep"] }],
"media-feature-name-no-unknown": true,
"at-rule-no-unknown": null,
"comment-no-empty": true,
"no-duplicate-at-import-rules": true,
"no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"shorthand-property-no-redundant-values": true,
"value-keyword-case": "lower",
"max-nesting-depth": null,
"selector-no-qualifying-type": null,
"selector-class-pattern": "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$|^noUi-|calenderMatMenu",
"selector-max-compound-selectors": null,
"scss/dollar-variable-pattern": null,
"order/properties-alphabetical-order": null
}
}
How did you run Stylelint?
stylelint ‘**/*.scss’ --fix
Which version of Stylelint are you using?
^14.2.0
What did you expect to happen?
Not to show me an un relevant error: Stylelint: Unknown word (CssSyntaxError)
What actually happened?
I see error on ts files with Stylelint: Unknown word (CssSyntaxError) on js import for example
import { DAY_DROPDOWN_ITEMS, getCorrectDayObjByValue, getDaysDropdownItems } from './day-dropdown-items.const';
Does the bug relate to non-standard syntax?
NO
Proposal to fix the bug
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Unknown word CssSyntaxError in import inside script tag in ...
Clearly describe the bug CssSyntaxError unknown word in import inside script tag in vue file Which rule, if any, is the bug related...
Read more >How to allow // comments in scss within Stylelint (Unknown ...
The problem is that when I use // for comments, it throws Unknown word (CssSyntaxError)Stylelint(CssSyntaxError). Double slash comments ( // ) ...
Read more >stylelint/stylelint - Gitter
client-core/src/styles/base/_buttons.scss:1:3: Unknown word ... I see this error in Unknown word CssSyntaxError in all the tsx files around import ...
Read more >Stylelint-vscode - npm.io
Check Stylelint-vscode 7.0.0-6 package - Last release 7.0.0-6 with ISC licence at ... 'Unknown word (CssSyntaxError)', severity: 1, code: 'CssSyntaxError', ...
Read more >stylelint-config-recommended-vue - npm package - Snyk
Not complying to this rule may result in broken Vue files parsing, generating confusing errors like Unknown word (CssSyntaxError) .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jeddy3 Thanks! I just find how to solve my issue in the configuration of Webstorm. Preferences -> Languages & Frameworks-> Style Sheets -> Stylelint Now unselect the Process JS Files checkbox
Solve my issue
this is my config,but there is some errors like this
the file like this
package.json script is
how can i solve it? it’s a vue3 project, stylelint v14.8.5