@mrpelz/boilerplate-common 12.5.1 → 13.0.1
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/README.md +252 -68
- package/dist/main.d.ts.map +1 -1
- package/eslint.config.js +21 -21
- package/package.json +1 -1
- package/scripts/common-post.sh +2 -1
package/README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
# boilerplate-common
|
|
1
|
+
# `@mrpelz/boilerplate-common`
|
|
2
2
|
|
|
3
|
-
Easily start new TypeScript-based projects using a modular and extensible toolset.
|
|
3
|
+
Easily start new TypeScript-based projects using a modular and extensible toolset.
|
|
4
|
+
This boilerplate tries to provide opinionated defaults for everyday-use while handling common pitfalls for edge-cases. If your edge-case is too special, it won’t prescribe a fixed configuration, always allowing a route to customization without all-or-nothing breakout.
|
|
4
5
|
|
|
5
6
|
## Philosophy
|
|
6
7
|
|
|
7
|
-
###
|
|
8
|
+
### Updatability vs. Customization
|
|
8
9
|
|
|
9
10
|
Boilerplates that want to offer developers a good experience in the long-term have to balance two interests: Updatability and customization.
|
|
10
11
|
|
|
@@ -12,30 +13,74 @@ Customization is necessary so that the boilerplate can cover as little edge case
|
|
|
12
13
|
|
|
13
14
|
Updatability ensures that the boilerplate can reflect changing best practices over time, even after the initial installation.
|
|
14
15
|
|
|
16
|
+
### The Problem with Configuration Templates
|
|
17
|
+
|
|
15
18
|
Boilerplates that define configuration files via a template system can offer a streamlined initial installation thanks to the standardized production of all project files.
|
|
16
|
-
However, if a developer modifies one of the produced files after the installation (e.g. to handle a very special project setup), the boilerplate’s next update will either overwrite this
|
|
19
|
+
However, if a developer modifies one of the produced files after the installation (e.g. to handle a very special project setup), the boilerplate’s next update will either overwrite this per-project customization or not update the affected file at all, possibly creating breaking changes in conjunction with other updated configuration files.
|
|
20
|
+
|
|
21
|
+
### How to Facilitate Customization/Abandoning Updates After Initial Install
|
|
22
|
+
|
|
23
|
+
Keeping production of configuration files confined to a template system, this “customization and update problem” can only be solved by either abstracting the tooling to such an extent that customizations also need to happen within the abstraction (thus creating user lock-in and mental overhead translating and maintaining the customizations), or at the other extreme, by only setting up a new project environment at the time of initial install, leaving developers to their own devices for subsequent updates and requiring them to replicate changes to the boilerplate on their own.
|
|
17
24
|
|
|
18
|
-
|
|
25
|
+
### No Configuration Templates
|
|
19
26
|
|
|
20
|
-
Instead of using a template system for all config files, this boilerplate uses the extension mechanism provided by the given tool, provides its default configurations as artifacts within the NPM package and generates skeleton configs importing (or otherwise referencing) these artifacts. For non-extensible files it creates symlinks with proper path-handling.
|
|
27
|
+
Instead of using a template system for all config files, this boilerplate uses the extension mechanism provided by the given tool, provides its default configurations as artifacts within the NPM package and generates skeleton configs importing (or otherwise referencing) these artifacts. For non-extensible files it creates symlinks with proper relative path-handling.
|
|
21
28
|
|
|
22
29
|
For configurations handled through skeleton files, customization is easily done by recomposing configuration options with the always updated defaults referenced from the package.
|
|
23
30
|
|
|
24
|
-
For the very few symlinked configs, the user can choose to stick with the updated default or move to a fully-custom file maintained at the project’s discretion.
|
|
31
|
+
For the very few symlinked configs, the user can choose to stick with the updated default or move to a fully-custom file maintained at the project’s discretion. (Re)running a bootstrap script allows for easy restore of previously customized files, if a project withes to return to a tool’s provided default config.
|
|
32
|
+
|
|
33
|
+
## NPM-Package
|
|
34
|
+
|
|
35
|
+
Provides the configuration basis for the other boilerplate packages. Use it for projects that produce library code not strictly meant to run browser- or server-side.
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* TypeScript-config to output native ESM-modules
|
|
40
|
+
* produce sourcemaps
|
|
41
|
+
* lint and typecheck sourcecode with amendable defaults using ESLint
|
|
42
|
+
* lint and typecheck configurations defined as code (e.g. `eslint.config.js`)
|
|
43
|
+
* run unit tests using a TypeScript- and ESM-compatible basic Jest setup
|
|
44
|
+
* enforce commit message formatting using Commitlint
|
|
45
|
+
* enforce package.json matching repository attributes, e.g. name, version, repository fields, key sorting
|
|
46
|
+
* .editorconfig to match other tools’ settings
|
|
47
|
+
* VSCode project-settings and -extension suggestions to match tooling
|
|
48
|
+
* lint Bash-scripts using Shellcheck
|
|
49
|
+
* derive package versions from git tags and automatically handle prerelease-versioning in a feature-branch workflow
|
|
50
|
+
* Tmux niceties to help keep watch on all lint/check tasks during development
|
|
51
|
+
* GitLab-CI pipelines
|
|
52
|
+
* to run relevant checks on every change pushed to a merge request
|
|
53
|
+
* manually trigger (pre-)release tagging after checks complete
|
|
54
|
+
(no guessing breaking-changes from commit messages, press the appropriate play-button for pre-, patch-, minor- or major-release tagging after check-pipeline completes)
|
|
55
|
+
* produce NPM-packages on release and publish to GitLab package-registry
|
|
56
|
+
* comment prerelease-info to merge requests
|
|
25
57
|
|
|
26
58
|
## Usage
|
|
27
59
|
|
|
28
60
|
> **ℹ️ Opinion**
|
|
29
|
-
>This Readme
|
|
61
|
+
> This Readme provides examples for `npm`.
|
|
30
62
|
>
|
|
31
63
|
> The supporting scripts all use `npm` internally.
|
|
32
|
-
Feel free to change them in your project to use `yarn` or something else, but as long as you want to use this boilerplate as-is, stick to `npm`.
|
|
64
|
+
Feel free to change them in your project to use `yarn`, `pnpm` or something else, but as long as you want to use this boilerplate as-is, stick to `npm`.
|
|
33
65
|
|
|
34
66
|
### Prerequisites
|
|
35
67
|
|
|
36
68
|
* `node` and `npm` installed
|
|
37
69
|
* (optionally) `git` installed and set up
|
|
38
|
-
* (GNU) `make`, `sed`, `tmux` and `xargs` installed
|
|
70
|
+
* (GNU!) `make`, `sed`, `tmux` and `xargs` installed
|
|
71
|
+
> This boilerplate uses `make` for task orchestration. In order to compose Makefiles from NPM-dependency artifacts, **GNU**-Make is a strict necessity.
|
|
72
|
+
>
|
|
73
|
+
> In order to compose Makefiles from NPM-dependency artifacts, *GNU*-Make is a strict necessity. If you’re using macOS, install using `brew install make` and amend your `$PATH` to use GNU-Make by default (e.g. by putting
|
|
74
|
+
> ```bash
|
|
75
|
+
> PATH="$HOMEBREW_PREFIX/opt/make/libexec/gnubin:$PATH"
|
|
76
|
+
> ```
|
|
77
|
+
> to your `.zshrc`).
|
|
78
|
+
* (GNU!) `ln` installed
|
|
79
|
+
> Some config files cannot be natively extended and need to be symlinked to the boilerplate’s default. This ensures new defaults apply when the boilerplate is updated. In order to keep the project root portable across different developers’ environments, symlinks need to use relative paths, which unfortunately is only a feature in the `ln` utility from GNU-Coreutils. If you’re using macOS, install using `brew install coreutils` and amend your `$PATH` to use GNU-Coreutils by default (e.g. by putting
|
|
80
|
+
> ```bash
|
|
81
|
+
> PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
|
|
82
|
+
> ```
|
|
83
|
+
> to your `.zshrc`).
|
|
39
84
|
|
|
40
85
|
### 1. Optionally Create Environment First
|
|
41
86
|
|
|
@@ -81,22 +126,18 @@ Whenever you are prompted, you can just hit enter to select the capitalized defa
|
|
|
81
126
|
Prompts for creating a symlink look like this:
|
|
82
127
|
|
|
83
128
|
```bash
|
|
84
|
-
[SYMBOLIC LINK] "
|
|
85
|
-
❓ 🔗 add symbolic link "
|
|
129
|
+
[SYMBOLIC LINK] "<file name>"
|
|
130
|
+
❓ 🔗 add symbolic link "<file name>" (pointing to target "<target>") to "<directory>" in "<project root>"?
|
|
86
131
|
❔ [Y/n]
|
|
87
132
|
```
|
|
88
133
|
|
|
89
134
|
Prompts for creating config files look like this:
|
|
90
135
|
|
|
91
136
|
```bash
|
|
92
|
-
[CONFIG FILE] "
|
|
137
|
+
[CONFIG FILE] "<file name>"
|
|
93
138
|
🆕 new file contents:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/** @type {import('eslint').Linter.Config[]} */
|
|
98
|
-
export default config;
|
|
99
|
-
❓ 📄 add config file "eslint.config.js" to "." in "/home/mrpelz/work/misc/new-project"?
|
|
139
|
+
<file contents>
|
|
140
|
+
❓ 📄 add config file "<file name>" to "<directory>" in "<project root>"?
|
|
100
141
|
❔ [Y/n]
|
|
101
142
|
```
|
|
102
143
|
|
|
@@ -107,24 +148,22 @@ export default config;
|
|
|
107
148
|
```bash
|
|
108
149
|
npm exec boilerplate-bootstrap y
|
|
109
150
|
```
|
|
110
|
-
### 4. Create Entry-Point Source File
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
touch src/main.ts
|
|
114
|
-
```
|
|
115
151
|
|
|
116
152
|
## Scripts
|
|
117
153
|
|
|
118
|
-
> **ℹ️ Opinion**
|
|
119
|
-
>
|
|
120
|
-
>
|
|
154
|
+
> **ℹ️ Opinion**
|
|
155
|
+
>
|
|
156
|
+
> This boilerplate uses `make` for task orchestration instead of stringing together multiple NPM scripts.
|
|
157
|
+
> Make is exactly designed for this purpose while NPM scripts are hard to compose, reuse and are just a byproduct of custom package-lifecycle hook scripts.
|
|
158
|
+
|
|
159
|
+
### Calling a make target:
|
|
121
160
|
|
|
122
|
-
Calling a make target:
|
|
123
161
|
```bash
|
|
124
162
|
make <target>
|
|
125
163
|
```
|
|
126
164
|
|
|
127
|
-
> **ℹ️ Good to know**
|
|
165
|
+
> **ℹ️ Good to know**
|
|
166
|
+
>
|
|
128
167
|
> In order to get autocompletion working in ZSH, add
|
|
129
168
|
> ```bash
|
|
130
169
|
> zstyle ':completion:*:make:*:targets' call-command true
|
|
@@ -132,12 +171,10 @@ make <target>
|
|
|
132
171
|
> ```
|
|
133
172
|
> to your `.zshrc`.
|
|
134
173
|
|
|
135
|
-
> **ℹ️ Good to know
|
|
136
|
-
>
|
|
137
|
-
|
|
138
|
-
> **ℹ️ Good to know III**
|
|
174
|
+
> **ℹ️ Good to know III**
|
|
175
|
+
>
|
|
139
176
|
> The boilerplate tries to handle “monorepos”.
|
|
140
|
-
> For the purpose of this ReadMe, “root package” is the package that contains NPM
|
|
177
|
+
> For the purpose of this ReadMe, “root package” is the package that contains NPM workspace definitions and the packages within those workspaces are called “sub packages”.
|
|
141
178
|
>
|
|
142
179
|
> When running a target from the root package, the target automatically runs for all sub packages/workspaces (`packages`) if that makes sense for the given target.
|
|
143
180
|
> You can change the sub package location by overwriting `SUB_PACKAGE_DIR` in your skeleton Makefile.
|
|
@@ -147,37 +184,184 @@ make <target>
|
|
|
147
184
|
> make check_lint include_sub_packages=false
|
|
148
185
|
> ```
|
|
149
186
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
187
|
+
## Check
|
|
188
|
+
|
|
189
|
+
### `make check`
|
|
190
|
+
|
|
191
|
+
Run all of:
|
|
192
|
+
|
|
193
|
+
* `check_commit`
|
|
194
|
+
* `check_package_json`
|
|
195
|
+
* `check_lint`
|
|
196
|
+
* `check_config`
|
|
197
|
+
* `check_typescript`
|
|
198
|
+
* `check_test`
|
|
199
|
+
|
|
200
|
+
### `make check_commit`
|
|
201
|
+
|
|
202
|
+
Run `commitlint` for the latest commit.
|
|
203
|
+
|
|
204
|
+
### `make check_config`
|
|
205
|
+
|
|
206
|
+
Run `tsc` to typecheck meta-files.
|
|
207
|
+
|
|
208
|
+
> **ℹ️ Good to know II**
|
|
209
|
+
>
|
|
210
|
+
> For the purpose of this ReadMe, “meta-file” means a file that is related to the tooling itself (e.g. configuring ESLint) and is not part of the application’s source code.
|
|
211
|
+
|
|
212
|
+
### `make check_lint`
|
|
213
|
+
|
|
214
|
+
Run `eslint` to lint both sourcecode and meta-files.
|
|
215
|
+
|
|
216
|
+
### `make check_package_json`
|
|
217
|
+
|
|
218
|
+
Run all of:
|
|
219
|
+
|
|
220
|
+
* `util_get_package_json`
|
|
221
|
+
* `check_package_json_sort`
|
|
222
|
+
* `check_package_json_repository`
|
|
223
|
+
* `check_package_json_name`
|
|
224
|
+
* `check_package_json_version`
|
|
225
|
+
|
|
226
|
+
### `make check_package_json_name`
|
|
227
|
+
|
|
228
|
+
If package is linked to a Git repository and isn’t a sub-package, check if the `package.json` name matches the repository name.
|
|
229
|
+
|
|
230
|
+
### `make check_package_json_repository`
|
|
231
|
+
|
|
232
|
+
If package is linked to a Git repository, check if the `package.json` repository fields contain the correct type, point to the correct repository and, if the package is a sub-package, point towards the correct sub-directory within the repository.
|
|
233
|
+
|
|
234
|
+
### `make check_package_json_sort`
|
|
235
|
+
|
|
236
|
+
Run `sort-package-json` to check for proper key sorting in `package.json`.
|
|
237
|
+
|
|
238
|
+
### `make check_package_json_version`
|
|
239
|
+
|
|
240
|
+
If package is linked to a Git repository, check if the `package.json` version matches the latest release version derived from Git tags.
|
|
241
|
+
|
|
242
|
+
### `make check_test`
|
|
243
|
+
|
|
244
|
+
Run unit-tests using `jest`.
|
|
245
|
+
|
|
246
|
+
### `make check_typescript`
|
|
247
|
+
|
|
248
|
+
Run `tsc` to typecheck sourcecode.
|
|
249
|
+
|
|
250
|
+
## Transform
|
|
251
|
+
|
|
252
|
+
### `make transform`
|
|
253
|
+
|
|
254
|
+
Run all of:
|
|
255
|
+
|
|
256
|
+
* `transform_package_json`
|
|
257
|
+
* `transform_lint`
|
|
258
|
+
* `transform_build`
|
|
259
|
+
|
|
260
|
+
### `make transform_build`
|
|
261
|
+
|
|
262
|
+
Run `tsc` to build sourcecode (excluding test-files).
|
|
263
|
+
|
|
264
|
+
### `make transform_lint`
|
|
265
|
+
|
|
266
|
+
Run `eslint` to fix lint-errors in both sourcecode and meta-files.
|
|
267
|
+
|
|
268
|
+
### `make transform_package_json`
|
|
269
|
+
|
|
270
|
+
Run all of:
|
|
271
|
+
|
|
272
|
+
* `transform_package_json_sort`
|
|
273
|
+
* `transform_package_json_name`
|
|
274
|
+
* `transform_package_json_version`
|
|
275
|
+
* `transform_package_json_fix`
|
|
276
|
+
|
|
277
|
+
### `make transform_package_json_fix`
|
|
278
|
+
|
|
279
|
+
Run `npm pkg fix` to fix common misconfigurations in `package.json`.
|
|
280
|
+
|
|
281
|
+
### `make transform_package_json_name`
|
|
282
|
+
|
|
283
|
+
If not a sub-package, set Git repository name as `package.json` name.
|
|
284
|
+
|
|
285
|
+
### `make transform_package_json_sort`
|
|
286
|
+
|
|
287
|
+
Run `sort-package-json` to apply proper key sorting in `package.json`.
|
|
288
|
+
|
|
289
|
+
### `make transform_package_json_version`
|
|
290
|
+
|
|
291
|
+
Set Git repository version (from tags) as `package.json` version.
|
|
292
|
+
|
|
293
|
+
### `make transform_prod`
|
|
294
|
+
|
|
295
|
+
Run `util_clear` and `transform_build`.
|
|
296
|
+
|
|
297
|
+
## Util
|
|
298
|
+
|
|
299
|
+
### `make util_clear`
|
|
300
|
+
|
|
301
|
+
Clear out `dist` directory.
|
|
302
|
+
|
|
303
|
+
### `make util_edit`
|
|
304
|
+
|
|
305
|
+
Open VSCode for root- and sub-packages.
|
|
306
|
+
|
|
307
|
+
### `make util_get_package_json`
|
|
308
|
+
|
|
309
|
+
Output `package.json` to stdout.
|
|
310
|
+
|
|
311
|
+
### `make util_get_package_spec`
|
|
312
|
+
|
|
313
|
+
Output root- or sub-package spec (i.e. namespace + package name + version) to stdout.
|
|
314
|
+
|
|
315
|
+
### `make util_get_package_spec_inner`
|
|
316
|
+
|
|
317
|
+
Output package spec (i.e. namespace + package name + version) to stdout.
|
|
318
|
+
|
|
319
|
+
### `make util_get_next_prerelease_version <prerelease-tag>`
|
|
320
|
+
|
|
321
|
+
Check Git tags for `<prerelease-tag>` and output appropriate sequential semver-prerelease version to stdout.
|
|
322
|
+
|
|
323
|
+
### `make util_get_version`
|
|
324
|
+
|
|
325
|
+
Output `package.json` version to stdout.
|
|
326
|
+
|
|
327
|
+
### `make util_install_git_hooks`
|
|
328
|
+
|
|
329
|
+
Run `husky` to (re)install Git-hooks.
|
|
330
|
+
|
|
331
|
+
## Watch
|
|
332
|
+
|
|
333
|
+
### `make watch`
|
|
334
|
+
|
|
335
|
+
Use Tmux to show multi-panel view for:
|
|
336
|
+
|
|
337
|
+
* `watch_lint`
|
|
338
|
+
* `watch_test`
|
|
339
|
+
* `watch_build`
|
|
340
|
+
* `watch_config`
|
|
341
|
+
|
|
342
|
+
### `make watch_build`
|
|
343
|
+
|
|
344
|
+
Run `tsc` to build sourcecode (excluding test-files) with `--watch`-option.
|
|
345
|
+
|
|
346
|
+
### `make watch_config`
|
|
347
|
+
|
|
348
|
+
Run `tsc` to typecheck meta-files with `--watch`-option.
|
|
349
|
+
|
|
350
|
+
### `make watch_dev`
|
|
351
|
+
|
|
352
|
+
Use Tmux to show multi-panel view for:
|
|
353
|
+
|
|
354
|
+
* `watch_lint`
|
|
355
|
+
* `watch_test`
|
|
356
|
+
* `watch_build`
|
|
357
|
+
* `watch_config`
|
|
358
|
+
|
|
359
|
+
…and provide “work-area” shell at the bottom.
|
|
360
|
+
|
|
361
|
+
### `make watch_lint`
|
|
362
|
+
|
|
363
|
+
Run `eslint` with `nodemon` to (re)lint both sourcecode and meta-files on file change.
|
|
364
|
+
|
|
365
|
+
### `make watch_test`
|
|
366
|
+
|
|
367
|
+
Run unit-tests using `jest` with `--watch`-option.
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAAe,CAAC"}
|
package/eslint.config.js
CHANGED
|
@@ -3,8 +3,8 @@ import stylisticTs from '@stylistic/eslint-plugin-ts';
|
|
|
3
3
|
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
import typescriptParser from '@typescript-eslint/parser';
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
import importPlugin from 'eslint-plugin-import';
|
|
6
|
+
// // @ts-ignore
|
|
7
|
+
// import importPlugin from 'eslint-plugin-import';
|
|
8
8
|
import prettierPlugin from 'eslint-plugin-prettier';
|
|
9
9
|
// @ts-ignore
|
|
10
10
|
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
|
|
@@ -227,22 +227,22 @@ export const rules = {
|
|
|
227
227
|
'handle-callback-err': 'error',
|
|
228
228
|
'id-blacklist': 'error',
|
|
229
229
|
'id-match': 'error',
|
|
230
|
-
'import/extensions': [
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
],
|
|
242
|
-
'import/no-commonjs': 'error',
|
|
243
|
-
'import/no-duplicates': 'error',
|
|
244
|
-
'import/no-named-as-default': 'warn',
|
|
245
|
-
'import/no-named-as-default-member': 'warn',
|
|
230
|
+
// 'import/extensions': [
|
|
231
|
+
// 'error',
|
|
232
|
+
// 'ignorePackages',
|
|
233
|
+
// {
|
|
234
|
+
// cjs: 'never',
|
|
235
|
+
// js: 'always',
|
|
236
|
+
// jsx: 'never',
|
|
237
|
+
// mjs: 'never',
|
|
238
|
+
// ts: 'never',
|
|
239
|
+
// tsx: 'never',
|
|
240
|
+
// },
|
|
241
|
+
// ],
|
|
242
|
+
// 'import/no-commonjs': 'error',
|
|
243
|
+
// 'import/no-duplicates': 'error',
|
|
244
|
+
// 'import/no-named-as-default': 'warn',
|
|
245
|
+
// 'import/no-named-as-default-member': 'warn',
|
|
246
246
|
'jsx-quotes': 'error',
|
|
247
247
|
'key-spacing': 'error',
|
|
248
248
|
'keyword-spacing': [
|
|
@@ -458,7 +458,7 @@ export const plugins = {
|
|
|
458
458
|
'@stylistic/ts': stylisticTs,
|
|
459
459
|
// @ts-ignore
|
|
460
460
|
'@typescript-eslint': typescriptPlugin,
|
|
461
|
-
import: importPlugin,
|
|
461
|
+
// import: importPlugin,
|
|
462
462
|
prettier: prettierPlugin,
|
|
463
463
|
'simple-import-sort': simpleImportSortPlugin,
|
|
464
464
|
unicorn: { rules: pluginUnicorn.rules },
|
|
@@ -481,8 +481,8 @@ export const configMeta = {
|
|
|
481
481
|
...rules,
|
|
482
482
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
483
483
|
'@typescript-eslint/naming-convention': 'off',
|
|
484
|
-
'import/no-named-as-default': 'off',
|
|
485
|
-
'import/no-named-as-default-member': 'off',
|
|
484
|
+
// 'import/no-named-as-default': 'off',
|
|
485
|
+
// 'import/no-named-as-default-member': 'off',
|
|
486
486
|
'unicorn/prefer-export-from': 'off',
|
|
487
487
|
},
|
|
488
488
|
settings: {
|
package/package.json
CHANGED
package/scripts/common-post.sh
CHANGED
|
@@ -24,8 +24,9 @@ if check_response "🕳 run npm install?" y; then
|
|
|
24
24
|
npm install
|
|
25
25
|
fi
|
|
26
26
|
|
|
27
|
-
if check_response "📂 create \"src\" directory (this will *not* overwrite/empty out existing directories)?" y; then
|
|
27
|
+
if check_response "📂 create \"src\" directory and main entry-file (this will *not* overwrite/empty out existing directories/files)?" y; then
|
|
28
28
|
mkdir -p src
|
|
29
|
+
touch "src/main.ts"
|
|
29
30
|
fi
|
|
30
31
|
|
|
31
32
|
if check_response "📂 create \"dist\" directory (this will *not* overwrite/empty out existing directories)?" y; then
|