Questions tagged [stylelint]

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

Links

284 questions
1
vote
0 answers

Configuring Stylelint for VSCode Globally

Here's what I want to achieve: I want to configure the extension so that it checks and fixes automatically any errors in any .scss file that I create. I don't want to install the packages manually for every project that I create. Here's what I've…
darpserj
  • 11
  • 3
1
vote
2 answers

Stylelint 'Unknown rule declaration-property-value-blacklist' error on every css file

While running Stylelint against CSS files, every file has an output with the following error. It is odd that the error appears on the first line/character of each file. 1:1 x Unknown rule declaration-property-value-blacklist
benblustey
  • 67
  • 11
1
vote
1 answer

ignore -webkit-box-shadow and -moz-box-shadow while using stylelint in angular

How can I remove stylelint rule for CSS properties like -webkit-box-shadow and -moz-box-shadow? Because it is overwriting to box-shadow when I run --fix command. Below is my .stylelintrc.json file rule list: { "extends":…
Pathik Vejani
  • 4,263
  • 8
  • 57
  • 98
1
vote
1 answer

Stylelint: Expected declaration to come before rule - order/order

The code is as follows: .home-feat2 { background-color: stencilColor("color-greyLight"); img {width: 10rem;} margin-bottom: spacing("single"); @include breakpoint("medium") { margin-bottom: 3rem; …
Deo3560
  • 35
  • 7
1
vote
1 answer

Stylelint indentation rule returns false negative on multi-line mixin

I have an app that uses Stylelint to enforce stylistic rules inside styles, but here, Stylelint complains about indentation when a long line is split in half by Prettier. @include box-shadow( var(--shadow-offset) var(--shadow-offset) 0…
Théo Lavaux
  • 1,364
  • 3
  • 22
  • 46
1
vote
1 answer

No files matching the pattern were found with STYLELINT

I just installed STYLELINT and I'm following the documentation, but I encountered the following problem: $ npx stylelint --config ./stylelintrc './**/*.tsx' Error: No files matching the pattern "'./src/**/*.tsx'" were found. at standalone…
THIAGO DE BONIS
  • 760
  • 7
  • 22
1
vote
1 answer

Formatting SCSS for WordPress

I'm trying to configure a visual studio code project to format SCSS code according to WordPress standards. So far I've done the following but no indication of errors and no formatting occurs on save. Installed the stylelint extension, also have…
Steve
  • 43
  • 6
1
vote
1 answer

Running Stylelint (SCSS) within github/super-linter ignores configuration

hope someone can help me out with a weird bug/issue i've been having with styleling + github/super-linter. I've also added a issue to the repo as I think I've tried many things and it seems to be a bug but perhaps it's a configuration issue on my…
1
vote
2 answers

How to configure stylelint for react native and StyleSheet

Does anyone know how to configure stylelint for react native (typescript) and StyleSheet? src/sample.tsx import React from "react"; import { StyleSheet, Text, View } from "react-native"; const App = () => (
MatthewP
  • 185
  • 1
  • 14
1
vote
1 answer

Regex to match all nested SCSS selectors that are not kebab case

UPDATE: I've come to the conclusion that RegExp is not a viable option for this particular problem. Thanks for your help. The problem TLDR: I want to create a RegExp that can scan all nested SCSS selectors, and match everything that is not…
floroz
  • 365
  • 2
  • 16
1
vote
1 answer

Stylelint not warning about !important

I have a project that make use of styled-components and I just have installed Stylelint following the official guide[1]. My .stylelintrc.json already have declaration-no-important set to true but seems have no effect, because I have one component…
Rodrigo
  • 135
  • 4
  • 45
  • 107
1
vote
0 answers

stylelint with LESS configuration issue

**I have next stylelint configuration:** { "extends": [ "stylelint-config-recommended", "stylelint-config-recommended-less", "stylelint-config-rational-order", "stylelint-prettier/recommended" ], "plugins": ["stylelint-order",…
Almaz Kaliev
  • 468
  • 1
  • 4
  • 10
1
vote
0 answers

"stylelint" found some error. Please fix them and try committing again

I am getting the error as Running tasks for **/*.{js,jsx} [failed] Error: No files matching the pattern "" are found. husky > pre-commit hook failed. when I am trying to commit the code. Please let me know the cause for this error or the…
1
vote
2 answers

How to configure stylelint to ban all HTML tags

Is there a way to configure stylelint to disallow all selectors which include tag names? I found the (stylelint-selector-tag-no-without-class)[https://www.npmjs.com/package/stylelint-selector-tag-no-without-class] plugin, using which I want to ban…
Nick Ribal
  • 1,959
  • 19
  • 26
1
vote
3 answers

Does stylelint has a rule to detect unknown values?

I'm new to Stylelint and I see that it has a rule to identify unknown CSS units. I can't find a rule that warns about the use of unknown values. for example: align-items: wrongValue; See attached Screenshoot that shows Stylint warns me about wrong…
Aviv Hadar
  • 330
  • 4
  • 8