@brnshkr/config 0.0.1-alpha.9 → 0.0.1-beta.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 CHANGED
@@ -18,7 +18,7 @@ _[☄️ Bug Reports / Feature Requests »][issues-url]_
18
18
  <!-- omit in toc -->
19
19
  ## Table of Contents
20
20
 
21
- <!-- NOTICE: All anchors must not include the emoji to work on github, the ❤️ and ⚙️ for some reason must be url encoded though -->
21
+ <!-- NOTICE: GitHub strips emojis in anchors, but multi-codepoint characters may leave invisible remnants, causing anchors to differ and require URL encoding. -->
22
22
  - [👋 About the Project](#-about-the-project)
23
23
  - [☕ JS](#-js)
24
24
  - [🧰 Prerequisites](#-prerequisites)
@@ -58,7 +58,7 @@ _[☄️ Bug Reports / Feature Requests »][issues-url]_
58
58
 
59
59
  ### 🧰 Prerequisites
60
60
 
61
- - Node.js >= v24 or Bun >= 1.3 (Older versions may work, but are untested)
61
+ - Node.js >= v24 or Bun >= v1.3 (Older versions may work, but are untested)
62
62
  - Any JavaScript package manager (Bun, Yarn, PNPM, NPM)
63
63
 
64
64
  <p align="right"><a href="#top" title="Back to top">&nbsp;&nbsp;&nbsp;⬆&nbsp;&nbsp;&nbsp;</a></p>
@@ -69,28 +69,28 @@ _[☄️ Bug Reports / Feature Requests »][issues-url]_
69
69
  #### Bun
70
70
 
71
71
  ```sh
72
- bun a -D @brnshkr/config
72
+ bun a -D -E @brnshkr/config
73
73
  ```
74
74
 
75
75
  <!-- omit in toc -->
76
76
  #### Yarn
77
77
 
78
78
  ```sh
79
- yarn add -D @brnshkr/config
79
+ yarn add -D -E @brnshkr/config
80
80
  ```
81
81
 
82
82
  <!-- omit in toc -->
83
83
  #### PNPM
84
84
 
85
85
  ```sh
86
- pnpm add -D @brnshkr/config
86
+ pnpm add -D -E @brnshkr/config
87
87
  ```
88
88
 
89
89
  <!-- omit in toc -->
90
90
  #### NPM
91
91
 
92
92
  ```sh
93
- npm i -D @brnshkr/config
93
+ npm i -D -E @brnshkr/config
94
94
  ```
95
95
 
96
96
  This repository currently only provides one way to integrate configuration files (An automatic setup is planned, See [🔨 TODOs / Roadmap](#-todos--roadmap)):
@@ -313,8 +313,9 @@ You can then copy the specific configs to your project:
313
313
  ##### PHP CS Fixer
314
314
 
315
315
  ```sh
316
- cp -v ./vendor/brnshkr/config/conf/.php-cs-fixer.php.example ./conf/.php-cs-fixer.php \
317
- && cp -v ./vendor/brnshkr/config/conf/.php-cs-fixer.dist.php.example ./conf/.php-cs-fixer.dist.php
316
+ cp -v ./vendor/brnshkr/config/conf/php-cs-fixer.php.example ./conf/php-cs-fixer.php \
317
+ && cp -v ./vendor/brnshkr/config/conf/php-cs-fixer.php.example ./conf/php-cs-fixer.php.example \
318
+ && cp -v ./vendor/brnshkr/config/conf/php-cs-fixer.dist.php.example ./conf/php-cs-fixer.dist.php
318
319
  ```
319
320
 
320
321
  <!-- omit in toc -->
@@ -322,6 +323,7 @@ cp -v ./vendor/brnshkr/config/conf/.php-cs-fixer.php.example ./conf/.php-cs-fixe
322
323
 
323
324
  ```sh
324
325
  cp -v ./vendor/brnshkr/config/conf/rector.php.example ./conf/rector.php \
326
+ && cp -v ./vendor/brnshkr/config/conf/rector.php.example ./conf/rector.php.example \
325
327
  && cp -v ./vendor/brnshkr/config/conf/rector.dist.php.example ./conf/rector.dist.php
326
328
  ```
327
329
 
@@ -329,8 +331,9 @@ cp -v ./vendor/brnshkr/config/conf/rector.php.example ./conf/rector.php \
329
331
  ##### PHPStan
330
332
 
331
333
  ```sh
332
- cp -v ./vendor/brnshkr/config/conf/phpstan.neon.example ./conf/phpstan.neon \
333
- && cp -v ./vendor/brnshkr/config/conf/phpstan.dist.neon.example ./conf/phpstan.dist.neon
334
+ cp -v ./vendor/brnshkr/config/conf/phpstan.php.example ./conf/phpstan.php \
335
+ && cp -v ./vendor/brnshkr/config/conf/phpstan.php.example ./conf/phpstan.php.example \
336
+ && cp -v ./vendor/brnshkr/config/conf/phpstan.dist.php.example ./conf/phpstan.dist.php
334
337
  ```
335
338
 
336
339
  <!-- omit in toc -->
@@ -351,12 +354,15 @@ cp -v ./vendor/brnshkr/config/conf/.gitignore.example ./.gitignore
351
354
  ##### All
352
355
 
353
356
  ```sh
354
- cp -v ./vendor/brnshkr/config/conf/.php-cs-fixer.php.example ./conf/.php-cs-fixer.php \
355
- && cp -v ./vendor/brnshkr/config/conf/.php-cs-fixer.dist.php.example ./conf/.php-cs-fixer.dist.php \
357
+ cp -v ./vendor/brnshkr/config/conf/php-cs-fixer.php.example ./conf/php-cs-fixer.php \
358
+ && cp -v ./vendor/brnshkr/config/conf/php-cs-fixer.php.example ./conf/php-cs-fixer.php.example \
359
+ && cp -v ./vendor/brnshkr/config/conf/php-cs-fixer.dist.php.example ./conf/php-cs-fixer.dist.php \
356
360
  && cp -v ./vendor/brnshkr/config/conf/rector.php.example ./conf/rector.php \
361
+ && cp -v ./vendor/brnshkr/config/conf/rector.php.example ./conf/rector.php.example \
357
362
  && cp -v ./vendor/brnshkr/config/conf/rector.dist.php.example ./conf/rector.dist.php \
358
- && cp -v ./vendor/brnshkr/config/conf/phpstan.neon.example ./conf/phpstan.neon \
359
- && cp -v ./vendor/brnshkr/config/conf/phpstan.dist.neon.example ./conf/phpstan.dist.neon \
363
+ && cp -v ./vendor/brnshkr/config/conf/phpstan.php.example ./conf/phpstan.php \
364
+ && cp -v ./vendor/brnshkr/config/conf/phpstan.php.example ./conf/phpstan.php.example \
365
+ && cp -v ./vendor/brnshkr/config/conf/phpstan.dist.php.example ./conf/phpstan.dist.php \
360
366
  && cp -v ./vendor/brnshkr/config/conf/Makefile.example ./Makefile \
361
367
  && cp -v ./vendor/brnshkr/config/conf/.gitignore.example ./.gitignore
362
368
  ```
@@ -371,42 +377,45 @@ Take a look at the function signatures for exact details.
371
377
  ##### PHP CS Fixer
372
378
 
373
379
  ```php
374
- // ./.php-cs-fixer.dist.php
380
+ // ./php-cs-fixer.dist.php
375
381
 
376
382
  <?php
377
383
 
378
384
  declare(strict_types=1);
379
385
 
380
- use Brnshkr\Config\PhpCsFixerConfig;
386
+ use Brnshkr\Config\PhpCsFixer;
381
387
 
382
- return PhpCsFixerConfig::get(/* customize */);
388
+ return PhpCsFixer::getConfig(/* customize */);
383
389
  ```
384
390
 
385
391
  <!-- omit in toc -->
386
392
  ##### Rector
387
393
 
388
394
  ```php
389
- // ./rector.php
395
+ // ./rector.dist.php
390
396
 
391
397
  <?php
392
398
 
393
399
  declare(strict_types=1);
394
400
 
395
- use Brnshkr\Config\RectorConfig;
401
+ use Brnshkr\Config\Rector;
396
402
 
397
- return RectorConfig::get(/* customize */);
403
+ return Rector::getConfig(/* customize */);
398
404
  ```
399
405
 
400
406
  <!-- omit in toc -->
401
407
  ##### PHPStan
402
408
 
403
- ```yaml
404
- # phpstan.dist.neon
409
+ ```php
410
+ // ./phpstan.dist.php
411
+
412
+ <?php
413
+
414
+ declare(strict_types=1);
405
415
 
406
- includes:
407
- - '%currentWorkingDirectory%/vendor/brnshkr/config/conf/phpstan.dist.neon'
416
+ use Brnshkr\Config\PhpStan;
408
417
 
409
- # customize
418
+ return PhpStan::getConfig(/* customize */);
410
419
  ```
411
420
 
412
421
  <p align="right"><a href="#top" title="Back to top">&nbsp;&nbsp;&nbsp;⬆&nbsp;&nbsp;&nbsp;</a></p>
@@ -428,7 +437,7 @@ A few possible ways are listed below:
428
437
  Example call, adjust as needed
429
438
 
430
439
  ```sh
431
- php ./vendor/bin/php-cs-fixer fix -v --show-progress=dots --config ./conf/.php-cs-fixer.php
440
+ php ./vendor/bin/php-cs-fixer fix --config ./conf/php-cs-fixer.php -v --show-progress=dots
432
441
  ```
433
442
 
434
443
  <!-- omit in toc -->
@@ -437,7 +446,7 @@ php ./vendor/bin/php-cs-fixer fix -v --show-progress=dots --config ./conf/.php-c
437
446
  Example call, adjust as needed
438
447
 
439
448
  ```sh
440
- php ./vendor/bin/rector process --config ./conf/rector.php
449
+ php ./vendor/bin/rector process --config ./conf/rector.php --memory-limit=-1
441
450
  ```
442
451
 
443
452
  <!-- omit in toc -->
@@ -446,7 +455,7 @@ php ./vendor/bin/rector process --config ./conf/rector.php
446
455
  Example call, adjust as needed
447
456
 
448
457
  ```sh
449
- php ./vendor/bin/phpstan analyze --memory-limit=-1 --configuration ./conf/phpstan.neon
458
+ php ./vendor/bin/phpstan analyze --configuration ./conf/phpstan.php -vv --memory-limit=-1
450
459
  ```
451
460
 
452
461
  <!-- omit in toc -->
@@ -463,7 +472,7 @@ include ./vendor/brnshkr/config/conf/Makefile
463
472
  <!-- omit in toc -->
464
473
  ###### PHP CS Fixer
465
474
 
466
- Expected configuration file: `./conf/.php-cs-fixer.php`
475
+ Expected configuration file: `./conf/php-cs-fixer.php`
467
476
 
468
477
  ```sh
469
478
  make php-cs-fixer
@@ -481,7 +490,7 @@ make rector
481
490
  <!-- omit in toc -->
482
491
  ###### PHPStan
483
492
 
484
- Expected configuration file: `./conf/phpstan.neon`
493
+ Expected configuration file: `./conf/phpstan.php`
485
494
 
486
495
  ```sh
487
496
  make phpstan
@@ -517,9 +526,9 @@ Install dependencies and setup project tooling with the following commands and a
517
526
 
518
527
  ```sh
519
528
  composer install \
520
- && cp -v ./conf/.php-cs-fixer.php.example ./conf/.php-cs-fixer.php \
529
+ && cp -v ./conf/php-cs-fixer.php.example ./conf/php-cs-fixer.php \
521
530
  && cp -v ./conf/rector.php.example ./conf/rector.php \
522
- && cp -v ./conf/phpstan.neon.example ./conf/phpstan.neon
531
+ && cp -v ./conf/phpstan.php.example ./conf/phpstan.php
523
532
  ```
524
533
 
525
534
  <!-- omit in toc -->
@@ -659,6 +668,6 @@ Distributed under the MIT License. See [LICENSE](./LICENSE) for more information
659
668
  [issues-url]: https://github.com/brnshkr/config/issues
660
669
  [issues-shield-url]: https://img.shields.io/github/issues/brnshkr/config.svg?label=🚨%20issues&style=flat-square&labelColor=%237f399d&color=%23a5097e
661
670
 
662
- <!-- NOTICE: Only use npm version here since both packages are versioned in sync -->
671
+ <!-- NOTICE: Only use packagist version here since both packages are versioned in sync -->
663
672
  [release-url]: https://github.com/brnshkr/config/releases
664
- [release-shield-url]: https://img.shields.io/npm/v/%40brnshkr%2Fconfig?label=📦%20npm%2Fpackagist&style=flat-square&labelColor=%237f399d&color=%23a5097e
673
+ [release-shield-url]: https://img.shields.io/packagist/v/brnshkr/config?style=flat-square&label=📦%20npm%2Fpackagist&labelColor=7f399d&color=%23a5097e
@@ -32,16 +32,14 @@
32
32
  ],
33
33
  "compilerOptions": {
34
34
  // Language and Environment
35
- "lib": ["ESNext", "DOM", "DOM.Iterable"],
35
+ "lib": ["ESNext", "DOM"],
36
36
  "moduleDetection": "force",
37
- "target": "esnext",
38
37
 
39
38
  // Modules
40
39
  "allowImportingTsExtensions": true,
41
- "module": "esnext",
42
40
  "moduleResolution": "bundler",
43
- "noUncheckedSideEffectImports": true,
44
41
  "resolveJsonModule": true,
42
+ "types": ["bun"],
45
43
 
46
44
  // Emit
47
45
  "noEmit": true,
@@ -55,7 +53,6 @@
55
53
  "checkJs": true,
56
54
 
57
55
  // Interop Constraints
58
- "esModuleInterop": true,
59
56
  "forceConsistentCasingInFileNames": true,
60
57
  "verbatimModuleSyntax": true,
61
58
 
@@ -68,7 +65,6 @@
68
65
  "noPropertyAccessFromIndexSignature": true,
69
66
  "noUncheckedIndexedAccess": true,
70
67
  "noUnusedLocals": true,
71
- "noUnusedParameters": true,
72
- "strict": true
68
+ "noUnusedParameters": true
73
69
  }
74
70
  }