@open-xchange/linter-presets 0.3.3 → 0.4.0
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 +5 -0
- package/dist/eslint/config/jsdoc.js +2 -0
- package/dist/eslint/shared/env-utils.d.ts +3 -3
- package/dist/eslint/shared/env-utils.js +3 -0
- package/dist/eslint/shared/rule-utils.d.ts +3 -0
- package/dist/eslint/shared/rule-utils.js +3 -0
- package/dist/stylelint/index.d.ts +2 -2
- package/dist/stylelint/index.js +2 -2
- package/doc/stylelint/README.md +3 -3
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.0] - 2024-08-06
|
|
4
|
+
|
|
5
|
+
- added: [ESLint] rules `jsdoc/require-template`, `jsdoc/require-throws`
|
|
6
|
+
- changed: [StyleLint] default values of `stylistic` option (indent 4 spaces, double quotes)
|
|
7
|
+
|
|
3
8
|
## [0.3.3] - 2024-08-01
|
|
4
9
|
|
|
5
10
|
- fixed: [ESLint] `env.tsconfig` must disable "projectService" explicitly
|
|
@@ -31,7 +31,7 @@ export interface StylisticOptions {
|
|
|
31
31
|
/**
|
|
32
32
|
* Default indentation size (number of space characters). Will be applied
|
|
33
33
|
* to JavaScript, TypeScript, JSON, and YAML files, as well as JSX markup.
|
|
34
|
-
* Default value is `
|
|
34
|
+
* Default value is `4`.
|
|
35
35
|
*/
|
|
36
36
|
indent?: number;
|
|
37
37
|
/**
|
|
@@ -41,11 +41,11 @@ export interface StylisticOptions {
|
|
|
41
41
|
* - "never": Require to omit semicolons according to ASI rules.
|
|
42
42
|
* - "off": Semicolons will not be checked.
|
|
43
43
|
*
|
|
44
|
-
* Default value is "
|
|
44
|
+
* Default value is "always".
|
|
45
45
|
*/
|
|
46
46
|
semi?: "always" | "never" | "off";
|
|
47
47
|
/**
|
|
48
|
-
* The type of the string delimiter character. Default value is "
|
|
48
|
+
* The type of the string delimiter character. Default value is "double".
|
|
49
49
|
*/
|
|
50
50
|
quotes?: "single" | "double" | "off";
|
|
51
51
|
/**
|
|
@@ -15,6 +15,9 @@ export const NO_UNUSED_VARS_OPTIONS = {
|
|
|
15
15
|
* Concatenates and flattens multiple elements or arrays into a single array
|
|
16
16
|
* while skipping all falsy parameters.
|
|
17
17
|
*
|
|
18
|
+
* @template T
|
|
19
|
+
* The type of the array elements.
|
|
20
|
+
*
|
|
18
21
|
* @param entries
|
|
19
22
|
* The elements or arrays to be concatenated.
|
|
20
23
|
*
|
|
@@ -26,6 +26,9 @@ export declare const Schema: {
|
|
|
26
26
|
* Returns a passed array unmodified, converts the value `undefined` to an
|
|
27
27
|
* empty array, and converts all other values to an array with one element.
|
|
28
28
|
*
|
|
29
|
+
* @template T
|
|
30
|
+
* The type of the array elements.
|
|
31
|
+
*
|
|
29
32
|
* @param value
|
|
30
33
|
* Any value to be converted to an array.
|
|
31
34
|
*
|
|
@@ -38,6 +38,9 @@ export const Schema = {
|
|
|
38
38
|
* Returns a passed array unmodified, converts the value `undefined` to an
|
|
39
39
|
* empty array, and converts all other values to an array with one element.
|
|
40
40
|
*
|
|
41
|
+
* @template T
|
|
42
|
+
* The type of the array elements.
|
|
43
|
+
*
|
|
41
44
|
* @param value
|
|
42
45
|
* Any value to be converted to an array.
|
|
43
46
|
*
|
|
@@ -5,11 +5,11 @@ import type { Config } from "stylelint";
|
|
|
5
5
|
export interface StylisticOptions {
|
|
6
6
|
/**
|
|
7
7
|
* Default indentation size (number of space characters). Default value is
|
|
8
|
-
* `
|
|
8
|
+
* `4`.
|
|
9
9
|
*/
|
|
10
10
|
indent?: number;
|
|
11
11
|
/**
|
|
12
|
-
* The type of the string delimiter character. Default value is "
|
|
12
|
+
* The type of the string delimiter character. Default value is "double".
|
|
13
13
|
*/
|
|
14
14
|
quotes?: "single" | "double" | "off";
|
|
15
15
|
}
|
package/dist/stylelint/index.js
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
export function configure(options) {
|
|
13
13
|
// resolve stylistic configuration options
|
|
14
14
|
const stylistic = {
|
|
15
|
-
indent:
|
|
16
|
-
quotes: "
|
|
15
|
+
indent: 4,
|
|
16
|
+
quotes: "double",
|
|
17
17
|
...options?.stylistic,
|
|
18
18
|
};
|
|
19
19
|
const rules = { base: {}, scss: {}, less: {} };
|
package/doc/stylelint/README.md
CHANGED
|
@@ -26,8 +26,8 @@ Generates standard configuration targeting the source files in the entire projec
|
|
|
26
26
|
| `ignores` | `string[]` | `[]` | Glob patterns with all files and folders to be ignored by StyleLint. |
|
|
27
27
|
| `license` | `string` | `""` | Full path to the template file containing the license header to be used in all source files. |
|
|
28
28
|
| `stylistic` | `StylisticOptions` | | Configuration options for code style. |
|
|
29
|
-
| `stylistic.indent` | `number` | `
|
|
30
|
-
| `stylistic.quotes` | `"single"\|"double"\|"off"` | `"
|
|
29
|
+
| `stylistic.indent` | `number` | `4` | Default indentation size (number of space characters). |
|
|
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
33
|
#### `configure` Example
|
|
@@ -41,6 +41,6 @@ const resolve = utils.resolver(import.meta.url)
|
|
|
41
41
|
export default stylelint.configure({
|
|
42
42
|
ignores: ["dist/*", "external/**/*.scss"],
|
|
43
43
|
license: resolve("./license.txt"),
|
|
44
|
-
stylistic: { indent:
|
|
44
|
+
stylistic: { indent: 2, quotes: "single" },
|
|
45
45
|
})
|
|
46
46
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/linter-presets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
11
11
|
},
|
|
12
|
-
"packageManager": "yarn@4.
|
|
12
|
+
"packageManager": "yarn@4.4.0",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"exports": "./dist/index.js",
|
|
15
15
|
"scripts": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"eslint-plugin-codeceptjs": "1.3.0",
|
|
39
39
|
"eslint-plugin-eslint-plugin": "6.2.0",
|
|
40
40
|
"eslint-plugin-import": "2.29.1",
|
|
41
|
-
"eslint-plugin-jest": "28.
|
|
41
|
+
"eslint-plugin-jest": "28.7.0",
|
|
42
42
|
"eslint-plugin-jest-dom": "5.4.0",
|
|
43
|
-
"eslint-plugin-jsdoc": "48.
|
|
43
|
+
"eslint-plugin-jsdoc": "48.11.0",
|
|
44
44
|
"eslint-plugin-jsonc": "2.16.0",
|
|
45
45
|
"eslint-plugin-jsx-a11y": "6.9.0",
|
|
46
46
|
"eslint-plugin-jsx-expressions": "1.3.2",
|
|
47
47
|
"eslint-plugin-license-header": "0.6.1",
|
|
48
|
-
"eslint-plugin-n": "17.10.
|
|
48
|
+
"eslint-plugin-n": "17.10.2",
|
|
49
49
|
"eslint-plugin-promise": "7.0.0",
|
|
50
50
|
"eslint-plugin-react": "7.35.0",
|
|
51
51
|
"eslint-plugin-react-hooks": "4.6.2",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"stylelint-config-standard-less": "3.0.1",
|
|
62
62
|
"stylelint-config-standard-scss": "13.1.0",
|
|
63
63
|
"stylelint-plugin-license-header": "1.0.3",
|
|
64
|
-
"typescript-eslint": "8.0.
|
|
64
|
+
"typescript-eslint": "8.0.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/confusing-browser-globals": "1.0.3",
|
|
68
68
|
"@types/eslint__js": "8.42.3",
|
|
69
69
|
"@types/picomatch": "3.0.0",
|
|
70
|
-
"@typescript-eslint/utils": "8.0.
|
|
70
|
+
"@typescript-eslint/utils": "8.0.1",
|
|
71
71
|
"eslint": "9.8.0",
|
|
72
72
|
"husky": "9.1.4",
|
|
73
73
|
"jest": "29.7.0",
|