Questions tagged [stylelint]

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

Links

284 questions
1
vote
1 answer

How can I disable 'Insert `0` eslint(prettier/prettier)'?

I have a React application with Styled Components with ESlint / Stylelint / Prettier that makes a conflict of rules that excludes number-leading-zero on css rules. So given this code: import React from 'react'; import styled from…
Francis Lagares
  • 81
  • 5
  • 11
1
vote
1 answer

Configuring stylelint for sass

I'm trying to configure stylelint on my project for sass, and this is my .stylelintrc: defaultSeverity: warning extends: - stylelint-config-standard - stylelint-config-recommended - stylelint-config-sass-guidelines plugins: -…
Renaud is Not Bill Gates
  • 1,684
  • 34
  • 105
  • 191
1
vote
1 answer

How to install to latest node version on command prompt or powershell

I am trying to edit a BigCommerce theme using stencilLint. When I type the command: PS C:\Users\joaom\OneDrive\Desktop\shelfology\cornerstone> stencil init I get: PS C:\Users\joaom\OneDrive\Desktop\shelfology\cornerstone> stencil…
Joao
  • 67
  • 8
1
vote
1 answer

Error passing a list to a SASS mixin: "] expected"

I'm passing a list to a SASS mixin and it works (no error in the browser or console) but my editor (VS Code) says there are errors. The code is: @include gridAuto( 320px, [ ['sm', 2], ['', 1], ['lg', 3], ], …
Fred K
  • 13,249
  • 14
  • 78
  • 103
1
vote
1 answer

stylelint-scss - Is there a way to disable double-slash-comments?

Im using style-lint for linting Scss files and styled-components (by using different styleint.config files). Stylint seems to have an open issue when valid css is commentted out…
kitimenpolku
  • 2,604
  • 4
  • 36
  • 51
1
vote
0 answers

Stylelint rule to prevent overriding a class from a library

One big problem with major version upgrades with breaking changes from CSS/SASS libraries is that if you happened to override the library CSS classes, your CSS overrides become a potential increased risk/scope when upgrading. So if a CSS library…
Christopher Francisco
  • 15,672
  • 28
  • 94
  • 206
1
vote
1 answer

Stylelint won't recognize type import

I've begun working in a large repo where no types are being exported or imported anywhere. This seemed odd until I attempted to do so and realized why: we're using stylelint (13.4.0) and it simply won't recognize import type { WhateverType }. It…
Faust
  • 15,130
  • 9
  • 54
  • 111
1
vote
1 answer

Stylelint rule to value-keyword-case to ignore camelCase variables

I am using stylelint and I have a custom color variables used in several properties such as border, background, color. Example: border: 1px solid t(lightGray); background-color: t(lightBlue); background-color: var(--lightBlue); When I run…
Fawn
  • 73
  • 1
  • 4
  • 20
1
vote
1 answer

Atom stylelint - how to set rules globally?

I need to set stylelint globally because it seems like unnecessary work to configure every single project alone, and I am just unable to find such guide anywhere. How to do this please?
MarkJ
  • 39
  • 6
1
vote
0 answers

how to validate / lint styled-jsx in NextJS?

I am using nextJS for development, for stylelint to validate my .scss and .css files. I'm also using styled-jsx or css-in-js for component level styling (it's kind of requirement) and want to know if there's some library to validate styled-jsx below…
Veey
  • 216
  • 3
  • 13
1
vote
1 answer

Disable 'no-duplicate-dollar-variables' for variables declared as !default

A code snippet dealing with the scenario: $unfolded-transitions: () !default; @each $transition in $transitions { $unfolded-transitions: append($unfolded-transitions, unfoldTransition($transition), comma); /* stylelint-disable-line…
Ankit Koirala
  • 354
  • 3
  • 13
1
vote
1 answer

Only enable stylelint in specific files

This post shows how to enable eslint for specific files. I would like to take a similar approach with stylelint. This config works to ignore all of my css files in that directory: "stylelint.configOverrides": { "ignoreFiles":…
SeanPlusPlus
  • 8,663
  • 18
  • 59
  • 84
1
vote
1 answer

In VSCode-->settings.json, a particular line appears dimmer than the rest of the code. What is that indicating?

In VSCode, in settings.json for one of my extensions is a line "extends": "C:/Users/snarl/.vscode/extensions/stylelint-config-wordpress", But that line is dimmed compared to the rest of the text in the file, as if disabled, or path not found…
cag8f
  • 817
  • 1
  • 10
  • 33
1
vote
1 answer

SCSS lint config file separate of CSS lint config file

We have a series of legacy CSS files, which need linting and minifying, and then a series of new SCSS files, which need linting, rendering into CSS and minifying. While linting the SCSS files, I'm not getting the desired test errors using Gulp with…
sandraqu
  • 1,428
  • 1
  • 14
  • 31
1
vote
0 answers

Gulp & Browser-sync serving page initially with no CSS after adding gulp-stylelint to task

When running the serve command, and browser-sync launches the new tab with the running page, on this initial launch the page is without the CSS. The minified CSS file is available, it's in the dist folder, but until an additional refresh or save of…
user231207
  • 33
  • 3