@adbayb/stack 0.0.0-next-c59d48f → 0.0.0-next-2add8bc

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.
@@ -69,6 +69,7 @@ export default tseslint.config(
69
69
  rules: {
70
70
  //#region eslint
71
71
  "constructor-super": "error",
72
+ eqeqeq: "error",
72
73
  "for-direction": "error",
73
74
  "getter-return": "error",
74
75
  "no-alert": "error",
@@ -107,6 +108,14 @@ export default tseslint.config(
107
108
  "no-prototype-builtins": "error",
108
109
  "no-redeclare": "error",
109
110
  "no-regex-spaces": "error",
111
+ "no-restricted-syntax": [
112
+ "error",
113
+ {
114
+ // https://medium.com/@hbarcelos/why-i-banned-null-from-my-js-code-and-why-you-should-too-13df90323cfa
115
+ selector: "Literal[raw='null']",
116
+ message: "Use undefined instead of null",
117
+ },
118
+ ],
110
119
  "no-self-assign": "error",
111
120
  "no-setter-return": "error",
112
121
  "no-shadow-restricted-names": "error",
@@ -270,7 +279,11 @@ export default tseslint.config(
270
279
  "TSMethodSignature",
271
280
  "TSPropertySignature",
272
281
  ],
273
- publicOnly: true,
282
+ publicOnly: {
283
+ ancestorsOnly: true,
284
+ esm: true,
285
+ cjs: true,
286
+ },
274
287
  require: {
275
288
  ArrowFunctionExpression: true,
276
289
  ClassDeclaration: true,
@@ -437,28 +450,17 @@ export default tseslint.config(
437
450
  "sonarjs/no-self-import": "error",
438
451
  "sonarjs/no-small-switch": "error",
439
452
  "sonarjs/no-table-as-layout": "error",
440
- // Breakpoint start from no-reference-error (https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md)
441
- // Remove redundant rules with TS + import + ESLint
442
- "sonarjs/no-try-promise": "error",
443
453
  "sonarjs/no-undefined-argument": "error",
444
454
  "sonarjs/no-unenclosed-multiline-block": "error",
445
455
  "sonarjs/no-uniq-key": "error",
446
- "sonarjs/no-unknown-property": "error",
447
- "sonarjs/no-unreachable": "error",
448
456
  "sonarjs/no-unsafe-unzip": "error",
449
457
  "sonarjs/no-unstable-nested-components": "error",
450
458
  "sonarjs/no-unthrown-error": "error",
451
459
  "sonarjs/no-unused-collection": "error",
452
- "sonarjs/no-unused-expressions": "error",
453
- "sonarjs/no-unused-private-class-members": "error",
454
- "sonarjs/no-use-of-empty-return-value": "error",
455
460
  "sonarjs/no-useless-call": "error",
456
- "sonarjs/no-useless-catch": "error",
457
- "sonarjs/no-useless-constructor": "error",
458
461
  "sonarjs/no-useless-increment": "error",
459
462
  "sonarjs/no-useless-intersection": "error",
460
463
  "sonarjs/no-useless-react-setstate": "error",
461
- "sonarjs/no-var": "error",
462
464
  "sonarjs/no-vue-bypass-sanitization": "error",
463
465
  "sonarjs/no-weak-cipher": "error",
464
466
  "sonarjs/no-weak-keys": "error",
@@ -470,7 +472,9 @@ export default tseslint.config(
470
472
  "sonarjs/prefer-default-last": "error",
471
473
  "sonarjs/prefer-enum-initializers": "error",
472
474
  "sonarjs/prefer-function-type": "error",
475
+ "sonarjs/prefer-immediate-return": "error",
473
476
  "sonarjs/prefer-namespace-keyword": "error",
477
+ "sonarjs/prefer-object-literal": "error",
474
478
  "sonarjs/prefer-object-spread": "error",
475
479
  "sonarjs/prefer-promise-shorthand": "error",
476
480
  "sonarjs/prefer-single-boolean-return": "error",
@@ -483,33 +487,37 @@ export default tseslint.config(
483
487
  "sonarjs/public-static-readonly": "error",
484
488
  "sonarjs/publicly-writable-directories": "error",
485
489
  "sonarjs/reduce-initial-value": "error",
486
- "sonarjs/redundant-type-aliases": "error",
487
- "sonarjs/regex-complexity": "error",
488
490
  "sonarjs/session-regeneration": "error",
489
491
  "sonarjs/single-char-in-character-classes": "error",
490
492
  "sonarjs/single-character-alternation": "error",
491
- "sonarjs/sonar-block-scoped-var": "error",
492
- "sonarjs/sonar-max-params": "error",
493
+ "sonarjs/sonar-jsx-no-leaked-render": "error",
494
+ "sonarjs/sonar-max-lines": ["error", { maximum: 1000 }],
495
+ "sonarjs/sonar-max-lines-per-function": ["error", { maximum: 200 }],
496
+ "sonarjs/sonar-max-params": ["error", { max: 4 }],
493
497
  "sonarjs/sonar-no-control-regex": "error",
494
498
  "sonarjs/sonar-no-empty-character-class": "error",
495
499
  "sonarjs/sonar-no-fallthrough": "error",
496
500
  "sonarjs/sonar-no-invalid-regexp": "error",
501
+ "sonarjs/sonar-no-magic-numbers": "error",
497
502
  "sonarjs/sonar-no-misleading-character-class": "error",
498
503
  "sonarjs/sonar-no-regex-spaces": "error",
504
+ "sonarjs/sonar-no-unused-class-component-methods": "error",
505
+ "sonarjs/sonar-prefer-regexp-exec": "error",
499
506
  "sonarjs/sql-queries": "error",
500
507
  "sonarjs/stable-tests": "error",
501
508
  "sonarjs/stateful-regex": "error",
502
509
  "sonarjs/strict-transport-security": "error",
503
510
  "sonarjs/super-invocation": "error",
504
- "sonarjs/table-header-reference": "error",
511
+ "sonarjs/switch-without-default": "error",
505
512
  "sonarjs/table-header": "error",
513
+ "sonarjs/table-header-reference": "error",
506
514
  "sonarjs/test-check-exception": "error",
507
515
  "sonarjs/todo-tag": "warn",
516
+ "sonarjs/unicode-aware-regex": "error",
508
517
  "sonarjs/unnecessary-character-escapes": "error",
509
518
  "sonarjs/unused-named-groups": "error",
510
519
  "sonarjs/unverified-certificate": "error",
511
520
  "sonarjs/unverified-hostname": "error",
512
- "sonarjs/updated-const-var": "error",
513
521
  "sonarjs/updated-loop-counter": "error",
514
522
  "sonarjs/use-isnan": "error",
515
523
  "sonarjs/use-type-alias": "error",
@@ -691,9 +699,6 @@ export default tseslint.config(
691
699
  { ignoreRestSiblings: true },
692
700
  ],
693
701
  "@typescript-eslint/no-useless-constructor": "error",
694
- "no-unused-expressions": "off",
695
- "no-useless-constructor": "off",
696
- "require-await": "off",
697
702
  //#endregion
698
703
  },
699
704
  },
@@ -853,6 +858,7 @@ export default tseslint.config(
853
858
  ],
854
859
  rules: {
855
860
  "import/no-default-export": "off",
861
+ "sonarjs/sonar-no-magic-numbers": "off",
856
862
  },
857
863
  },
858
864
  eslintPluginPrettierRecommended,
package/dist/index.mjs CHANGED
@@ -327,7 +327,7 @@ const PRESERVE_FILES = [
327
327
  ];
328
328
 
329
329
  var name = "@adbayb/stack";
330
- var version = "0.0.0-next-c59d48f";
330
+ var version = "0.0.0-next-2add8bc";
331
331
  var description = "My opinionated JavaScript-based toolchain";
332
332
  var publishConfig = {
333
333
  access: "public"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adbayb/stack",
3
- "version": "0.0.0-next-c59d48f",
3
+ "version": "0.0.0-next-2add8bc",
4
4
  "description": "My opinionated JavaScript-based toolchain",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -3,12 +3,12 @@
3
3
  "name": "@examples/default",
4
4
  "version": "0.0.0",
5
5
  "scripts": {
6
- "start": "node -r esbuild-register ./src/index.ts"
6
+ "start": "tsx ./src/index.ts"
7
7
  },
8
8
  "dependencies": {
9
9
  "{{projectName}}": "workspace:^"
10
10
  },
11
11
  "devDependencies": {
12
- "esbuild-register": "3.4.2"
12
+ "tsx": "4.19.1"
13
13
  }
14
14
  }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "name": "root",
2
3
  "private": true,
3
4
  "version": "0.0.0",
4
5
  "type": "module",
@@ -18,8 +19,8 @@
18
19
  "prettier": "@adbayb/stack/prettier",
19
20
  "packageManager": "pnpm@{{npmVersion}}",
20
21
  "engines": {
21
- "node": ">=18.0.0",
22
- "pnpm": ">=8.0.0",
22
+ "node": ">=20.0.0",
23
+ "pnpm": ">=9.0.0",
23
24
  "npm": "please-use-pnpm",
24
25
  "yarn": "please-use-pnpm"
25
26
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "extends": "@adbayb/stack/typescript",
3
- "exclude": ["node_modules", "**/dist"]
3
+ "exclude": ["node_modules", "**/node_modules", "**/dist"]
4
4
  }
@@ -10,15 +10,13 @@
10
10
  ],
11
11
  "sideEffects": false,
12
12
  "type": "module",
13
- "source": "./src/index.ts",
14
- "main": "./dist/index.cjs",
15
- "module": "./dist/index.mjs",
16
- "types": "./dist/index.d.ts",
17
13
  "exports": {
18
14
  ".": {
15
+ "source": "./src/index.ts",
16
+ "types": "./dist/index.d.ts",
19
17
  "require": "./dist/index.cjs",
20
18
  "import": "./dist/index.mjs",
21
- "types": "./dist/index.d.ts"
19
+ "default": "./dist/index.mjs"
22
20
  }
23
21
  },
24
22
  "license": "MIT",