├── .github ├── dependabot.yml └── workflows │ └── awesome-lint.yml ├── .gitignore ├── .npmrc ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md └── package.json /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: '/' 5 | schedule: 6 | interval: monthly 7 | labels: 8 | - 'pr: dependencies' 9 | -------------------------------------------------------------------------------- /.github/workflows/awesome-lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint Awesome List 2 | 3 | on: 4 | push: 5 | branches: ['main'] 6 | pull_request: 7 | branches: ['**'] 8 | 9 | jobs: 10 | lint: 11 | name: Lint 12 | runs-on: ubuntu-latest 13 | permissions: 14 | contents: read 15 | steps: 16 | - uses: actions/checkout@v4 17 | with: 18 | fetch-depth: 0 19 | - run: npx awesome-lint 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | package-lock.json 3 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of conduct 2 | 3 | You should adhere to GitHub's [Acceptable Use](https://help.github.com/articles/github-terms-of-service/#c-acceptable-use) policy. 4 | 5 | You can use GitHub's [grievance process](https://github.com/contact/report-abuse) to report breaches of this policy. 6 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. 4 | 5 | If you are new to open source, I've written a [guide for how to contribute](https://css-tricks.com/how-to-contribute-to-an-open-source-project/). 6 | 7 | > The pull request should have a useful title. Pull requests with `Update readme.md` as title will be closed. Please carefully read everything in `Adding to this list`. 8 | 9 | ## Table of Contents 10 | 11 | - [Adding to this list](#adding-to-this-list) 12 | - [Updating your Pull Request](#updating-your-pull-request) 13 | 14 | ## Adding to this list 15 | 16 | Please ensure your pull request adheres to the following guidelines: 17 | 18 | - Please submit your contribution at the end of the list of the relevant category. If you don't find a section that it belongs in, please make one. 19 | - Please don't use a long description. The description should not wrap to 3 lines, ideally it should fit on one. 20 | - Search previous suggestions before making a new one, as yours may be a duplicate. 21 | - Please don't use bold or italics unless it's somehow appropriate to the link. 22 | - Make sure the list is useful before submitting. That implies it has enough content and every item has a good succinct description. 23 | - Make an individual pull request for each suggestion. 24 | - Use [Title Casing](https://titlecaseconverter.com/). 25 | - Use the following format: `[List Name](link)` 26 | - New categories or improvements to the existing categorization are welcome. 27 | - Please check your spelling and grammar. 28 | - Make sure your text editor is set to remove trailing whitespace. 29 | - The pull request and commit should have a useful title. 30 | - The body of your commit message should contain a link to the repository. 31 | 32 | Thank you for your suggestions! 33 | 34 | ## Updating your Pull Request 35 | 36 | Sometimes, we will ask you to edit your Pull Request before it is included. This is normally due to spelling errors or because your PR didn't match the awesome-actions list guidelines. 37 | 38 | [Here](https://github.com/RichardLitt/knowledge/blob/master/github/amending-a-commit-guide.md) is a write up on how to change a Pull Request, and the different ways you can do that. 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal https://creativecommons.org/publicdomain/zero/1.0/ 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | 117 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Awesome Stylelint [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) 2 | 3 | A list of awesome Stylelint configs, plugins, integrations etc. 4 | 5 | ## Contents 6 | 7 | - [Analysis platforms](#analysis-platforms) 8 | - [Configs](#configs) 9 | - [Custom syntaxes](#custom-syntaxes) 10 | - [Editor integrations](#editor-integrations) 11 | - [Formatters](#formatters) 12 | - [Plugins](#plugins) 13 | - [Task runners](#task-runners) 14 | - [Testing](#testing) 15 | - [Tools](#tools) 16 | - [Tutorials](#tutorials) 17 | 18 | ## Analysis platforms 19 | 20 | - [codacy-stylelint](https://github.com/codacy/codacy-stylelint) - Codacy integration. 21 | - [megalinter](https://megalinter.io) - Integrated into MegaLinter. 22 | - [putout](https://github.com/coderaiser/putout) - Integrated into Putout. 23 | - [Qlty plugin](https://github.com/qltysh/qlty/tree/main/qlty-plugins/plugins/linters/stylelint) - Qlty integration. 24 | - [reviewdog/action-stylelint](https://github.com/reviewdog/action-stylelint) - Reviewdog GitHub Action. 25 | 26 | ## Configs 27 | 28 | ### Custom syntaxes 29 | 30 | - [stylelint-config-recommended-vue](https://www.npmjs.com/package/stylelint-config-recommended-vue) - The recommended shareable Vue config for Stylelint. 31 | - [stylelint-config-sass-guidelines](https://www.npmjs.com/package/stylelint-config-sass-guidelines) - Sass guidelines config. 32 | - [stylelint-config-standard-scss](https://www.npmjs.com/package/stylelint-config-standard-scss) - Standard config for SCSS. 33 | 34 | ### Order 35 | 36 | - [stylelint-config-alphabetical-order](https://www.npmjs.com/package/stylelint-config-alphabetical-order) - Sorts properties alphabetically. 37 | - [stylelint-config-recess-order](https://www.npmjs.com/package/stylelint-config-recess-order) - Sorts properties logically the way Recess did and Bootstrap does. 38 | 39 | ### Stylistic 40 | 41 | - [@stylistic/stylelint-config](https://www.npmjs.com/package/@stylistic/stylelint-config) - The stylistic shareable config for `@stylistic/stylelint-plugin`. 42 | 43 | ### Large examples 44 | 45 | - [@primer/stylelint-config](https://www.npmjs.com/package/@primer/stylelint-config) - The GitHub shareable config. 46 | - [@shopify/stylelint-plugin](https://www.npmjs.com/package/@shopify/stylelint-plugin) - The Shopify shareable config. 47 | 48 | ## Custom syntaxes 49 | 50 | - [postcss-angular](https://www.npmjs.com/package/postcss-angular) - Angular Components. 51 | - [postcss-html](https://www.npmjs.com/package/postcss-html) - HTML, including Vue SFC. 52 | - [postcss-less](https://www.npmjs.com/package/postcss-less) - Less. 53 | - [postcss-linaria](https://www.npmjs.com/package/@linaria/postcss-linaria) - Linaria. 54 | - [postcss-lit](https://www.npmjs.com/package/postcss-lit) - Lit elements. 55 | - [postcss-markdown](https://www.npmjs.com/package/postcss-markdown) - Markdown. 56 | - [postcss-sass](https://www.npmjs.com/package/postcss-sass) - Sass. 57 | - [postcss-scss](https://www.npmjs.com/package/postcss-scss) - SCSS. 58 | - [postcss-styled-syntax](https://www.npmjs.com/package/postcss-styled-syntax) - Template literals. 59 | - [sugarss](https://www.npmjs.com/package/sugarss) - SugarSS. 60 | 61 | ## Editor integrations 62 | 63 | - [ale](https://github.com/dense-analysis/ale) - Vim plugin. 64 | - [coc-stylelint](https://github.com/neoclide/coc-stylelint) - Neovim. language server extension. 65 | - [flycheck](https://github.com/flycheck/flycheck) - Emacs extension. 66 | - [sublimeLinter-stylelint](https://github.com/SublimeLinter/SublimeLinter-stylelint) - Sublime Text plugin. 67 | - [vscode-stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint) - VS Code extension. 68 | 69 | ## Formatters 70 | 71 | - [@csstools/stylelint-formatter-github](https://www.npmjs.com/package/@csstools/stylelint-formatter-github) - Output errors and warnings directly in GitHub pull requests. 72 | - [stylelint-actions-formatters](https://www.npmjs.com/package/stylelint-actions-formatters) - Output errors and warnings for GitHub Actions. 73 | - [stylelint-checkstyle-formatter](https://www.npmjs.com/package/stylelint-checkstyle-formatter) - Output Checkstyle XML reports. 74 | - [stylelint-codeframe-formatter](https://www.npmjs.com/package/stylelint-codeframe-formatter) - Output codeframe errors and warnings. 75 | - [stylelint-formatter-gitlab-code-quality-report](https://www.npmjs.com/package/stylelint-formatter-gitlab-code-quality-report) - Output errors and warnings as a GitLab Code Quality report (artifact). 76 | - [stylelint-formatter-pretty](https://www.npmjs.com/package/stylelint-formatter-pretty) - A pretty formatter for terminals. 77 | 78 | ## Plugins 79 | 80 | ### Architecture and methodologies 81 | 82 | - [stylelint-plugin-defensive-css](https://www.npmjs.com/package/stylelint-plugin-defensive-css) - Enforce defensive CSS best practices (Pack). 83 | - [stylelint-react-native](https://www.npmjs.com/package/stylelint-react-native) - Enforce React Native rules (Pack). 84 | - [stylelint-selector-bem-pattern](https://www.npmjs.com/package/stylelint-selector-bem-pattern) - Enforce BEM patterns for selectors. 85 | 86 | ### Browser compatibility 87 | 88 | - [stylelint-no-browser-hacks](https://www.npmjs.com/package/stylelint-no-browser-hacks) - Disallow browser hacks that are irrelevant to the browsers you are targeting. 89 | - [stylelint-no-unsupported-browser-features](https://www.npmjs.com/package/stylelint-no-unsupported-browser-features) - Disallow CSS that is unsupported by the browsers you're targeting. 90 | - [stylelint-plugin-use-baseline](https://www.npmjs.com/package/stylelint-plugin-use-baseline) - Disallow CSS features not in Baseline. 91 | 92 | ### Colors 93 | 94 | - [stylelint-gamut](https://www.npmjs.com/package/stylelint-gamut) - Enforce standard different color spaces (Pack). 95 | - [stylelint-no-indistinguishable-colors](https://www.npmjs.com/package/stylelint-no-indistinguishable-colors) - Disallow colors that are suspiciously close to being identical. 96 | 97 | ### File system 98 | 99 | - [stylelint-no-unresolved-module](https://www.npmjs.com/package/stylelint-no-unresolved-module) - Disallow unresolved imports (import-like or `url`). 100 | 101 | ### Internationalization 102 | 103 | - [stylelint-plugin-logical-css](https://www.npmjs.com/package/stylelint-plugin-logical-css) - Enforce logical CSS properties, values and units (Pack). 104 | 105 | ### Nesting 106 | 107 | - [stylelint-use-nesting](https://www.npmjs.com/package/stylelint-use-nesting) - Enforce nesting when it is possible. 108 | 109 | ### Order 110 | 111 | - [stylelint-order](https://www.npmjs.com/package/stylelint-order) - Enforce a specific order for things like properties (Pack). 112 | 113 | ### Pre-processors 114 | 115 | - [stylelint-scss](https://www.npmjs.com/package/stylelint-scss) - Enforce SCSS-specific conventions (Pack). 116 | - [stylelint-stylus](https://www.npmjs.com/package/stylelint-stylus) - Enforce Stylus-specific conventions. 117 | 118 | ### Performance 119 | 120 | - [stylelint-high-performance-animation](https://www.npmjs.com/package/stylelint-high-performance-animation) - Disallow low-performance animation and transition properties. 121 | 122 | ### Stylistic 123 | 124 | - [@stylistic/stylelint-plugin](https://www.npmjs.com/package/@stylistic/stylelint-plugin) - Enforce stylistic conventions by using the rules removed in Stylelint 16.0.0 (Pack). 125 | 126 | ### Variables and constraints 127 | 128 | - [stylelint-declaration-block-no-ignored-properties](https://www.npmjs.com/package/stylelint-declaration-block-no-ignored-properties) - Disallow property values that are ignored. 129 | - [stylelint-declaration-strict-value](https://www.npmjs.com/package/stylelint-declaration-strict-value) - Enforce variables, functions or keywords for the value of specific properties. 130 | - [stylelint-media-use-custom-media](https://www.npmjs.com/package/stylelint-media-use-custom-media) - Enforce usage of custom media queries. 131 | - [stylelint-no-restricted-syntax](https://www.npmjs.com/package/stylelint-no-restricted-syntax) - Disallow specified syntax. 132 | - [stylelint-scales](https://www.npmjs.com/package/stylelint-scales) - Enforce scales for numeric values (Pack). 133 | - [stylelint-value-no-unknown-custom-properties](https://www.npmjs.com/package/stylelint-value-no-unknown-custom-properties) - Disallow unknown custom properties. 134 | 135 | ## Task runners 136 | 137 | - [broccoli-stylelint](https://www.npmjs.com/package/broccoli-stylelint) - Broccoli plugin. 138 | - [ember-cli-stylelint](https://www.npmjs.com/package/ember-cli-stylelint) - Ember CLI plugin. 139 | - [grunt-stylelint](https://www.npmjs.com/package/grunt-stylelint) - Grunt plugin. 140 | - [gulp-stylelint](https://www.npmjs.com/package/gulp-stylelint) - Gulp plugin. 141 | - [jest-runner-stylelint](https://www.npmjs.com/package/jest-runner-stylelint) - Jest plugin. 142 | - [nx-stylelint](https://www.npmjs.com/package/nx-stylelint) - Nx plugin. 143 | - [stylelint-webpack-plugin](https://www.npmjs.com/package/stylelint-webpack-plugin) - Webpack plugin. 144 | 145 | ## Testing 146 | 147 | - [@morev/stylelint-testing-library](https://www.npmjs.com/package/@morev/stylelint-testing-library) - Platform agnostic solution for testing Stylelint plugins (works with `vitest`, `jest` or `node:test`). 148 | - [jest-preset-stylelint](https://www.npmjs.com/package/jest-preset-stylelint) - Jest preset for Stylelint plugins. 149 | - [stylelint-tape](https://www.npmjs.com/package/stylelint-tape) - Test custom rules using Tape. 150 | - [stylelint-test-rule-node](https://www.npmjs.com/package/stylelint-test-rule-node) - A rule tester using Node.js built-in test runner (`node:test`). 151 | 152 | ## Tools 153 | 154 | - [pre-commit-stylelint](https://github.com/thibaudcolas/pre-commit-stylelint) - Mirrors all releases for the pre-commit hooks framework. 155 | - [stylelint-define-config](https://www.npmjs.com/package/stylelint-define-config) - Provide a `defineConfig` function for `stylelint.config.js` files. 156 | - [stylelint-find-new-rules](https://www.npmjs.com/package/stylelint-find-new-rules) - Find Stylelint rules that are not configured in your Stylelint config. 157 | 158 | ## Tutorials 159 | 160 | - [Lint your CSS with Stylelint](https://css-tricks.com/stylelint/) - CSS Tricks article. 161 | - [Stylelint: The Style Sheet Linter We've Always Wanted](https://www.smashingmagazine.com/2016/05/stylelint-the-style-sheet-linter-weve-always-wanted/) - Smashing Magazine article. 162 | - [Floss your style sheets with Stylelint](https://benfrain.com/floss-your-style-sheets-with-stylelint/) - The first article written about Stylelint. 163 | - [Writing Your First Custom Stylelint Rule](https://medium.com/swlh/writing-your-first-custom-stylelint-rule-a9620bb2fb73) - Quickly create and integrate your own Stylelint rules. 164 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "awesome-stylelint", 3 | "version": "0.0.0", 4 | "private": true, 5 | "description": "A list of awesome Stylelint", 6 | "repository": "https://github.com/stylelint/awesome-stylelint", 7 | "scripts": { 8 | "test": "awesome-lint" 9 | }, 10 | "devDependencies": { 11 | "awesome-lint": "*" 12 | } 13 | } 14 | --------------------------------------------------------------------------------