Skip to content

Commit

Permalink
Synchronize the same parts in both node-api.md & postcss-plugin.md (
Browse files Browse the repository at this point in the history
  • Loading branch information
gucong3000 authored and jeddy3 committed Jan 16, 2019
1 parent 7598f59 commit e91458e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions docs/user-guide/node-api.md
Expand Up @@ -39,17 +39,20 @@ A [stylelint configuration object](configuration.md).

If no `config` or `configFile` is passed, stylelint will use a [config lookup algorithm](./configuration.md#loading-the-configuration-object) to find the correct config.

### `configBasedir`
### `configFile`

An absolute path to the directory that relative paths defining `extends` and `plugins` are *relative to*.
The path to a JSON, YAML, or JS file that contains your [stylelint configuration object](configuration.md).

If the `config` object passed uses relative paths, e.g. for `extends` or `plugins`, you are going to have to pass a `configBasedir`. If not, you do not need this.
It should be either absolute or relative to the directory that your process is running from (`process.cwd()`). We'd recommend absolute.

### `configFile`
### `configBasedir`

The path to a JSON, YAML, or JS file that contains your [stylelint configuration object](configuration.md).
An absolute path to the directory that relative paths defining `extends` and `plugins` are *relative to*.

It should be either absolute or relative to the directory that your process is running from (`process.cwd()`). We'd recommend absolute.
This is only necessary if you passed an object directly through the `config` property. If you used
`configFile`, this option is not necessary.

If the `config` object passed uses relative paths, e.g. for `extends` or `plugins`, you are going to have to pass a `configBasedir`. If not, you do not need this.

### `configOverrides`

Expand Down Expand Up @@ -221,4 +224,4 @@ stylelint.lint({
}).then(function() { .. });
```

The same pattern can be used to read Less or [SugarSS](https://github.com/postcss/sugarss) syntax.
The same pattern can be used to lint Less, SCSS or [SugarSS](https://github.com/postcss/sugarss) syntax.
4 changes: 2 additions & 2 deletions docs/user-guide/postcss-plugin.md
Expand Up @@ -22,7 +22,7 @@ The plugin accepts an options object as argument, with the following properties:

A [stylelint configuration object](configuration.md).

If no `config` or `configFile` is passed, stylelint will look for a `.stylelintrc` configuration file.
If no `config` or `configFile` is passed, stylelint will use a [config lookup algorithm](./configuration.md#loading-the-configuration-object) to find the correct config.

### `configFile`

Expand Down Expand Up @@ -91,7 +91,7 @@ postcss([
.catch(err => console.error(err.stack))
```

The same pattern can be used to lint SCSS or [SugarSS](https://github.com/postcss/sugarss) syntax.
The same pattern can be used to lint Less, SCSS or [SugarSS](https://github.com/postcss/sugarss) syntax.

### Example B

Expand Down

0 comments on commit e91458e

Please sign in to comment.