Skip to content

Commit

Permalink
docs: Fix indentation (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
1ven authored and okonet committed Jun 18, 2017
1 parent 2bcbc5f commit 48fbe20
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions README.md
Expand Up @@ -76,7 +76,7 @@ Should be an object where each value is a command to run and its key is a glob p

```json
{
"*": "my-task"
"*": "my-task"
}
```

Expand Down Expand Up @@ -105,14 +105,14 @@ It is possible to run linters for certain paths only by using [minimatch](https:

```js
{
// .js files anywhere in the project
"*.js": "eslint",
// .js files anywhere in the project
"**/*.js": "eslint",
// .js file in the src directory
"src/*.js": "eslint",
// .js file anywhere within and below the src directory
"src/**/*.js": "eslint",
// .js files anywhere in the project
"*.js": "eslint",
// .js files anywhere in the project
"**/*.js": "eslint",
// .js file in the src directory
"src/*.js": "eslint",
// .js file anywhere within and below the src directory
"src/**/*.js": "eslint",
}
```

Expand All @@ -126,7 +126,7 @@ Supported are both local npm scripts (`npm run-script`), or any executables inst

```json
{
"*.js": "eslint --fix"
"*.js": "eslint --fix"
}
```

Expand All @@ -140,7 +140,7 @@ Tools like ESLint/TSLint or stylefmt can reformat your code according to an appr

```json
{
"*.js": ["eslint --fix", "git add"]
"*.js": ["eslint --fix", "git add"]
}
```

Expand Down Expand Up @@ -180,15 +180,15 @@ All examples assuming you’ve already set up lint-staged and husky in the `pack

```json
{
"*.{js,jsx}": "eslint"
"*.{js,jsx}": "eslint"
}
```

### Automatically fix code style with `--fix` and add to commit

```json
{
"*.js": ["eslint --fix", "git add"]
"*.js": ["eslint --fix", "git add"]
}
```

Expand All @@ -199,13 +199,13 @@ This will run `eslint --fix` and automatically add changes to the commit. Please

```json
{
"*.{js,jsx}": ["prettier --parser flow --write", "git add"]
"*.{js,jsx}": ["prettier --parser flow --write", "git add"]
}
```

```json
{
"*.{ts,tsx}": ["prettier --parser typescript --write", "git add"]
"*.{ts,tsx}": ["prettier --parser typescript --write", "git add"]
}
```

Expand All @@ -214,27 +214,27 @@ This will run `eslint --fix` and automatically add changes to the commit. Please

```json
{
"*.css": "stylelint",
"*.scss": "stylelint --syntax=scss"
"*.css": "stylelint",
"*.scss": "stylelint --syntax=scss"
}
```

### Automatically fix SCSS style with `stylefmt` and add to commit

```json
{
"*.scss": ["stylefmt", "stylelint --syntax scss", "git add"]
"*.scss": ["stylefmt", "stylelint --syntax scss", "git add"]
}
```

### Run PostCSS sorting, add files to commit and run Stylelint to check

```json
{
"*.scss": [
"postcss --config path/to/your/config --replace",
"stylelint",
"git add"
]
"*.scss": [
"postcss --config path/to/your/config --replace",
"stylelint",
"git add"
]
}
```

0 comments on commit 48fbe20

Please sign in to comment.