@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.
@@ -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
- execShell('npm install --save-dev @commitlint/{config-conventional,cli} commitlint lefthook');
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);
@@ -56,5 +56,5 @@ exports.default = (override) => {
56
56
  },
57
57
  ],
58
58
  },
59
- });
59
+ }, Object.assign({}, override === null || override === void 0 ? void 0 : override.eslintConfig));
60
60
  };
@@ -28,5 +28,5 @@ export default (override) => {
28
28
  },
29
29
  ],
30
30
  },
31
- });
31
+ }, Object.assign({}, override === null || override === void 0 ? void 0 : override.eslintConfig));
32
32
  };
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@p8ec/shared",
3
- "version": "2.0.5",
3
+ "version": "2.1.0",
4
4
  "description": "P(8) Global Shared Library for Javascript",
5
5
  "repository": {
6
6
  "type": "git",