All Projects → xt0rted → stylelint-problem-matcher

xt0rted / stylelint-problem-matcher

Licence: MIT license
A GitHub Action that registers a problem matcher for Stylelint's report format

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to stylelint-problem-matcher

Husky.Net
Git hooks made easy with Husky.Net internal task runner! 🐶 It brings the dev-dependency concept to the .NET world!
Stars: ✭ 394 (+2088.89%)
Mutual labels:  stylelint, linting
stylelint-config-xo
Stylelint shareable config for XO
Stars: ✭ 34 (+88.89%)
Mutual labels:  stylelint, linting
Stylelint Processor Styled Components
Lint your styled components with stylelint!
Stars: ✭ 639 (+3450%)
Mutual labels:  stylelint, linting
Postcss Less
PostCSS Syntax for parsing LESS
Stars: ✭ 93 (+416.67%)
Mutual labels:  stylelint
Static Site Boilerplate
A better workflow for building modern static websites.
Stars: ✭ 1,633 (+8972.22%)
Mutual labels:  stylelint
Express Webpack React Redux Typescript Boilerplate
🎉 A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (+766.67%)
Mutual labels:  stylelint
Front End Guide
📚 Study guide and introduction to the modern front end stack.
Stars: ✭ 14,073 (+78083.33%)
Mutual labels:  stylelint
Stylelint Config Suitcss
SUIT CSS config for stylelint
Stars: ✭ 73 (+305.56%)
Mutual labels:  stylelint
Stylefmt
stylefmt is a tool that automatically formats stylesheets.
Stars: ✭ 2,123 (+11694.44%)
Mutual labels:  stylelint
Vscode Stylelint
Official Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: ✭ 141 (+683.33%)
Mutual labels:  stylelint
Stylelint Config Recommended Scss
The recommended shareable SCSS config for stylelint
Stars: ✭ 141 (+683.33%)
Mutual labels:  stylelint
Frasco
Quick starter for Jekyll including full setup for Sass, PostCSS, Autoprefixer, stylelint, Webpack, ESLint, imagemin, Browsersync, etc.
Stars: ✭ 123 (+583.33%)
Mutual labels:  stylelint
Prettier Stylelint
code > prettier > stylelint > formatted code
Stars: ✭ 162 (+800%)
Mutual labels:  stylelint
React Typescript Webpack2 Cssmodules Postcss
Simple Starter Template for React, TypeScript, postCSS, ITCSS, CSS-Modules, Webpack and Live Reloading (React Hot Loader 3)
Stars: ✭ 117 (+550%)
Mutual labels:  stylelint
Stylelint Prettier
Stylelint plugin for Prettier formatting
Stars: ✭ 188 (+944.44%)
Mutual labels:  stylelint
Stylelint Config Css Modules
CSS modules shareable config for stylelint
Stars: ✭ 78 (+333.33%)
Mutual labels:  stylelint
Awesome Stylelint
A list of awesome stylelint plugins, configs, etc.
Stars: ✭ 179 (+894.44%)
Mutual labels:  stylelint
Nextjs Ts
Opinionated Next JS project boilerplate with TypeScript and Redux
Stars: ✭ 134 (+644.44%)
Mutual labels:  stylelint
Stylelint Config Recess Order
🗂️ Recess-based property sort order for Stylelint.
Stars: ✭ 133 (+638.89%)
Mutual labels:  stylelint
Gulp Stylelint
Gulp plugin for running Stylelint results through various reporters.
Stars: ✭ 149 (+727.78%)
Mutual labels:  stylelint

Problem Matcher for stylelint

CI CodeQL

Adds a problem matcher that will detect errors from Stylelint and create annotations for them.

Usage

on: push
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v2
          with:
            node-version: 16
      - uses: xt0rted/stylelint-problem-matcher@v1
      - run: npm ci
      - run: npm test

Example of inline annotations

Example of build log with highlighted errors

Options

Name Allowed values Description
action add (default), remove If the problem matcher should be registered or removed

Using with sub folders

If you're running Stylelint from a sub folder, or using the working-directory option on your build step, you'll need to switch your report formatter to stylelint-actions-formatters. This package is a copy of the formatters that Stylelint ships with (string and verbose) but they're modified so the file paths are rooted to GITHUB_WORKSPACE instead of your subfolder. Without this change the actions runner won't be able to associate the annotations with the correct file.

package.json

{
  "scripts": {
    "test": "stylelint \"scss/**/*.scss\" --custom-formatter=node_modules/stylelint-actions-formatters"
  }
}

ci.yml

on: push
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v2
          with:
            node-version: 16
      - uses: xt0rted/stylelint-problem-matcher@v1
      - run: npm ci
        working-directory: "src/website"
      - run: npm test
        working-directory: "src/website"

License

The scripts and documentation in this project are released under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].