@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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.1] - 2024-08-06
4
+
5
+ - added: [StyleLint] default ignore globs (`dist`)
6
+
3
7
  ## [0.4.0] - 2024-08-06
4
8
 
5
9
  - added: [ESLint] rules `jsdoc/require-template`, `jsdoc/require-throws`
@@ -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: options?.ignores ?? [],
30
+ ignoreFiles,
27
31
  // add the stylistic plugin
28
32
  plugins: [
29
33
  "stylelint-plugin-license-header",
@@ -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: ["dist/*", "external/**/*.scss"],
48
+ ignores: ["external/**/*.scss"],
43
49
  license: resolve("./license.txt"),
44
50
  stylistic: { indent: 2, quotes: "single" },
45
51
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-xchange/linter-presets",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Configuration presets for ESLint and StyleLint",
5
5
  "repository": {
6
6
  "url": "https://gitlab.open-xchange.com/fspd/npm-packages/linter-presets"