Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/exelban/stylelint
GitHub Action that runs stylelint
https://github.com/exelban/stylelint
action github-ac stylelint stylelint-action styles
Last synced: 3 months ago
JSON representation
GitHub Action that runs stylelint
- Host: GitHub
- URL: https://github.com/exelban/stylelint
- Owner: actions-hub
- License: mit
- Created: 2019-08-21T18:31:51.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-12T16:46:09.000Z (10 months ago)
- Last Synced: 2024-05-22T23:45:54.987Z (6 months ago)
- Topics: action, github-ac, stylelint, stylelint-action, styles
- Language: Shell
- Homepage: https://github.com/marketplace/actions/stylelinter
- Size: 15.6 KB
- Stars: 21
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-actions - Stylelinter - GitHub Action that runs stylelint
- awesome-workflows - Stylelinter - GitHub Action that runs stylelint
- awesome-actions - Stylelinter - GitHub Action that runs stylelint
README
# stylelint
GitHub Action that runs [stylelint](https://stylelint.io).## Usage
To use stylelint in your workflow just add this step:```yaml
- name: stylelint
uses: actions-hub/stylelint@master
```## Configuration
Action has 3 parameters which you can set:
- PATTERN - Pattern for style files.
- CONFIG_PATH - Path to stylelint configuration file
- INDENT_SPACE - Space indentationThis parameters can be set through environment variables:
```yaml
- uses: actions-hub/stylelint@master
env:
INDENT_SPACES: 4
PATTERN: "*.scss"
```### .stylelintrc
By default, action will try to find an existing configuration file in the project.
If the configuration file will not found, it will be created with the next configuration:```json
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 2
}
}
```### File pattern
If you want to specify which file or types must be validated.
You need to pass the pattern as a `PATTERN` variable.
By default, it will try to find `*.css`.### Indentation
Indentation can be set by environment variable `INDENT_SPACES`.
By default space, indent is 2.```yaml
- uses: actions-hub/stylelint@master
ENV:
INDENT_SPACES: 4
```## Example
### Default values
```bash
name: Test
on: [push]jobs:
linters:
name: stylelint
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v1
- uses: actions-hub/stylelint@master
```### Custom paramenters
```bash
name: Test
on: [push]jobs:
linters:
name: stylelint
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v1
- uses: actions-hub/stylelint@master
env:
PATTERN: "*.scss"
INDENT_SPACES: 4
```## License
[MIT License](https://github.com/actions-hub/stylelint/blob/master/LICENSE)