@open-xchange/linter-presets 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/stylelint/index.js +5 -1
- package/doc/stylelint/README.md +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/stylelint/index.js
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
* The configuration object to be exported from `stylelint.config.js`.
|
|
11
11
|
*/
|
|
12
12
|
export function configure(options) {
|
|
13
|
+
const ignoreFiles = [
|
|
14
|
+
"dist/*",
|
|
15
|
+
...(options?.ignores ?? []),
|
|
16
|
+
];
|
|
13
17
|
// resolve stylistic configuration options
|
|
14
18
|
const stylistic = {
|
|
15
19
|
indent: 4,
|
|
@@ -23,7 +27,7 @@ export function configure(options) {
|
|
|
23
27
|
}
|
|
24
28
|
return {
|
|
25
29
|
// ignore certain files and folders
|
|
26
|
-
ignoreFiles
|
|
30
|
+
ignoreFiles,
|
|
27
31
|
// add the stylistic plugin
|
|
28
32
|
plugins: [
|
|
29
33
|
"stylelint-plugin-license-header",
|
package/doc/stylelint/README.md
CHANGED
|
@@ -30,6 +30,12 @@ Generates standard configuration targeting the source files in the entire projec
|
|
|
30
30
|
| `stylistic.quotes` | `"single"\|"double"\|"off"` | `"double"` | The type of the string delimiter character. |
|
|
31
31
|
| `rules` | `StyleLint.Config["rules"]` | `{}` | Additional linter rules to be added to the global configuration. |
|
|
32
32
|
|
|
33
|
+
#### Built-in Ignore Globs
|
|
34
|
+
|
|
35
|
+
This package defines ignore globs for the following files and directories:
|
|
36
|
+
|
|
37
|
+
- `dist/*` (standard build output directory)
|
|
38
|
+
|
|
33
39
|
#### `configure` Example
|
|
34
40
|
|
|
35
41
|
```js
|
|
@@ -39,7 +45,7 @@ import { utils, stylelint } from "@open-xchange/linter-presets"
|
|
|
39
45
|
const resolve = utils.resolver(import.meta.url)
|
|
40
46
|
|
|
41
47
|
export default stylelint.configure({
|
|
42
|
-
ignores: ["
|
|
48
|
+
ignores: ["external/**/*.scss"],
|
|
43
49
|
license: resolve("./license.txt"),
|
|
44
50
|
stylistic: { indent: 2, quotes: "single" },
|
|
45
51
|
})
|
package/package.json
CHANGED