Good day,
In above picture, stylelint prompt a CSS error in a JS file. Is there a way to stop stylelint from validating javascript file, I coundn't find such option in their official configuration guide.
Thanks a lot.
I'm trying to configure stylelint to only lint my CSS and/or SCSS files. I'm extending stylelint-config-recommended but by default it seems to be processing loads of other files as well as the .css and .scss ones I want to lint.
Examples of files I…
I'm at at a bit of a loss today. I wanted to add Stylelint to my Angular project, so I ran
npm install stylelint stylelint-config-standard --save-dev
to install stylelint and the standard config plug in. I then created a .stylelintrc file and added…
Trying to use CSS variables for the first time. Doing it in a react (create-react-app) application, and works great. Only issue is that there's no warnings if I mistype a variable name or just simply forget to define it.
Is there a way to, for…
How can I teach Stylelint Angular's selector ":host" ?
E.g. Angular2-Seed by MGechev shows in its build-process ":host" as error:
src/client/app/+home/home.component.css
1:1 ‼ Unexpected unknown pseudo-class selector
":host"…
On a project we have custom templates string to abstract styled-components functions. For example, we have templates string for the media-queries that look like this one:
// Definition
const for1080p = (...args) => css`
@media (min-height: 1080px)…
I new to linting in scss file, I have a angular project with following scss file
p {
margin-left: 10px;
margin-top: 9px;
}
::ng-deep .expandButton {
margin: 10px;
color: teal;
border: none;
background:…
To be honest I can't understand the documentation or i miss something. It drives me crazy
Steps that i did:
Installed VSCode
Installed Prettier plugin
Opened simply project with couple files (html, css)
Installed stylelint with npm install…
I use Next.js with styled-jsx together with stylelint and everything goes well until when I start to use variables in styled-jsx because stylelint throw stylelint(CssSyntaxError) on those variables.
For example
const Button = ({ color }) => (
<>
…
I'm setting up stylelint for a project, everything works as expected when run from the cli:
$ stylelint 'css/**/*.css' --fix
css/style.css
20:18 × Expected newline after ":" with a multi-line declaration…
Is it possible to ignore my CSS path, beacuse I only use stylelint for SCSS validation?
e.g. - I have the following structure:
assets/
css/
scss/
How can I disable the css/ folder from being indexed, trough the settings.json file of…
I'm trying to lint BEM-style using stylelint and stylelint-selector-bem-pattern plugin but can't get it work.
My config is the following:
node: 5.11.0
gulp-stylelint: ^2.0.2
stylelint-selector-bem-pattern: ^0.2.3
.stylelintrc
{
"plugins": [
…
I'm using husky and lint-staged to run "stylelint --fix" on my sass files with this configuration
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"post-commit": "git update-index --again"
}
},
"lint-staged": {
…