2019-08-21 16:01:23 -04:00
|
|
|
# stylelint
|
|
|
|
GitHub Action that runs [stylelint](https://stylelint.io).
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
- uses: exelban/stylelint@master
|
|
|
|
```
|
|
|
|
|
2019-08-21 16:17:49 -04:00
|
|
|
Or use docker image:
|
|
|
|
```yaml
|
|
|
|
- uses: "docker://exelban/stylelint:latest"
|
|
|
|
```
|
|
|
|
|
2019-08-21 16:01:23 -04:00
|
|
|
### Default values
|
|
|
|
#### Configuration file
|
|
|
|
Action will check if stylelint is already installed. If not, it will install styleling.
|
2019-08-21 16:05:41 -04:00
|
|
|
Also, its check if the configuration file exists (`.stylelintrc`).
|
2019-08-21 16:01:23 -04:00
|
|
|
|
|
|
|
By default action use next configuration:
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"extends": "stylelint-config-standard",
|
|
|
|
"rules": {
|
|
|
|
"indentation": 2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Pattern
|
|
|
|
If pattern is not provided, action will use default one: `*.css`.
|
|
|
|
```yaml
|
|
|
|
- uses: exelban/stylelint@master
|
|
|
|
with:
|
|
|
|
args: ./**/*.scss
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Indentation
|
|
|
|
Indentation can be set by environment variable `INDENT_SPACES`.
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
- uses: exelban/stylelint@master
|
|
|
|
env:
|
|
|
|
INDENT_SPACES: 4
|
|
|
|
```
|
|
|
|
|
|
|
|
## License
|
2019-08-21 16:05:41 -04:00
|
|
|
[MIT License](https://github.com/exelban/stylelint/blob/master/LICENSE)
|