@p8ec/shared 2.0.5 → 2.1.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/dist/assets/eslint.config.cjs +1 -0
- package/dist/assets/eslint.config.mjs +1 -0
- package/dist/cjs/bin/p8-shared-cli.js +7 -1
- package/dist/cjs/eslintConfigRecommended.js +1 -1
- package/dist/esm/eslintConfigRecommended.js +1 -1
- package/dist/types/eslintConfigRecommended.d.ts +2 -0
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/** @type {import('@p8ec/shared').EslintConfigOverride} */
|
|
4
4
|
const override = {
|
|
5
5
|
// copyright: 'Copyright header',
|
|
6
|
+
// eslintConfig: { languageOptions: { globals: { ...globals.node} } },
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
module.exports = require('@p8ec/shared').eslintConfigRecommended(override);
|
|
@@ -4,6 +4,7 @@ import { eslintConfigRecommended } from '@p8ec/shared';
|
|
|
4
4
|
/** @type {import('@p8ec/shared').EslintConfigOverride} */
|
|
5
5
|
const override = {
|
|
6
6
|
// copyright: 'Copyright header',
|
|
7
|
+
// eslintConfig: { languageOptions: { globals: { ...globals.node} } },
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export default eslintConfigRecommended(override);
|
|
@@ -116,8 +116,14 @@ const init = (option) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
116
116
|
copyAsset(`commitlint.config.${moduleType}`);
|
|
117
117
|
writeLn('Creating lefthook.yml...');
|
|
118
118
|
copyAsset('lefthook.yml');
|
|
119
|
+
writeLn('Adding lefthook install to postinstall...');
|
|
119
120
|
packageJson.scripts.postinstall = 'lefthook install';
|
|
120
|
-
|
|
121
|
+
const npmInstall = 'npm install --save-dev @commitlint/{config-conventional,cli} commitlint lefthook';
|
|
122
|
+
writeLn(`Executing ${npmInstall}...`);
|
|
123
|
+
execShell(npmInstall);
|
|
124
|
+
const lefthookInstall = 'npm run postinstall';
|
|
125
|
+
writeLn(`Executing ${lefthookInstall}...`);
|
|
126
|
+
execShell(lefthookInstall);
|
|
121
127
|
}
|
|
122
128
|
if (option === null || option === void 0 ? void 0 : option.split(',').includes('cleanup')) {
|
|
123
129
|
initCleanup(packageJson);
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
* 2024 Copyright P8 Enterprise Components, Inc.
|
|
3
3
|
* All Rights Reserved.
|
|
4
4
|
*/
|
|
5
|
+
import { ConfigWithExtends } from 'typescript-eslint';
|
|
5
6
|
interface EslintConfigOverrideInterface {
|
|
6
7
|
copyright?: string;
|
|
8
|
+
eslintConfig?: ConfigWithExtends;
|
|
7
9
|
}
|
|
8
10
|
export type EslintConfigOverride = EslintConfigOverrideInterface;
|
|
9
11
|
declare const _default: (override?: EslintConfigOverride) => import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|