@enormora/eslint-config-base 0.0.77 → 0.0.79
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/package.json +8 -7
- package/presets/base/base.js +3 -1
- package/presets/base/base.js.map +1 -1
- package/presets/base/dprint-config.js +3 -2
- package/presets/base/dprint-config.js.map +1 -1
- package/presets/base/shell.js +19 -0
- package/presets/base/shell.js.map +1 -0
- package/readme.md +15 -0
- package/software-bill-of-materials.cyclonedx.json +51 -34
package/package.json
CHANGED
|
@@ -7,15 +7,16 @@
|
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@ben_12/eslint-plugin-dprint": "1.
|
|
11
|
-
"@cspell/eslint-plugin": "10.4.
|
|
12
|
-
"@dprint/json": "0.
|
|
13
|
-
"@dprint/markdown": "0.
|
|
14
|
-
"@dprint/toml": "0.
|
|
15
|
-
"@dprint/typescript": "0.
|
|
10
|
+
"@ben_12/eslint-plugin-dprint": "1.31.0",
|
|
11
|
+
"@cspell/eslint-plugin": "10.4.1",
|
|
12
|
+
"@dprint/json": "0.26.0",
|
|
13
|
+
"@dprint/markdown": "0.29.0",
|
|
14
|
+
"@dprint/toml": "0.10.0",
|
|
15
|
+
"@dprint/typescript": "0.99.1",
|
|
16
16
|
"@eslint-community/eslint-plugin-eslint-comments": "4.8.1",
|
|
17
17
|
"@eslint/markdown": "8.0.3",
|
|
18
18
|
"@eslint/plugin-kit": "0.7.3",
|
|
19
|
+
"@eslint/shell": "0.1.2",
|
|
19
20
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
20
21
|
"@typescript-eslint/utils": "8.72.1",
|
|
21
22
|
"dprint-plugin-yaml": "0.6.0",
|
|
@@ -79,5 +80,5 @@
|
|
|
79
80
|
"./rule-sets/restricted-syntax.js"
|
|
80
81
|
],
|
|
81
82
|
"type": "module",
|
|
82
|
-
"version": "0.0.
|
|
83
|
+
"version": "0.0.79"
|
|
83
84
|
}
|
package/presets/base/base.js
CHANGED
|
@@ -5,6 +5,7 @@ import { dprintSettings } from "./dprint-formatters.js";
|
|
|
5
5
|
import { markdownConfig } from "./markdown.js";
|
|
6
6
|
import { packageJsonConfig } from "./package-json.js";
|
|
7
7
|
import { plainTextLanguagePlugin } from "./plain-text-language.js";
|
|
8
|
+
import { shellConfig } from "./shell.js";
|
|
8
9
|
const baseJsConfig = {
|
|
9
10
|
files: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}'],
|
|
10
11
|
...baseSharedConfig,
|
|
@@ -62,7 +63,8 @@ export const baseConfig = [
|
|
|
62
63
|
dprintPackageJsonConfig,
|
|
63
64
|
markdownConfig,
|
|
64
65
|
dprintYamlConfig,
|
|
65
|
-
dprintTomlConfig
|
|
66
|
+
dprintTomlConfig,
|
|
67
|
+
shellConfig
|
|
66
68
|
];
|
|
67
69
|
/* eslint-disable no-barrel-files/no-barrel-files -- expose dprint configs and cspell helper as public API so consumers can spread or call them when customizing */
|
|
68
70
|
export { jsonDprintConfig, markdownDprintConfig, tomlDprintConfig, typescriptDprintConfig, yamlDprintConfig } from "./dprint-config.js";
|
package/presets/base/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../configs/presets/base/base.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAClH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;
|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AAgB;IAChB,WAAW;CACgB,CAAC;AAEhC,mKAAmK;AACnK,OAAO,EACH,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,+EAA+E"}
|
|
@@ -5,7 +5,7 @@ export const typescriptDprintConfig = {
|
|
|
5
5
|
indentWidth,
|
|
6
6
|
newLineKind: 'lf',
|
|
7
7
|
useTabs: false,
|
|
8
|
-
|
|
8
|
+
semicolons: 'always',
|
|
9
9
|
quoteStyle: 'preferSingle',
|
|
10
10
|
quoteProps: 'asNeeded',
|
|
11
11
|
useBraces: 'always',
|
|
@@ -14,6 +14,7 @@ export const typescriptDprintConfig = {
|
|
|
14
14
|
nextControlFlowPosition: 'sameLine',
|
|
15
15
|
trailingCommas: 'never',
|
|
16
16
|
operatorPosition: 'maintain',
|
|
17
|
+
'unionAndIntersectionType.operatorPosition': 'sameLine',
|
|
17
18
|
preferHanging: false,
|
|
18
19
|
preferSingleLine: false,
|
|
19
20
|
'arrowFunction.useParentheses': 'force',
|
|
@@ -38,7 +39,7 @@ export const typescriptDprintConfig = {
|
|
|
38
39
|
'forInStatement.spaceAfterForKeyword': true,
|
|
39
40
|
'forOfStatement.spaceAfterForKeyword': true,
|
|
40
41
|
'forStatement.spaceAfterForKeyword': true,
|
|
41
|
-
'forStatement.
|
|
42
|
+
'forStatement.spaceAfterSemicolons': true,
|
|
42
43
|
'functionDeclaration.spaceBeforeParentheses': false,
|
|
43
44
|
'functionExpression.spaceBeforeParentheses': false,
|
|
44
45
|
'functionExpression.spaceAfterFunctionKeyword': true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dprint-config.js","sourceRoot":"","sources":["../../../../../configs/presets/base/dprint-config.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,WAAW,GAAG,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AAK;IAC1D,+BAA+B,EAAE,KAAK;IACtC,oCAAoC,EAAE,KAAK;IAC3C,mCAAmC,EAAE,KAAK;IAC1C,iCAAiC,EAAE,KAAK;IACxC,qCAAqC,EAAE,KAAK;IAC5C,uCAAuC,EAAE,IAAI;IAC7C,+BAA+B,EAAE,UAAU;IAC3C,+BAA+B,EAAE,UAAU;IAC3C,oCAAoC,EAAE,UAAU;IAChD,oCAAoC,EAAE,UAAU;IAChD,mCAAmC,EAAE,KAAK;IAC1C,mCAAmC,EAAE,KAAK;IAC1C,kCAAkC,EAAE,OAAO;IAC3C,kCAAkC,EAAE,OAAO;CAC9C,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,SAAS;IACT,WAAW;IACX,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK;IACd,8BAA8B,EAAE,KAAK;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,SAAS;IACT,WAAW,EAAE,IAAI;IACjB,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,aAAa;IAC3B,UAAU,EAAE,WAAW;IACvB,cAAc,EAAE,gBAAgB;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,UAAU,EAAE,SAAS;IACrB,WAAW;IACX,SAAS,EAAE,IAAI;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,SAAS;IACT,WAAW;IACX,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK;CACjB,CAAC"}
|
|
1
|
+
{"version":3,"file":"dprint-config.js","sourceRoot":"","sources":["../../../../../configs/presets/base/dprint-config.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,SAAS;IACT,WAAW;IACX,WAAW,EAAE,IAAI;IACjB,OAAO,EAA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IAC1C,iCAAiC,EAAE,KAAK;IACxC,qCAAqC,EAAE,KAAK;IAC5C,uCAAuC,EAAE,IAAI;IAC7C,+BAA+B,EAAE,UAAU;IAC3C,+BAA+B,EAAE,UAAU;IAC3C,oCAAoC,EAAE,UAAU;IAChD,oCAAoC,EAAE,UAAU;IAChD,mCAAmC,EAAE,KAAK;IAC1C,mCAAmC,EAAE,KAAK;IAC1C,kCAAkC,EAAE,OAAO;IAC3C,kCAAkC,EAAE,OAAO;CAC9C,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,SAAS;IACT,WAAW;IACX,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK;IACd,8BAA8B,EAAE,KAAK;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,SAAS;IACT,WAAW,EAAE,IAAI;IACjB,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,aAAa;IAC3B,UAAU,EAAE,WAAW;IACvB,cAAc,EAAE,gBAAgB;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,UAAU,EAAE,SAAS;IACrB,WAAW;IACX,SAAS,EAAE,IAAI;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,SAAS;IACT,WAAW;IACX,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK;CACjB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import shellPlugin from '@eslint/shell';
|
|
2
|
+
export const shellConfig = {
|
|
3
|
+
files: ['**/*.sh'],
|
|
4
|
+
language: 'shell/posix',
|
|
5
|
+
plugins: { shell: shellPlugin },
|
|
6
|
+
rules: {
|
|
7
|
+
'shell/no-backticks': 'error',
|
|
8
|
+
'shell/no-expansions-in-single-quotes': 'error',
|
|
9
|
+
'shell/no-ls-iteration': 'error',
|
|
10
|
+
'shell/no-unquoted-expansions': 'error',
|
|
11
|
+
'shell/no-unused-vars': 'error',
|
|
12
|
+
'shell/no-useless-cat': 'error',
|
|
13
|
+
'shell/no-useless-echo': 'error',
|
|
14
|
+
'shell/no-variables-in-printf-format': 'error',
|
|
15
|
+
'shell/require-cd-guard': 'error',
|
|
16
|
+
'shell/require-read-r': 'error'
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../../../../../configs/presets/base/shell.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,KAAK,EAAE,CAAE,SAAS,CAAE;IACpB,QAAQ,EAAE,aAAa;IACvB,OAAO,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE;IAC/B,KAAK,EAAE;QACH,oBAAoB,EAAE,OAAO;QAC7B,sCAAsC,EAAE,OAAO;QAC/C,uBAAuB,EAAE,OAAO;QAChC,8BAA8B,EAAE,OAAO;QACvC,sBAAsB,EAAE,OAAO;QAC/B,sBAAsB,EAAE,OAAO;QAC/B,uBAAuB,EAAE,OAAO;QAChC,qCAAqC,EAAE,OAAO;QAC9C,wBAAwB,EAAE,OAAO;QACjC,sBAAsB,EAAE,OAAO;KAClC;CACwB,CAAC"}
|
package/readme.md
CHANGED
|
@@ -11,6 +11,9 @@ expressions, complex branches, property assignments, and commented decisions. Co
|
|
|
11
11
|
checks also exclude initializers or conditions with potential side effects and reads of the selected
|
|
12
12
|
variable. It reports diagnostics without autofixes. `unicorn/prefer-ternary` is disabled.
|
|
13
13
|
|
|
14
|
+
Multiline TypeScript unions and intersections place `|` and `&` at the end of the preceding line,
|
|
15
|
+
matching `@stylistic/operator-linebreak`.
|
|
16
|
+
|
|
14
17
|
Code formatting is handled by [dprint](https://dprint.dev/), wired into ESLint via the
|
|
15
18
|
[`@ben_12/eslint-plugin-dprint`](https://www.npmjs.com/package/@ben_12/eslint-plugin-dprint) plugin. TypeScript/JavaScript
|
|
16
19
|
files are formatted via the `dprint/typescript` rule, and JSON, Markdown, YAML, and TOML files are formatted via their
|
|
@@ -106,8 +109,20 @@ The remaining blocks each enable one formatter or linter scoped to a default fil
|
|
|
106
109
|
| package.json | `**/package.json` | `package-json/*`, `json-schema-validator/no-invalid` |
|
|
107
110
|
| Markdown | `**/*.md` | `dprint-markdown/markdown`, `markdown/*`, `markdown-links/*`, `markdown-preferences/*`, `unicorn/*` |
|
|
108
111
|
| YAML | `**/*.{yml,yaml}` | `dprint/yaml` |
|
|
112
|
+
| Shell | `**/*.sh` | `shell/*` (POSIX) |
|
|
109
113
|
| TOML | `**/*.toml` | `dprint/toml` |
|
|
110
114
|
|
|
115
|
+
### Shell scripts
|
|
116
|
+
|
|
117
|
+
`.sh` files are linted as POSIX shell with explicitly configured rules from
|
|
118
|
+
[`@eslint/shell`](https://github.com/eslint/shell). These catch unquoted expansions, unused variables, unsafe `read`,
|
|
119
|
+
unguarded `cd`, and other common mistakes. All shell rules report errors. Shell formatting is not included, and these
|
|
120
|
+
rules do not replace the full ShellCheck rule set.
|
|
121
|
+
|
|
122
|
+
The configured dialect controls parsing, regardless of the shebang. For Bash scripts, apply
|
|
123
|
+
[`@enormora/eslint-config-bash`](../bash/bash.md) after base. It switches `.sh` to Bash and adds `.bash` files.
|
|
124
|
+
Narrow its `files` patterns when mixing POSIX and Bash scripts. Extensionless scripts require an explicit `files` pattern.
|
|
125
|
+
|
|
111
126
|
### Linting hidden directories
|
|
112
127
|
|
|
113
128
|
ESLint's CLI walker skips dot-directories such as `.github/` when you run `eslint .`. Because the dprint formatter
|
|
@@ -16,89 +16,89 @@
|
|
|
16
16
|
"component": {
|
|
17
17
|
"type": "library",
|
|
18
18
|
"name": "@enormora/eslint-config-base",
|
|
19
|
-
"version": "0.0.
|
|
20
|
-
"bom-ref": "pkg:npm/@enormora/eslint-config-base@0.0.
|
|
21
|
-
"purl": "pkg:npm/@enormora/eslint-config-base@0.0.
|
|
19
|
+
"version": "0.0.79",
|
|
20
|
+
"bom-ref": "pkg:npm/@enormora/eslint-config-base@0.0.79",
|
|
21
|
+
"purl": "pkg:npm/@enormora/eslint-config-base@0.0.79"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"components": [
|
|
25
25
|
{
|
|
26
26
|
"type": "library",
|
|
27
27
|
"name": "@ben_12/eslint-plugin-dprint",
|
|
28
|
-
"version": "1.
|
|
29
|
-
"bom-ref": "pkg:npm/@ben_12/eslint-plugin-dprint@1.
|
|
28
|
+
"version": "1.31.0",
|
|
29
|
+
"bom-ref": "pkg:npm/@ben_12/eslint-plugin-dprint@1.31.0",
|
|
30
30
|
"scope": "required",
|
|
31
31
|
"licenses": [
|
|
32
32
|
{
|
|
33
33
|
"expression": "MIT"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
|
-
"purl": "pkg:npm/@ben_12/eslint-plugin-dprint@1.
|
|
36
|
+
"purl": "pkg:npm/@ben_12/eslint-plugin-dprint@1.31.0"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"type": "library",
|
|
40
40
|
"name": "@cspell/eslint-plugin",
|
|
41
|
-
"version": "10.4.
|
|
42
|
-
"bom-ref": "pkg:npm/@cspell/eslint-plugin@10.4.
|
|
41
|
+
"version": "10.4.1",
|
|
42
|
+
"bom-ref": "pkg:npm/@cspell/eslint-plugin@10.4.1",
|
|
43
43
|
"scope": "required",
|
|
44
44
|
"licenses": [
|
|
45
45
|
{
|
|
46
46
|
"expression": "MIT"
|
|
47
47
|
}
|
|
48
48
|
],
|
|
49
|
-
"purl": "pkg:npm/@cspell/eslint-plugin@10.4.
|
|
49
|
+
"purl": "pkg:npm/@cspell/eslint-plugin@10.4.1"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"type": "library",
|
|
53
53
|
"name": "@dprint/json",
|
|
54
|
-
"version": "0.
|
|
55
|
-
"bom-ref": "pkg:npm/@dprint/json@0.
|
|
54
|
+
"version": "0.26.0",
|
|
55
|
+
"bom-ref": "pkg:npm/@dprint/json@0.26.0",
|
|
56
56
|
"scope": "required",
|
|
57
57
|
"licenses": [
|
|
58
58
|
{
|
|
59
59
|
"expression": "MIT"
|
|
60
60
|
}
|
|
61
61
|
],
|
|
62
|
-
"purl": "pkg:npm/@dprint/json@0.
|
|
62
|
+
"purl": "pkg:npm/@dprint/json@0.26.0"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"type": "library",
|
|
66
66
|
"name": "@dprint/markdown",
|
|
67
|
-
"version": "0.
|
|
68
|
-
"bom-ref": "pkg:npm/@dprint/markdown@0.
|
|
67
|
+
"version": "0.29.0",
|
|
68
|
+
"bom-ref": "pkg:npm/@dprint/markdown@0.29.0",
|
|
69
69
|
"scope": "required",
|
|
70
70
|
"licenses": [
|
|
71
71
|
{
|
|
72
72
|
"expression": "MIT"
|
|
73
73
|
}
|
|
74
74
|
],
|
|
75
|
-
"purl": "pkg:npm/@dprint/markdown@0.
|
|
75
|
+
"purl": "pkg:npm/@dprint/markdown@0.29.0"
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"type": "library",
|
|
79
79
|
"name": "@dprint/toml",
|
|
80
|
-
"version": "0.
|
|
81
|
-
"bom-ref": "pkg:npm/@dprint/toml@0.
|
|
80
|
+
"version": "0.10.0",
|
|
81
|
+
"bom-ref": "pkg:npm/@dprint/toml@0.10.0",
|
|
82
82
|
"scope": "required",
|
|
83
83
|
"licenses": [
|
|
84
84
|
{
|
|
85
85
|
"expression": "MIT"
|
|
86
86
|
}
|
|
87
87
|
],
|
|
88
|
-
"purl": "pkg:npm/@dprint/toml@0.
|
|
88
|
+
"purl": "pkg:npm/@dprint/toml@0.10.0"
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
"type": "library",
|
|
92
92
|
"name": "@dprint/typescript",
|
|
93
|
-
"version": "0.
|
|
94
|
-
"bom-ref": "pkg:npm/@dprint/typescript@0.
|
|
93
|
+
"version": "0.99.1",
|
|
94
|
+
"bom-ref": "pkg:npm/@dprint/typescript@0.99.1",
|
|
95
95
|
"scope": "required",
|
|
96
96
|
"licenses": [
|
|
97
97
|
{
|
|
98
98
|
"expression": "MIT"
|
|
99
99
|
}
|
|
100
100
|
],
|
|
101
|
-
"purl": "pkg:npm/@dprint/typescript@0.
|
|
101
|
+
"purl": "pkg:npm/@dprint/typescript@0.99.1"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"type": "library",
|
|
@@ -139,6 +139,19 @@
|
|
|
139
139
|
],
|
|
140
140
|
"purl": "pkg:npm/@eslint/plugin-kit@0.7.3"
|
|
141
141
|
},
|
|
142
|
+
{
|
|
143
|
+
"type": "library",
|
|
144
|
+
"name": "@eslint/shell",
|
|
145
|
+
"version": "0.1.2",
|
|
146
|
+
"bom-ref": "pkg:npm/@eslint/shell@0.1.2",
|
|
147
|
+
"scope": "required",
|
|
148
|
+
"licenses": [
|
|
149
|
+
{
|
|
150
|
+
"expression": "Apache-2.0"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"purl": "pkg:npm/@eslint/shell@0.1.2"
|
|
154
|
+
},
|
|
142
155
|
{
|
|
143
156
|
"type": "library",
|
|
144
157
|
"name": "@stylistic/eslint-plugin",
|
|
@@ -389,35 +402,36 @@
|
|
|
389
402
|
],
|
|
390
403
|
"dependencies": [
|
|
391
404
|
{
|
|
392
|
-
"ref": "pkg:npm/@ben_12/eslint-plugin-dprint@1.
|
|
405
|
+
"ref": "pkg:npm/@ben_12/eslint-plugin-dprint@1.31.0"
|
|
393
406
|
},
|
|
394
407
|
{
|
|
395
|
-
"ref": "pkg:npm/@cspell/eslint-plugin@10.4.
|
|
408
|
+
"ref": "pkg:npm/@cspell/eslint-plugin@10.4.1"
|
|
396
409
|
},
|
|
397
410
|
{
|
|
398
|
-
"ref": "pkg:npm/@dprint/json@0.
|
|
411
|
+
"ref": "pkg:npm/@dprint/json@0.26.0"
|
|
399
412
|
},
|
|
400
413
|
{
|
|
401
|
-
"ref": "pkg:npm/@dprint/markdown@0.
|
|
414
|
+
"ref": "pkg:npm/@dprint/markdown@0.29.0"
|
|
402
415
|
},
|
|
403
416
|
{
|
|
404
|
-
"ref": "pkg:npm/@dprint/toml@0.
|
|
417
|
+
"ref": "pkg:npm/@dprint/toml@0.10.0"
|
|
405
418
|
},
|
|
406
419
|
{
|
|
407
|
-
"ref": "pkg:npm/@dprint/typescript@0.
|
|
420
|
+
"ref": "pkg:npm/@dprint/typescript@0.99.1"
|
|
408
421
|
},
|
|
409
422
|
{
|
|
410
|
-
"ref": "pkg:npm/@enormora/eslint-config-base@0.0.
|
|
423
|
+
"ref": "pkg:npm/@enormora/eslint-config-base@0.0.79",
|
|
411
424
|
"dependsOn": [
|
|
412
|
-
"pkg:npm/@ben_12/eslint-plugin-dprint@1.
|
|
413
|
-
"pkg:npm/@cspell/eslint-plugin@10.4.
|
|
414
|
-
"pkg:npm/@dprint/json@0.
|
|
415
|
-
"pkg:npm/@dprint/markdown@0.
|
|
416
|
-
"pkg:npm/@dprint/toml@0.
|
|
417
|
-
"pkg:npm/@dprint/typescript@0.
|
|
425
|
+
"pkg:npm/@ben_12/eslint-plugin-dprint@1.31.0",
|
|
426
|
+
"pkg:npm/@cspell/eslint-plugin@10.4.1",
|
|
427
|
+
"pkg:npm/@dprint/json@0.26.0",
|
|
428
|
+
"pkg:npm/@dprint/markdown@0.29.0",
|
|
429
|
+
"pkg:npm/@dprint/toml@0.10.0",
|
|
430
|
+
"pkg:npm/@dprint/typescript@0.99.1",
|
|
418
431
|
"pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.8.1",
|
|
419
432
|
"pkg:npm/@eslint/markdown@8.0.3",
|
|
420
433
|
"pkg:npm/@eslint/plugin-kit@0.7.3",
|
|
434
|
+
"pkg:npm/@eslint/shell@0.1.2",
|
|
421
435
|
"pkg:npm/@stylistic/eslint-plugin@5.10.0",
|
|
422
436
|
"pkg:npm/@typescript-eslint/utils@8.72.1",
|
|
423
437
|
"pkg:npm/dprint-plugin-yaml@0.6.0",
|
|
@@ -448,6 +462,9 @@
|
|
|
448
462
|
{
|
|
449
463
|
"ref": "pkg:npm/@eslint/plugin-kit@0.7.3"
|
|
450
464
|
},
|
|
465
|
+
{
|
|
466
|
+
"ref": "pkg:npm/@eslint/shell@0.1.2"
|
|
467
|
+
},
|
|
451
468
|
{
|
|
452
469
|
"ref": "pkg:npm/@stylistic/eslint-plugin@5.10.0"
|
|
453
470
|
},
|