@techninja/clearstack 0.4.21 → 0.4.22
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/lib/spec-config.js +8 -6
- package/package.json +1 -1
package/lib/spec-config.js
CHANGED
|
@@ -102,23 +102,25 @@ export function buildCmds(projectDir, opts) {
|
|
|
102
102
|
const audit = runner === 'pnpm exec'
|
|
103
103
|
? 'pnpm audit --prod --ignore-registry-errors'
|
|
104
104
|
: 'npm audit --omit=dev';
|
|
105
|
+
const prettier = (cmd) => `${runner} prettier --config .configs/.prettierrc --ignore-path .configs/.prettierignore --${cmd} src scripts`;
|
|
106
|
+
const stylelint = (extra = '') => `${runner} stylelint --config .configs/.stylelintrc.json "src/**/*.css" "!src/embed-dist/**"${extra}`;
|
|
105
107
|
if (opts?.watch) return {
|
|
106
108
|
lint: `${runner} eslint --config .configs/eslint.config.js .`,
|
|
107
|
-
stylelint:
|
|
108
|
-
prettier:
|
|
109
|
+
stylelint: stylelint(),
|
|
110
|
+
prettier: prettier('check'),
|
|
109
111
|
mdlint: `${runner} markdownlint-cli2 --config .configs/.markdownlint.jsonc "docs/**/*.md" "*.md"`,
|
|
110
112
|
audit,
|
|
111
113
|
fix: {
|
|
112
114
|
es: `${runner} eslint --config .configs/eslint.config.js . --fix`,
|
|
113
|
-
css:
|
|
114
|
-
prettier:
|
|
115
|
+
css: stylelint(' --fix'),
|
|
116
|
+
prettier: prettier('write'),
|
|
115
117
|
md: `${runner} markdownlint-cli2 --config .configs/.markdownlint.jsonc --fix "docs/**/*.md" "*.md"`,
|
|
116
118
|
},
|
|
117
119
|
};
|
|
118
120
|
return {
|
|
119
121
|
lint: `${runner} eslint --config .configs/eslint.config.js . --fix`,
|
|
120
|
-
stylelint:
|
|
121
|
-
prettier:
|
|
122
|
+
stylelint: stylelint(' --fix'),
|
|
123
|
+
prettier: prettier('write'),
|
|
122
124
|
mdlint: `${runner} markdownlint-cli2 --config .configs/.markdownlint.jsonc --fix "docs/**/*.md" "*.md"`,
|
|
123
125
|
audit,
|
|
124
126
|
};
|
package/package.json
CHANGED