@naturalcycles/dev-lib 18.1.4 → 18.2.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.
package/cfg/biome.jsonc CHANGED
@@ -22,7 +22,7 @@
22
22
  "noDelete": "off" // todo
23
23
  },
24
24
  "correctness": {
25
- // "useImportExtensions": "error", // consider for esm later
25
+ "useImportExtensions": "error",
26
26
  "noUnusedFunctionParameters": "error",
27
27
  // noUnusedImports + noUnusedVariables can replace eslint-plugin-unused-vars!
28
28
  "noUnusedImports": "error",
@@ -73,6 +73,9 @@
73
73
  "noUselessThisAlias": "off",
74
74
  "useLiteralKeys": "off",
75
75
  "noBannedTypes": "off"
76
+ },
77
+ "nursery": {
78
+ "noCommonJs": "error"
76
79
  }
77
80
  }
78
81
  },
@@ -185,6 +185,8 @@ export default {
185
185
  'import-x/no-cycle': 2,
186
186
  'import-x/no-useless-path-segments': 2,
187
187
  'import-x/no-default-export': 0, // biome
188
+ // 'import-x/no-commonjs': 2, // biome `noCommonJs`
189
+ // 'import-x/extensions': [2, 'always'], // biome useImportExtensions
188
190
  'jsdoc/check-alignment': 2,
189
191
  // "jsdoc/check-indentation": "error",
190
192
  // 'jsdoc/newline-after-description': 2,
@@ -340,9 +342,10 @@ export default {
340
342
  '@typescript-eslint/prefer-find': 2,
341
343
  'prefer-promise-reject-errors': 0,
342
344
  '@typescript-eslint/prefer-promise-reject-errors': 2,
345
+ 'unicorn/prefer-import-meta-properties': 2,
343
346
  'unicorn/no-array-callback-reference': 0, // false positives
344
347
  'unicorn/no-process-exit': 0,
345
- 'unicorn/no-array-push-push': 0,
348
+ 'unicorn/prefer-single-call': 0,
346
349
  'unicorn/no-abusive-eslint-disable': 0,
347
350
  'unicorn/no-negated-condition': 0,
348
351
  'unicorn/no-array-method-this-argument': 0, // bug: wrongly removes`readable.flatMap` concurrency option
@@ -117,6 +117,7 @@ export const sharedConfig = {
117
117
  '**/*.mock.*',
118
118
  '**/*.page.{ts,tsx}',
119
119
  '**/*.component.{ts,tsx}',
120
+ '**/*.directive.{ts,tsx}',
120
121
  '**/*.modal.{ts,tsx}',
121
122
  ],
122
123
  },
package/dist/paths.js CHANGED
@@ -1,8 +1,5 @@
1
- import { dirname, join } from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
- const __filename = fileURLToPath(import.meta.url);
4
- const __dirname = dirname(__filename);
5
- export const projectDir = join(__dirname, '..');
1
+ import { join } from 'node:path';
2
+ export const projectDir = join(import.meta.dirname, '..');
6
3
  export const srcDir = `${projectDir}/src`;
7
4
  export const testDir = `${srcDir}/test`;
8
5
  export const cfgDir = `${projectDir}/cfg`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "18.1.4",
4
+ "version": "18.2.0",
5
5
  "scripts": {
6
6
  "prepare": "husky",
7
7
  "tsx-debug": "tsx scripts/testScript.ts",
@@ -34,7 +34,7 @@
34
34
  "eslint-plugin-import-x": "^4",
35
35
  "eslint-plugin-jsdoc": "^50",
36
36
  "eslint-plugin-simple-import-sort": "^12",
37
- "eslint-plugin-unicorn": "^58",
37
+ "eslint-plugin-unicorn": "^59",
38
38
  "eslint-plugin-vue": "^10",
39
39
  "globals": "^16",
40
40
  "husky": "^9",