stylelint | mighty CSS linter that helps you avoid errors | Code Analyzer library

 by   stylelint JavaScript Version: 16.0.1 License: MIT

kandi X-RAY | stylelint Summary

kandi X-RAY | stylelint Summary

stylelint is a JavaScript library typically used in Code Quality, Code Analyzer applications. stylelint has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.

A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.

            kandi-support Support

              stylelint has a medium active ecosystem.
              It has 10361 star(s) with 980 fork(s). There are 91 watchers for this library.
              There were 10 major release(s) in the last 6 months.
              There are 124 open issues and 2914 have been closed. On average issues are closed in 164 days. There are 9 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of stylelint is 16.0.1

            kandi-Quality Quality

              stylelint has 0 bugs and 0 code smells.

            kandi-Security Security

              stylelint has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              stylelint code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              stylelint is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              stylelint releases are available to install and integrate.
              Deployable package is available in Maven.
              stylelint saves you 278 person hours of effort in developing the same functionality from scratch.
              It has 655 lines of code, 0 functions and 774 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed stylelint and discovered the below as its top functions. This is intended to give you an instant insight into stylelint implemented functionality, and help decide if they suit your requirements.
            • Run test implementation .
            • Fixes multiline and multiline .
            • Formats messages .
            • Fixes all of the rule declarations
            • Infer the root level of a base indentation .
            • Lints the postcss result
            • Checks if operator operator is before the operator of operator
            • Validate options .
            • Ensures that the given font name is valid .
            • Check weight of weight
            Get all kandi verified functions for this library.

            stylelint Key Features

            No Key Features are available at this moment for stylelint.

            stylelint Examples and Code Snippets

            How to setup Stylelint in a Next.js project?
            JavaScriptdot img1Lines of Code : 29dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm i stylelint stylelint-config-standard stylelint-webpack-plugin --save-dev
             "extends": "stylelint-config-standard",
             "rules": {
               "string-quotes": "double"
            Integrating Stylelint with Vue.js
            Lines of Code : 42dot img2License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            # First remove an unnecessary one you had (with NPM):
            npm uninstall stylelint-config-recommended
            # Or with Yarn:
            yarn remove stylelint-config-recommended
            # Install dev deps with NPM:
            npm i -D stylelint stylelint-scss stylelint-config-rec
            How to resolve eslint(vue/html-closing-bracket-newline) conflict
            JavaScriptdot img3Lines of Code : 277dot img3License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
              "editor.formatOnSave": true,
              "[javascript]": {
                "editor.tabSize": 4,
                "editor.insertSpaces": true
              "[vue]": {
                "editor.tabSize": 4,
                "editor.insertSpaces": true
              "eslint.alwaysShowStatus": true,
            SugarSS throwing unecessary `CssSyntaxError`
            Lines of Code : 9dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            stylelint "**/*.{sass,scss}" --fix
            @define-mixin set-link-style $element
                    text-decoration: none
            @mixin set-link-style a
            copy iconCopy
            Vue CLI v4.2.2
            ? Please pick a preset: Manually select features
            ? Check the features needed for your project:
             (*) Babel
             (*) TypeScript
             ( ) Progressive Web App (PWA) Support
             ( ) Router
             ( ) Vuex
             (*) CSS Pre-processors
            >(*) Linter / 
            config stylelint file in Nuxt js project
            JavaScriptdot img6Lines of Code : 23dot img6License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm install stylelint-webpack-plugin --save-dev
            npm install stylelint --save-dev
            const StyleLintPlugin = require('stylelint-webpack-plugin');
            module.exports = async function() {
            How to show error console log for stylelint Node API?
            Lines of Code : 16dot img7License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            var stylelint = require("stylelint");
                code: "a { unknown: 0 }",
                config: { rules: { "property-no-unknown": true } },
                formatter: "string"
              .then(function({ output, errored }) {
            How to use globally installed stylelint plugins with stylelint cli?
            Lines of Code : 12dot img8License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm i -g stylelint
            npm i -g stylelint-selector-no-empty
                "plugins": ["stylelint-selector-no-empty"],
                "rules": {
                    "plugin/stylelint-selector-no-empty": true,
            copy iconCopy
            'use strict';
            const autoprefixer = require('autoprefixer');
            const chalk = require('chalk');
            const eslint = require('gulp-eslint');
            const gulp = require('gulp');
            const postcss = require('gulp-postcss');
            const spawn = require('child_process
            How to correctly lint .sass files using stylelint-webpack-plugin (with webpack 2)?
            Lines of Code : 2dot img10License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            stylelint "**/*.sass" --custom-syntax postcss-sass

            Community Discussions


            Integrate Coreui admin bootstrap template in a symfony project
            Asked 2022-Apr-01 at 07:51

            I'm trying to integrate the CoreUi Admin Bootstrap template in my first Symfony project.

            But I have some issues. First, the sidebar doesn't work. I can't minimize it.

            And I have a JS error in my console :


            Action in the code :



            Answered 2022-Apr-01 at 07:51

            I solved my issue by putting JS directly in the footer.html.twig...

            I don't understand why that don't work with app.js but it's OK now !

            app.js :



            Setup Stylelint with Emotionjs on a NextJS project
            Asked 2022-Mar-26 at 23:03

            I'm trying to add Stylelint to a brand new NextJS Typescript project with EmotionJS and almost no rules works on my styles files, the only error that I manage to see was Unknown word CssSyntaxError.

            This Unknown word error happens because I'm using CSS in JS syntax and was fixed adding this line on .eslintrc as I figure out here



            Answered 2022-Mar-26 at 23:03

            I tried to reach the core projects of this questions.

            Unfortunately for EmotionJS its needed to create a EmotionJS Stylelint Custom Syntax. For further information read the discussion:



            How to setup Stylelint in a Next.js project?
            Asked 2022-Mar-25 at 16:28

            I want to add Stylelint in my Next.js app. I am asking if I can edit next.config.js to add stylelint-webpack-plugin.



            Answered 2022-Mar-03 at 18:11

            Here is how you could add Stylelint for both CSS and SCSS. There is those simple 4 steps to follow.

            1. Step one:



            zsh: command not found python after running "brew upgrade"
            Asked 2022-Mar-23 at 18:30

            I am not able to install any npm packages as I get the following error on my M1 Mac mini



            Answered 2022-Mar-23 at 18:30

            import sys; print "%s.%s.%s"

            That's some good old Python 2 notation if I ever saw some :)

            As @ElapsedSoul mentioned. macOS 12.3 removed the Python 2 that came by default for all these years. Therefore, I would personally recommend for others not to upgrade to 12.3 if you need Python 2 until you find an alternative solution.

            Some possible alternatives include the following:

            Option 0: Reinstall Python 2 via Homebrew

            Homebrew unfortunately got rid of Python 2 a long time ago. There are however some workarounds to try and get it to work: How to reinstall python@2 from Homebrew?.

            Option 1: Use pyenv

            I haven't tested this, so it might not work. But if it does, this is likely the best solution for your needs. From the following:



            ESlint - Error: Must use import to load ES Module
            Asked 2022-Mar-17 at 12:13

            I am currently setting up a boilerplate with React, Typescript, styled components, webpack etc. and I am getting an error when trying to run eslint:

            Error: Must use import to load ES Module

            Here is a more verbose version of the error:



            Answered 2022-Mar-15 at 16:08

            I think the problem is that you are trying to use the deprecated babel-eslint parser, last updated a year ago, which looks like it doesn't support ES6 modules. Updating to the latest parser seems to work, at least for simple linting.

            So, do this:

            • In package.json, update the line "babel-eslint": "^10.0.2", to "@babel/eslint-parser": "^7.5.4",. This works with the code above but it may be better to use the latest version, which at the time of writing is 7.16.3.
            • Run npm i from a terminal/command prompt in the folder
            • In .eslintrc, update the parser line "parser": "babel-eslint", to "parser": "@babel/eslint-parser",
            • In .eslintrc, add "requireConfigFile": false, to the parserOptions section (underneath "ecmaVersion": 8,) (I needed this or babel was looking for config files I don't have)
            • Run the command to lint a file

            Then, for me with just your two configuration files, the error goes away and I get appropriate linting errors.



            Why are some of the secondary options not working for the rules in my .stylelintrc?
            Asked 2022-Mar-03 at 23:38

            I am trying to format my css so there's no more than one empty line between lines, but i don't want that to apply to comments. The documentation for stylelint has a secondary option that should make this easy, but for some reason it isn't working. Here's the rule:



            Answered 2022-Feb-13 at 09:45

            You are using the secondary option correctly as this demo shows:



            What is the default CSS property order?
            Asked 2022-Feb-24 at 16:46

            i have been trying to find documentation on this but i havent been able to. I use stylint in a project and we have the css order option activated. I haven't been able to set up VS code to show the errors and i haven't found a page with the information to actually know the order,so i always need to check on compile time if i have any mistakes in the CSS order properties, and it shows a huge error on screen.

            this are the stylelint rules we have



            Answered 2022-Feb-24 at 16:46

            You are extending the stylelint-config-concentric-order community config. This config includes and configures the stylelint-order community plugin. You can find the order of the properties in the repo on GitHub.

            You can see Stylelint errors in VS Code using the official Stylelint extension.

            And you can have the extension automatically fix problems on save, which will include the order of your properties, using the editor.codeActionsOnSave configuration property:



            Formatting SCSS for WordPress
            Asked 2022-Feb-22 at 17:25

            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 prettier installed.

            Installed the stylelint-config package:
            npm install @wordpress/stylelint-config --save-dev

            Added the following lines to package.json to format SCSS:

            "stylelint": {
            "extends": "@wordpress/stylelint-config/scss"

            No errors are displayed and no formatting is corrected on save.

            I have 'format on save' enabled.

            As I want stylelint to format the code, I've added the following lines to settings.json to use stylelint instead of prettier for formatting SCSS:



            Answered 2022-Feb-22 at 17:25


            Vue 2 based , vue-cli, vue-property-decorator, vue-class-component, Vuetify, project migration to Vue 3
            Asked 2022-Feb-18 at 14:50

            I am working on project upgrade from Vue 2 to Vue 3. The code base changed according to Vue migration documents: I have mismatch of above mentioned libraries. Does somebody has a running project and would share their working library versions

            Current mismatch error is :



            Answered 2022-Feb-18 at 14:50

            My colleague solved it by moving to Vite. My suggestion would be to drop webpack and use Vite instead.

            Migration guide for Vue 2 to 3 here: Vuetify migration guide:



            Stylelint skips entire folders
            Asked 2022-Feb-17 at 19:57

            I have stylelint installed in my project, and I've configured its configuration. I added a script to run this linter on my src folder.

            For some reason, the linter scans only one folder.

            Here is my configuration file stylelint.config.js:



            Answered 2022-Feb-17 at 19:57

            You need to quote your input glob, otherwise the shell (which differs on Windows and Mac) will interpret it rather than Stylelint itself.

            If you're only targeting *nix, you can use single quotes:


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install stylelint

            You can download it from GitHub, Maven.


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • npm

            npm i stylelint

          • CLONE
          • HTTPS


          • CLI

            gh repo clone stylelint/stylelint

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Code Analyzer Libraries


            by airbnb


            by standard


            by eslint


            by rome


            by python

            Try Top Libraries by stylelint


            by stylelintJavaScript


            by stylelintJavaScript


            by stylelintTypeScript


            by stylelintJavaScript


            by stylelintJavaScript