You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+73-59Lines changed: 73 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,23 +14,51 @@
14
14
15
15
You need to ensure that you have `stylelint` installed:
16
16
17
+
With `pnpm`
18
+
17
19
```bash
18
-
yarn add --dev stylelint # or npm install --save-dev stylelint
20
+
pnpm add -D stylelint
21
+
```
22
+
23
+
Or, with `yarn`
24
+
25
+
```bash
26
+
yarn add -D stylelint
27
+
```
28
+
29
+
Or, with `npm`
30
+
31
+
```bash
32
+
npm install -D stylelint
19
33
```
20
34
21
35
## Setup
22
36
23
37
1. Add `@nuxtjs/stylelint-module` dependency to your project
24
38
39
+
With `pnpm`
40
+
25
41
```bash
26
-
yarn add --dev @nuxtjs/stylelint-module # or npm install --save-dev @nuxtjs/stylelint-module
42
+
pnpm add -D @nuxtjs/stylelint-module
27
43
```
28
44
29
-
2. Add `@nuxtjs/stylelint-module` to the `buildModules` section of `nuxt.config.js`
45
+
Or, with `yarn`
46
+
47
+
```bash
48
+
yarn add -D @nuxtjs/stylelint-module
49
+
```
50
+
51
+
Or, with `npm`
52
+
53
+
```bash
54
+
npm install -D @nuxtjs/stylelint-module
55
+
```
56
+
57
+
2. Add `@nuxtjs/stylelint-module` to the `modules` section of `nuxt.config.js`
30
58
31
59
```js
32
60
exportdefault {
33
-
buildModules: [
61
+
modules: [
34
62
// Simple usage
35
63
'@nuxtjs/stylelint-module',
36
64
@@ -40,13 +68,11 @@ export default {
40
68
}
41
69
```
42
70
43
-
:warning: If you are using Nuxt **< v2.9** you have to install the module as a `dependency` (No `--dev` or `--save-dev` flags) and use `modules` section in `nuxt.config.js` instead of `buildModules`.
44
-
45
71
### Using top level options
46
72
47
73
```js
48
74
exportdefault {
49
-
buildModules: [
75
+
modules: [
50
76
'@nuxtjs/stylelint-module'
51
77
],
52
78
stylelint: {
@@ -57,51 +83,29 @@ export default {
57
83
58
84
## Options
59
85
60
-
See [stylelint's options](http://stylelint.io/user-guide/node-api/#options) for the complete list of options available. These options are passed through to the `stylelint` directly.
86
+
See [stylelint's options](http://stylelint.io/user-guide/node-api/#options) for the complete list of options available.
87
+
These options are passed through to the `stylelint` directly.
61
88
62
-
### `configFile`
63
-
64
-
- Type: `String`
65
-
- Default: `undefined`
66
-
67
-
Specify the config file location to be used by `stylelint`.
68
-
69
-
**Note:** By default this is [handled by `stylelint`](http://stylelint.io/user-guide/configuration/).
Specify the glob pattern for finding files. Must be relative to `options.context`.
84
-
85
-
### `fix`
89
+
### `cache`
86
90
87
91
- Type: `Boolean`
88
-
- Default: `false`
92
+
- Default: `true`
89
93
90
-
If `true`, `stylelint` will fix as many errors as possible. The fixes are made to the actual source files. All unfixed errors will be reported. See [Autofixing errors](https://stylelint.io/user-guide/cli#autofixing-errors) docs.
94
+
**Note**: The cache is enabled by default to decrease execution time.
0 commit comments