@shi-corp/development-utilities 0.0.1 → 1.0.4

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Software Hardware Integration - Lab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # Development Utilities [![Unit Test](https://github.com/Software-Hardware-Integration-Lab/Development-Utilities/actions/workflows/Unit-Test.yml/badge.svg)](https://github.com/Software-Hardware-Integration-Lab/Development-Utilities/actions/workflows/Unit-Test.yml) [![Lint Check](https://github.com/Software-Hardware-Integration-Lab/Development-Utilities/actions/workflows/Lint.yml/badge.svg)](https://github.com/Software-Hardware-Integration-Lab/Development-Utilities/actions/workflows/Lint.yml) [![CodeQL](https://github.com/Software-Hardware-Integration-Lab/Development-Utilities/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/Software-Hardware-Integration-Lab/Development-Utilities/actions/workflows/github-code-scanning/codeql)
2
+
3
+ Shared development-time configurations for TypeScript, ESLint (flat config), and Next.js. These utilities are dev-only and should not ship with application runtime artifacts.
4
+
5
+ These configurations are not exhaustive and might require bespoke changes once extended or included in your target repo (based on the configuration used).
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install --save-dev @shi-corp/development-utilities
11
+ ```
12
+
13
+ ### Note
14
+
15
+ Do not import anything from this package in production/runtime code.
16
+
17
+ ## TS Config configuration
18
+
19
+ Since it is not a code but just configuration file, it would require particular handling to use:
20
+
21
+ in tsconfig.json make these changes
22
+
23
+ ```jsonc
24
+ {
25
+ "extends": "@shi-corp/development-utilities/config/baseTsConfig.json",
26
+ "compilerOptions": {
27
+ "outDir": "./bin" // Adjust for your project
28
+ }
29
+ // ... Any other options that need to override base behavior
30
+ }
31
+ ```
32
+
33
+ ## Lint configuration
34
+
35
+ This project is using flat file for eslint (best results achieved with version >=9.9.0) and the intention to be compatible with that style only:
36
+
37
+ in eslint.config.(m)js make these changes
38
+
39
+ ```JavaScript
40
+ import { eslintConfig } from '@shi-corp/development-utilities';
41
+
42
+ export default [
43
+ ...eslintConfig,
44
+ // Add project-specific rules, ignores, or plugins here
45
+ ];
46
+ ```
47
+
48
+ ## Next.js configuration
49
+
50
+ in next.config.(m)js make these changes
51
+
52
+ ```JavaScript
53
+ import { nextConfig } from '@shi-corp/development-utilities';
54
+
55
+ export default {
56
+ ...nextConfig,
57
+ ... // any other options that need to override base behavior
58
+ };
59
+ ```
60
+
61
+ ## Scope and intent
62
+
63
+ - Dev-only: configurations used for authoring, linting, and building. They should not be bundled into final application artifacts.
64
+ - Centralized defaults: opinionated baselines to standardize behavior across repos.
65
+ - Opt-in overrides: extend and override per project as needed.
66
+
67
+ ## Compatibility
68
+
69
+ - Node.JS (Latest LTS)
70
+ - ES Lint >= 9.40
71
+ - TypeScript >= 5.9
72
+ - Next.JS >= 15 (only if using the provided next config)
73
+
74
+ ## License
75
+
76
+ MIT
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Array of configuration objects merged together to form baseline for linting of the code.
3
+ */
4
+ export declare const eslintConfig: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
@@ -0,0 +1,455 @@
1
+ import eslint from '@eslint/js';
2
+ import globals from 'globals';
3
+ import jsdoc from 'eslint-plugin-jsdoc';
4
+ import stylistic from '@stylistic/eslint-plugin';
5
+ import tseslint from 'typescript-eslint';
6
+ export const eslintConfig = tseslint.config(eslint.configs.recommended, jsdoc.configs['flat/recommended-typescript'], ...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked, {
7
+ 'ignores': ['eslint.config.mjs']
8
+ }, {
9
+ 'languageOptions': {
10
+ 'globals': {
11
+ ...globals.browser,
12
+ ...globals.mocha,
13
+ ...globals.node,
14
+ ...globals.es2021
15
+ },
16
+ 'parserOptions': {
17
+ 'projectService': true
18
+ }
19
+ },
20
+ 'linterOptions': { 'reportUnusedDisableDirectives': true },
21
+ 'plugins': {
22
+ jsdoc,
23
+ stylistic
24
+ },
25
+ 'rules': {
26
+ '@typescript-eslint/class-methods-use-this': 'warn',
27
+ '@typescript-eslint/consistent-return': 'warn',
28
+ '@typescript-eslint/default-param-last': 'warn',
29
+ '@typescript-eslint/explicit-function-return-type': 'warn',
30
+ '@typescript-eslint/init-declarations': 'warn',
31
+ '@typescript-eslint/no-array-constructor': 'warn',
32
+ '@typescript-eslint/no-empty-function': 'warn',
33
+ '@typescript-eslint/no-implied-eval': 'warn',
34
+ '@typescript-eslint/no-invalid-this': 'warn',
35
+ '@typescript-eslint/no-loop-func': 'warn',
36
+ '@typescript-eslint/no-misused-promises': [
37
+ 'warn',
38
+ {
39
+ 'checksVoidReturn': {
40
+ 'arguments': false
41
+ }
42
+ }
43
+ ],
44
+ '@typescript-eslint/no-non-null-assertion': 'off',
45
+ '@typescript-eslint/no-restricted-imports': 'warn',
46
+ '@typescript-eslint/no-shadow': 'warn',
47
+ '@typescript-eslint/no-unused-expressions': 'warn',
48
+ '@typescript-eslint/no-unused-vars': [
49
+ 'warn',
50
+ {
51
+ 'caughtErrors': 'none'
52
+ }
53
+ ],
54
+ '@typescript-eslint/no-use-before-define': 'warn',
55
+ '@typescript-eslint/no-useless-constructor': 'warn',
56
+ '@typescript-eslint/prefer-destructuring': 'warn',
57
+ '@typescript-eslint/prefer-promise-reject-errors': 'warn',
58
+ '@typescript-eslint/require-await': 'warn',
59
+ '@typescript-eslint/restrict-template-expressions': [
60
+ 'warn',
61
+ {
62
+ 'allowNumber': true
63
+ }
64
+ ],
65
+ 'accessor-pairs': 'warn',
66
+ 'array-callback-return': 'warn',
67
+ 'arrow-body-style': 'warn',
68
+ 'block-scoped-var': 'warn',
69
+ 'camelcase': 'warn',
70
+ 'capitalized-comments': 'warn',
71
+ 'class-methods-use-this': 'off',
72
+ 'consistent-return': 'off',
73
+ 'consistent-this': 'warn',
74
+ 'curly': 'warn',
75
+ 'default-case': 'warn',
76
+ 'default-case-last': 'warn',
77
+ 'default-param-last': 'off',
78
+ 'eqeqeq': 'warn',
79
+ 'func-name-matching': 'warn',
80
+ 'func-names': 'warn',
81
+ 'func-style': [
82
+ 'warn',
83
+ 'declaration'
84
+ ],
85
+ 'grouped-accessor-pairs': 'warn',
86
+ 'guard-for-in': 'warn',
87
+ 'id-denylist': 'warn',
88
+ 'id-length': 'warn',
89
+ 'id-match': 'warn',
90
+ 'init-declarations': 'off',
91
+ 'jsdoc/check-alignment': 'warn',
92
+ 'jsdoc/check-indentation': [
93
+ 'warn',
94
+ {
95
+ 'excludeTags': [
96
+ 'example',
97
+ 'returns'
98
+ ]
99
+ }
100
+ ],
101
+ 'jsdoc/informative-docs': 'warn',
102
+ 'jsdoc/no-blank-blocks': 'warn',
103
+ 'jsdoc/no-multi-asterisks': [
104
+ 'warn',
105
+ {
106
+ 'allowWhitespace': true
107
+ }
108
+ ],
109
+ 'jsdoc/require-asterisk-prefix': 'warn',
110
+ 'jsdoc/require-description-complete-sentence': [
111
+ 'warn',
112
+ {
113
+ 'abbreviations': ['etc.', 'e.g.', 'i.e.']
114
+ }
115
+ ],
116
+ 'jsdoc/require-jsdoc': [
117
+ 'warn',
118
+ {
119
+ 'contexts': [
120
+ 'ClassBody > PropertyDefinition',
121
+ 'VariableDeclaration:not(:has(VariableDeclarator[id.type=\"ArrayPattern\"])):not(:has(VariableDeclarator[id.type=\"ObjectPattern\"])):not(ExportNamedDeclaration > VariableDeclaration):not(ForOfStatement > VariableDeclaration):not(ForInStatement > VariableDeclaration):not(ForStatement > VariableDeclaration)',
122
+ 'TSInterfaceDeclaration',
123
+ 'TSPropertySignature',
124
+ 'TSMethodSignature',
125
+ 'TSTypeAliasDeclaration'
126
+ ],
127
+ 'enableFixer': false,
128
+ 'require': {
129
+ 'ArrowFunctionExpression': true,
130
+ 'ClassDeclaration': true,
131
+ 'ClassExpression': true,
132
+ 'FunctionDeclaration': true,
133
+ 'FunctionExpression': true,
134
+ 'MethodDefinition': true
135
+ }
136
+ }
137
+ ],
138
+ 'jsdoc/require-param': 'warn',
139
+ 'jsdoc/valid-types': 'warn',
140
+ 'max-classes-per-file': 'warn',
141
+ 'max-depth': [
142
+ 'warn',
143
+ 7
144
+ ],
145
+ 'max-nested-callbacks': 'warn',
146
+ 'new-cap': 'warn',
147
+ 'no-alert': 'warn',
148
+ 'no-array-constructor': 'off',
149
+ 'no-bitwise': 'warn',
150
+ 'no-caller': 'warn',
151
+ 'no-console': 'warn',
152
+ 'no-constructor-return': 'warn',
153
+ 'no-continue': 'warn',
154
+ 'no-div-regex': 'warn',
155
+ 'no-duplicate-imports': 'warn',
156
+ 'no-else-return': 'warn',
157
+ 'no-empty-function': 'off',
158
+ 'no-eq-null': 'warn',
159
+ 'no-eval': 'warn',
160
+ 'no-extend-native': 'warn',
161
+ 'no-extra-bind': 'warn',
162
+ 'no-extra-label': 'warn',
163
+ 'no-implicit-coercion': 'warn',
164
+ 'no-implicit-globals': 'warn',
165
+ 'no-implied-eval': 'off',
166
+ 'no-invalid-this': 'off',
167
+ 'no-iterator': 'warn',
168
+ 'no-label-var': 'warn',
169
+ 'no-labels': [
170
+ 'warn',
171
+ {
172
+ 'allowLoop': true
173
+ }
174
+ ],
175
+ 'no-lone-blocks': 'warn',
176
+ 'no-lonely-if': 'warn',
177
+ 'no-loop-func': 'off',
178
+ 'no-multi-assign': 'warn',
179
+ 'no-multi-str': 'warn',
180
+ 'no-nested-ternary': 'warn',
181
+ 'no-new': 'warn',
182
+ 'no-new-func': 'warn',
183
+ 'no-new-wrappers': 'warn',
184
+ 'no-object-constructor': 'warn',
185
+ 'no-octal-escape': 'warn',
186
+ 'no-param-reassign': 'warn',
187
+ 'no-plusplus': [
188
+ 'warn',
189
+ {
190
+ 'allowForLoopAfterthoughts': true
191
+ }
192
+ ],
193
+ 'no-promise-executor-return': 'warn',
194
+ 'no-proto': 'warn',
195
+ 'no-restricted-exports': 'warn',
196
+ 'no-restricted-globals': 'warn',
197
+ 'no-restricted-imports': 'off',
198
+ 'no-restricted-properties': 'warn',
199
+ 'no-restricted-syntax': 'warn',
200
+ 'no-return-assign': 'warn',
201
+ 'no-script-url': 'warn',
202
+ 'no-self-compare': 'warn',
203
+ 'no-sequences': 'warn',
204
+ 'no-shadow': 'off',
205
+ 'no-template-curly-in-string': 'warn',
206
+ 'no-throw-literal': 'warn',
207
+ 'no-undef-init': 'warn',
208
+ 'no-undefined': 'warn',
209
+ 'no-underscore-dangle': 'warn',
210
+ 'no-unmodified-loop-condition': 'warn',
211
+ 'no-unneeded-ternary': 'warn',
212
+ 'no-unreachable-loop': 'warn',
213
+ 'no-unused-expressions': 'off',
214
+ 'no-unused-vars': 'off',
215
+ 'no-use-before-define': 'off',
216
+ 'no-useless-call': 'warn',
217
+ 'no-useless-computed-key': 'warn',
218
+ 'no-useless-concat': 'warn',
219
+ 'no-useless-constructor': 'off',
220
+ 'no-useless-rename': 'warn',
221
+ 'no-useless-return': 'warn',
222
+ 'no-var': 'warn',
223
+ 'no-warning-comments': [
224
+ 'warn',
225
+ {
226
+ 'terms': [
227
+ 'fixme',
228
+ 'xxx'
229
+ ]
230
+ }
231
+ ],
232
+ 'object-shorthand': 'warn',
233
+ 'one-var': [
234
+ 'warn',
235
+ 'never'
236
+ ],
237
+ 'operator-assignment': 'warn',
238
+ 'prefer-arrow-callback': 'warn',
239
+ 'prefer-const': 'warn',
240
+ 'prefer-destructuring': 'off',
241
+ 'prefer-exponentiation-operator': 'warn',
242
+ 'prefer-named-capture-group': 'warn',
243
+ 'prefer-numeric-literals': 'warn',
244
+ 'prefer-object-spread': 'warn',
245
+ 'prefer-promise-reject-errors': 'off',
246
+ 'prefer-regex-literals': 'warn',
247
+ 'prefer-rest-params': 'warn',
248
+ 'prefer-spread': 'warn',
249
+ 'prefer-template': 'warn',
250
+ 'radix': 'warn',
251
+ 'require-atomic-updates': 'warn',
252
+ 'require-await': 'off',
253
+ 'require-unicode-regexp': 'warn',
254
+ 'sort-imports': 'warn',
255
+ 'sort-keys': 'warn',
256
+ 'sort-vars': 'warn',
257
+ 'strict': 'warn',
258
+ 'stylistic/array-bracket-newline': 'warn',
259
+ 'stylistic/array-bracket-spacing': 'warn',
260
+ 'stylistic/array-element-newline': [
261
+ 'warn',
262
+ 'consistent'
263
+ ],
264
+ 'stylistic/arrow-parens': 'warn',
265
+ 'stylistic/arrow-spacing': 'warn',
266
+ 'stylistic/block-spacing': 'warn',
267
+ 'stylistic/brace-style': [
268
+ 'warn',
269
+ '1tbs',
270
+ {
271
+ 'allowSingleLine': true
272
+ }
273
+ ],
274
+ 'stylistic/comma-dangle': 'warn',
275
+ 'stylistic/comma-spacing': 'warn',
276
+ 'stylistic/comma-style': 'warn',
277
+ 'stylistic/computed-property-spacing': 'warn',
278
+ 'stylistic/dot-location': [
279
+ 'warn',
280
+ 'property'
281
+ ],
282
+ 'stylistic/eol-last': 'warn',
283
+ 'stylistic/function-call-argument-newline': [
284
+ 'warn',
285
+ 'consistent'
286
+ ],
287
+ 'stylistic/function-call-spacing': 'warn',
288
+ 'stylistic/function-paren-newline': 'warn',
289
+ 'stylistic/generator-star-spacing': 'warn',
290
+ 'stylistic/implicit-arrow-linebreak': 'warn',
291
+ 'stylistic/jsx-quotes': 'warn',
292
+ 'stylistic/key-spacing': 'warn',
293
+ 'stylistic/keyword-spacing': 'warn',
294
+ 'stylistic/lines-around-comment': [
295
+ 'warn',
296
+ {
297
+ 'allowBlockStart': true,
298
+ 'allowClassStart': true,
299
+ 'allowEnumStart': true,
300
+ 'allowInterfaceStart': true,
301
+ 'allowModuleStart': true,
302
+ 'allowObjectStart': true,
303
+ 'allowTypeStart': true,
304
+ 'beforeBlockComment': true,
305
+ 'beforeLineComment': true
306
+ }
307
+ ],
308
+ 'stylistic/lines-between-class-members': [
309
+ 'warn',
310
+ 'always',
311
+ {
312
+ 'exceptAfterSingleLine': true
313
+ }
314
+ ],
315
+ 'stylistic/multiline-comment-style': 'warn',
316
+ 'stylistic/multiline-ternary': [
317
+ 'warn',
318
+ 'always-multiline'
319
+ ],
320
+ 'stylistic/new-parens': 'warn',
321
+ 'stylistic/newline-per-chained-call': 'warn',
322
+ 'stylistic/no-confusing-arrow': 'warn',
323
+ 'stylistic/no-extra-parens': [
324
+ 'warn',
325
+ 'all',
326
+ {
327
+ 'nestedBinaryExpressions': false
328
+ }
329
+ ],
330
+ 'stylistic/no-extra-semi': 'warn',
331
+ 'stylistic/no-floating-decimal': 'warn',
332
+ 'stylistic/no-mixed-operators': 'warn',
333
+ 'stylistic/no-mixed-spaces-and-tabs': 'warn',
334
+ 'stylistic/no-multi-spaces': 'warn',
335
+ 'stylistic/no-multiple-empty-lines': 'warn',
336
+ 'stylistic/no-tabs': 'warn',
337
+ 'stylistic/no-trailing-spaces': 'warn',
338
+ 'stylistic/no-whitespace-before-property': 'warn',
339
+ 'stylistic/nonblock-statement-body-position': 'warn',
340
+ 'stylistic/object-curly-newline': 'warn',
341
+ 'stylistic/object-curly-spacing': [
342
+ 'warn',
343
+ 'always'
344
+ ],
345
+ 'stylistic/object-property-newline': 'warn',
346
+ 'stylistic/one-var-declaration-per-line': 'warn',
347
+ 'stylistic/operator-linebreak': 'warn',
348
+ 'stylistic/padded-blocks': [
349
+ 'warn',
350
+ 'never'
351
+ ],
352
+ 'stylistic/padding-line-between-statements': [
353
+ 'warn',
354
+ {
355
+ 'blankLine': 'any',
356
+ 'next': [
357
+ 'const',
358
+ 'let',
359
+ 'var'
360
+ ],
361
+ 'prev': [
362
+ 'const',
363
+ 'let',
364
+ 'var'
365
+ ]
366
+ },
367
+ {
368
+ 'blankLine': 'always',
369
+ 'next': 'iife',
370
+ 'prev': 'iife'
371
+ },
372
+ {
373
+ 'blankLine': 'never',
374
+ 'next': 'import',
375
+ 'prev': 'import'
376
+ },
377
+ {
378
+ 'blankLine': 'always',
379
+ 'next': [
380
+ 'block-like',
381
+ 'break',
382
+ 'class',
383
+ 'const',
384
+ 'do',
385
+ 'expression',
386
+ 'export',
387
+ 'for',
388
+ 'function',
389
+ 'if',
390
+ 'let',
391
+ 'return',
392
+ 'switch',
393
+ 'throw',
394
+ 'try',
395
+ 'var',
396
+ 'while',
397
+ 'with'
398
+ ],
399
+ 'prev': '*'
400
+ },
401
+ {
402
+ 'blankLine': 'never',
403
+ 'next': [
404
+ 'case',
405
+ 'default'
406
+ ],
407
+ 'prev': '*'
408
+ }
409
+ ],
410
+ 'stylistic/quote-props': 'warn',
411
+ 'stylistic/quotes': [
412
+ 'warn',
413
+ 'single'
414
+ ],
415
+ 'stylistic/rest-spread-spacing': 'warn',
416
+ 'stylistic/semi': 'warn',
417
+ 'stylistic/semi-spacing': 'warn',
418
+ 'stylistic/semi-style': 'warn',
419
+ 'stylistic/space-before-blocks': 'warn',
420
+ 'stylistic/space-before-function-paren': [
421
+ 'warn',
422
+ {
423
+ 'anonymous': 'always',
424
+ 'asyncArrow': 'always',
425
+ 'named': 'never'
426
+ }
427
+ ],
428
+ 'stylistic/space-in-parens': 'warn',
429
+ 'stylistic/space-infix-ops': 'warn',
430
+ 'stylistic/space-unary-ops': 'warn',
431
+ 'stylistic/spaced-comment': 'warn',
432
+ 'stylistic/switch-colon-spacing': 'warn',
433
+ 'stylistic/template-curly-spacing': [
434
+ 'warn',
435
+ 'always'
436
+ ],
437
+ 'stylistic/template-tag-spacing': 'warn',
438
+ 'stylistic/wrap-iife': 'warn',
439
+ 'stylistic/wrap-regex': 'warn',
440
+ 'stylistic/yield-star-spacing': 'warn',
441
+ 'symbol-description': 'warn',
442
+ 'unicode-bom': 'warn',
443
+ 'vars-on-top': 'warn',
444
+ 'yoda': 'warn'
445
+ }
446
+ }, {
447
+ 'rules': {
448
+ 'stylistic/lines-around-comment': 'off'
449
+ },
450
+ 'settings': {
451
+ 'stylistic': {
452
+ 'contexts': ['TSInterfaceDeclaration']
453
+ }
454
+ }
455
+ });
@@ -0,0 +1,5 @@
1
+ import type { NextConfig } from 'next';
2
+ /**
3
+ * An object that represents collection of settings to define behavior of Next.js application.
4
+ */
5
+ export declare const nextConfig: NextConfig;
@@ -0,0 +1,4 @@
1
+ export const nextConfig = {
2
+ 'output': 'export',
3
+ 'reactStrictMode': false
4
+ };
package/bin/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { eslintConfig } from './config/baseLintConfig.js';
2
+ export { nextConfig } from './config/baseNextConfig.js';
package/bin/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { eslintConfig } from './config/baseLintConfig.js';
2
+ export { nextConfig } from './config/baseNextConfig.js';
@@ -0,0 +1,105 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+ /* Projects */
5
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
6
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
7
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
8
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
9
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
10
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
11
+ /* Language and Environment */
12
+ "target": "ES2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
13
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
14
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
15
+ // "libReplacement": true, /* Enable lib replacement. */
16
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
17
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
18
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
19
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
20
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
21
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
22
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
23
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
24
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
25
+ /* Modules */
26
+ "module": "NodeNext", /* Specify what module code is generated. */
27
+ // "rootDir": "./", /* Specify the root folder within your source files. */
28
+ "moduleResolution": "NodeNext", /* Specify how TypeScript looks up a file from a given module specifier. */
29
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
30
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
31
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
32
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
33
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
34
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
35
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
36
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
37
+ // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
38
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
39
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
40
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
41
+ "noUncheckedSideEffectImports": true, /* Check side effect imports. */
42
+ // "resolveJsonModule": true, /* Enable importing .json files. */
43
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
44
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
45
+ /* JavaScript Support */
46
+ "allowJs": false, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
47
+ "checkJs": false, /* Enable error reporting in type-checked JavaScript files. */
48
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
49
+ /* Emit */
50
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
51
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
52
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
53
+ "sourceMap": true, /* Create source map files for emitted JavaScript files. */
54
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
55
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
56
+ // "outDir": "./bin", /* Specify an output folder for all emitted files. Would be different for each project and has to be defined after extending this config. */
57
+ "removeComments": true, /* Disable emitting comments. */
58
+ // "noEmit": true, /* Disable emitting files from a compilation. */
59
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
60
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
61
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
62
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
63
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
64
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
65
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
66
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
67
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
68
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
69
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
70
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
71
+ /* Interop Constraints */
72
+ "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
73
+ "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
74
+ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
75
+ // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */
76
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
77
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
78
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
79
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
80
+ /* Type Checking */
81
+ "strict": true, /* Enable all strict type-checking options. */
82
+ "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
83
+ "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
84
+ "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
85
+ "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
86
+ "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
87
+ "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
88
+ "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
89
+ "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
90
+ "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
91
+ "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
92
+ "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
93
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
94
+ "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
95
+ "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
96
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
97
+ "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
98
+ "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
99
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
100
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
101
+ /* Completeness */
102
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
103
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
104
+ }
105
+ }
package/package.json CHANGED
@@ -1,16 +1,55 @@
1
1
  {
2
2
  "name": "@shi-corp/development-utilities",
3
- "version": "0.0.1",
4
- "description": "Place holder for actual package content.",
5
- "homepage": "https://shi.com",
6
- "bugs": {
7
- "url": "https://www.shi.com/us/customerservice/contact-us"
8
- },
9
- "license": "MIT",
10
- "author": "Elliot Huffman",
3
+ "version": "1.0.4",
4
+ "description": "Collection of configurations, settings and packages to be common across multiple products/repositories.",
5
+ "main": "bin/index.js",
11
6
  "type": "module",
12
- "main": "index.js",
13
7
  "scripts": {
14
- "test": "echo \"Error: no test specified\" && exit 1"
8
+ "build:Dev": "tsc",
9
+ "prebuild:Prod": "tsc -p prod.tsconfig.json --emitDeclarationOnly false",
10
+ "build:Prod": "tsc -p prod.tsconfig.json --removeComments false",
11
+ "lint": "eslint --max-warnings 0",
12
+ "test:Unit": "mocha"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/Software-Hardware-Integration-Lab/Development-Utilities"
17
+ },
18
+ "keywords": [
19
+ "ESLint",
20
+ "config",
21
+ "lint",
22
+ "standardization",
23
+ "JSDoc",
24
+ "Stylistic",
25
+ "TypeScript",
26
+ "tsconfig",
27
+ "Next.js config"
28
+ ],
29
+ "author": "Pasha Zayko <pasha_zayko@shi.com>",
30
+ "license": "MIT",
31
+ "bugs": {
32
+ "url": "https://github.com/Software-Hardware-Integration-Lab/Development-Utilities/issues"
33
+ },
34
+ "homepage": "https://github.com/Software-Hardware-Integration-Lab/Development-Utilities#readme",
35
+ "dependencies": {
36
+ "@stylistic/eslint-plugin": "~5.2.3",
37
+ "eslint": "~9.34.0",
38
+ "eslint-plugin-jsdoc": "~54.1.1",
39
+ "typescript-eslint": "~8.40.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/chai": "~5.2.2",
43
+ "@types/eslint": "~9.6.1",
44
+ "@types/mocha": "~10.0.10",
45
+ "chai": "~6.0.1",
46
+ "mocha": "~11.7.1",
47
+ "next": "~15.5.0",
48
+ "typescript": "~5.9.2"
49
+ },
50
+ "mocha": {
51
+ "recursive": true,
52
+ "spec": "bin/test/",
53
+ "color": true
15
54
  }
16
55
  }