@naturalcycles/dev-lib 19.19.0 → 19.20.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/cfg/tsconfig.json +2 -2
- package/dist/lint.util.d.ts +1 -1
- package/dist/lint.util.js +11 -2
- package/package.json +1 -1
- package/scripts/tsconfig.json +2 -2
package/cfg/tsconfig.json
CHANGED
package/dist/lint.util.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ interface EslintAllOptions {
|
|
|
11
11
|
* Runs `eslint` command for all predefined paths (e.g /src, /scripts, etc).
|
|
12
12
|
*/
|
|
13
13
|
export declare function eslintAll(opt?: EslintAllOptions): Promise<void>;
|
|
14
|
-
export declare function runPrettier(): void;
|
|
14
|
+
export declare function runPrettier(experimentalCli?: boolean): void;
|
|
15
15
|
export declare function stylelintAll(): void;
|
|
16
16
|
export declare function lintStagedCommand(): Promise<void>;
|
|
17
17
|
export declare function runCommitlintCommand(): void;
|
package/dist/lint.util.js
CHANGED
|
@@ -144,14 +144,23 @@ const prettierPaths = [
|
|
|
144
144
|
// Exclude
|
|
145
145
|
...lintExclude.map((s) => `!${s}`),
|
|
146
146
|
];
|
|
147
|
-
export function runPrettier() {
|
|
147
|
+
export function runPrettier(experimentalCli = true) {
|
|
148
148
|
const prettierConfigPath = [`./prettier.config.js`].find(f => existsSync(f));
|
|
149
149
|
if (!prettierConfigPath)
|
|
150
150
|
return;
|
|
151
151
|
const prettierPath = findPackageBinPath('prettier', 'prettier');
|
|
152
152
|
// prettier --write 'src/**/*.{js,ts,css,scss,graphql}'
|
|
153
153
|
exec2.spawn(prettierPath, {
|
|
154
|
-
args: [
|
|
154
|
+
args: [
|
|
155
|
+
`--write`,
|
|
156
|
+
`--log-level=warn`,
|
|
157
|
+
// '--cache-location',
|
|
158
|
+
// `${process.cwd()}/node_modules/.cache/prettier`,
|
|
159
|
+
experimentalCli && `--experimental-cli`,
|
|
160
|
+
experimentalCli ? '--config-path' : `--config`,
|
|
161
|
+
prettierConfigPath,
|
|
162
|
+
...prettierPaths,
|
|
163
|
+
].filter(_isTruthy),
|
|
155
164
|
shell: false,
|
|
156
165
|
});
|
|
157
166
|
}
|
package/package.json
CHANGED
package/scripts/tsconfig.json
CHANGED