@kitschpatrol/shared-config 1.0.0 → 1.0.2
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 -8
- package/readme.md +1 -1
- package/scripts/run-helper.js +9 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/shared-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Linting and formatting for web projects.",
|
|
6
6
|
"repository": {
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"scripts"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@kitschpatrol/
|
|
34
|
-
"@kitschpatrol/npm-config": "1.0.
|
|
35
|
-
"@kitschpatrol/
|
|
36
|
-
"@kitschpatrol/
|
|
37
|
-
"@kitschpatrol/
|
|
38
|
-
"@kitschpatrol/
|
|
39
|
-
"@kitschpatrol/
|
|
33
|
+
"@kitschpatrol/cspell-config": "1.0.1",
|
|
34
|
+
"@kitschpatrol/npm-config": "1.0.1",
|
|
35
|
+
"@kitschpatrol/eslint-config": "1.0.1",
|
|
36
|
+
"@kitschpatrol/markdownlint-config": "1.0.1",
|
|
37
|
+
"@kitschpatrol/prettier-config": "1.0.1",
|
|
38
|
+
"@kitschpatrol/vscode-config": "1.0.1",
|
|
39
|
+
"@kitschpatrol/stylelint-config": "1.0.1"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
package/readme.md
CHANGED
package/scripts/run-helper.js
CHANGED
|
@@ -5,7 +5,7 @@ import console from 'node:console';
|
|
|
5
5
|
import { once } from 'node:events';
|
|
6
6
|
import process from 'node:process';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const lintOrFix = [
|
|
9
9
|
{
|
|
10
10
|
command: 'eslint .',
|
|
11
11
|
fixArgument: '--fix',
|
|
@@ -14,14 +14,14 @@ const commands = stylePrefixes([
|
|
|
14
14
|
},
|
|
15
15
|
// Other commands...
|
|
16
16
|
{
|
|
17
|
-
command: 'stylelint --allow-empty-input "**/*.{css,scss,sass,svelte,html,astro}"',
|
|
17
|
+
command: 'stylelint --ignore-path .gitignore --allow-empty-input "**/*.{css,scss,sass,svelte,html,astro}"',
|
|
18
18
|
fixArgument: '--fix',
|
|
19
19
|
lintArgument: '',
|
|
20
20
|
prefix: 'Stylelint',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
command:
|
|
24
|
-
'prettier --plugin=@prettier/plugin-php --plugin=@prettier/plugin-ruby --plugin=@prettier/plugin-xml --plugin=prettier-plugin-astro --plugin=prettier-plugin-pkg --plugin=prettier-plugin-sh --plugin=prettier-plugin-sql --plugin=prettier-plugin-svelte --plugin=prettier-plugin-tailwindcss --plugin=prettier-plugin-toml .',
|
|
24
|
+
'prettier --log-level warn --plugin=@prettier/plugin-php --plugin=@prettier/plugin-ruby --plugin=@prettier/plugin-xml --plugin=prettier-plugin-astro --plugin=prettier-plugin-pkg --plugin=prettier-plugin-sh --plugin=prettier-plugin-sql --plugin=prettier-plugin-svelte --plugin=prettier-plugin-tailwindcss --plugin=prettier-plugin-toml .',
|
|
25
25
|
fixArgument: '--write',
|
|
26
26
|
lintArgument: '--check',
|
|
27
27
|
prefix: 'Prettier',
|
|
@@ -32,13 +32,16 @@ const commands = stylePrefixes([
|
|
|
32
32
|
lintArgument: '',
|
|
33
33
|
prefix: 'markdownlint',
|
|
34
34
|
},
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const lintOnly = [
|
|
35
38
|
{
|
|
36
39
|
command: 'cspell --quiet .',
|
|
37
40
|
fixArgument: '',
|
|
38
41
|
lintArgument: '',
|
|
39
42
|
prefix: 'CSpell',
|
|
40
43
|
},
|
|
41
|
-
]
|
|
44
|
+
];
|
|
42
45
|
|
|
43
46
|
function stylePrefixes(commands) {
|
|
44
47
|
// ANSI color codes (excluding red and ANSI 256-colors)
|
|
@@ -108,6 +111,8 @@ async function runCommand({ command, fixArgument, lintArgument, prefix }, fix =
|
|
|
108
111
|
}
|
|
109
112
|
|
|
110
113
|
export async function runAllCommands(fix = false) {
|
|
114
|
+
const commands = stylePrefixes(fix ? [...lintOrFix] : [...lintOrFix, ...lintOnly]);
|
|
115
|
+
|
|
111
116
|
let errors = [];
|
|
112
117
|
for (const cmd of commands) {
|
|
113
118
|
try {
|