Questions tagged [stylelint]

A modern CSS linter that helps you enforce consistent conventions and avoid errors in your stylesheets.

Links

284 questions
0
votes
0 answers

CSS transform animation syntax style

For a situation like this: @keyframes rotateMe { 0% { transform: rotate(0deg); } 100% { transform: rotate(90deg); } } Stylelint flags the 0deg as not needing the unit. I know for things like 0px to leave off the px, but I'm…
Steve
  • 14,401
  • 35
  • 125
  • 230
0
votes
1 answer

Prevent Stylelint from enforcing an alphabetical order on vendor prefixes?

Is it possible to apply a flag to prevent Stylelint from enforcing an alphabetical order on vendor prefixes? I have a declaration order that I'm pleased with in my config, but my vendor prefixes are automatically generated through Autoprefixer…
Ashley
  • 13
  • 1
0
votes
1 answer

Possibility for nested properties in stylelint in Gulp?

Is it possible to have a nested property list and let do stylelint it's work? I tried to do this, but I got the following error: events.js:85 throw er; // Unhandled 'error' event ^ Error: Expected pseudo-class or pseudo-element I…
-1
votes
0 answers

eslintrc.cjs is showing a Missed semicolon (CssSyntaxError) by default

I am facing an error in the ESLint file after creating a React project using Vitejs here is my eslint.cjs file content module.exports = { root: true, env: {browser: true, es2020: true}, extends: [ 'eslint:recommended', …
-1
votes
1 answer

WebStorm uses Stylelint to lint markdown file incorrectly

I just found WebStorm is using the Stylelint to lint the README.md file. Here's my Stylelint config: { "plugins": ["stylelint-prettier"], "extends": [ "stylelint-config-standard", "stylelint-config-recommended-less", …
Sea Monster
  • 141
  • 1
  • 6
-1
votes
1 answer

stylelint with stylelint-config-styled-components using css tag gives me a Unknown word CssSyntaxError

I get an error Unknown word CssSyntaxError for the following line: animation: ${props => (css${DeterminateFill(props)} 1s ease-in forwards)}; It is within the following styled component const DeterminateLinearProgressDiv = styled(ProgressDiv)` …
joe
  • 23
  • 6
-1
votes
1 answer

Unexpected unknown at-rule "@use" in stylelint

I run stylelint in my angular project and I got error: Unexpected unknown at-rule "@use" My stylelint version is "^13.12.0". I don't want to disable this rule. I want stylelint to know about "@use" in scss files. I also tested in stylelint demo…
Jon Sud
  • 10,211
  • 17
  • 76
  • 174
-1
votes
1 answer

Stylelint - Making CSS Appears Before Subclass Definition

is there a rule in stylelint to make it so CSS appears before any subclass definitions? i would like something like this to be invalid: .some-class { .some-sub-class { background: red; } border: 1px; } I would like this to be…
X0r0N
  • 1,816
  • 6
  • 29
  • 50
-1
votes
1 answer

check-types or check-lint similar command to stylelint

When running a lint like Eslint, I can use the command npm run check-lint to check all the code on my project. The same goes with npm run check-types from typescript. Is there a similar command with stylelint? I didn't find anything on their docs…
Sku
  • 163
  • 2
  • 14
-1
votes
1 answer

How can i lint my styles by using gulp-sass and gulp-stylelint

I have several SASS files that should be compiled separately. I want to lint theirs and also theirs "imports" I have some sass files: // style.scss @import "./styles/a.scss"; body { background-color: #FFF; } // styles/a.scss h1 { …
ilya
  • 51
  • 1
  • 9
-1
votes
1 answer

stylelint: Error: Undefined rule null

I just downloaded stylelint (npm install -g stylelint) on my Mac (OS X 10.12.6 - Sierra) and essentially copied and tried to modify the sample configuration file I found here. I then tried to run it on a CSS file I had and, after fixing some typos…
Adam Stoller
  • 933
  • 8
  • 16
-2
votes
1 answer

Eslint and stylelint setup in VS Code

How to setup eslint and stylelint to have errors displayed inside VS Code editor, when we have that kind of structure of the…
bearsie
  • 121
  • 1
  • 5
-2
votes
1 answer

Stylelint - How to restrict having variables to specific files only?

Is it possible to give error/warning if someone in the team tries to add the variable as property (not value) in any other file other than variable.css? it could be either CSS native variables or Sass variables
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
-3
votes
1 answer

How to define rule in Stylelint which requires comma before newline in selectors?

I'm setting up a .stylint file for my VS Code editor. Here is the example: #main > div // there is no comma so stylint should throw an error here div { ... } #main > div, // this is ok, no error here div { ... }
Mateusz
  • 23
  • 5
1 2 3
18
19