@nice-move/eslint-config-base 0.12.14 → 0.12.16

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.
Files changed (2) hide show
  1. package/lib/utils.mjs +14 -1
  2. package/package.json +2 -2
package/lib/utils.mjs CHANGED
@@ -1,6 +1,10 @@
1
+ import { createRequire } from 'node:module';
2
+
1
3
  import globals from 'globals';
2
4
  import { getPkg } from 'settingz';
3
5
 
6
+ export const require = createRequire(import.meta.url);
7
+
4
8
  export function pkgHas(checker, getResult) {
5
9
  const pkg = getPkg();
6
10
 
@@ -13,9 +17,18 @@ export function pkgHas(checker, getResult) {
13
17
  return [];
14
18
  }
15
19
 
20
+ function getConfig(name) {
21
+ try {
22
+ // eslint-disable-next-line import/no-unresolved
23
+ return require('@nice-move/config/package.json')[name];
24
+ } catch {
25
+ return null;
26
+ }
27
+ }
28
+
16
29
  // eslint-disable-next-line consistent-return
17
30
  export function configHas(checker, getResult) {
18
- const pkg = getPkg('nice-move');
31
+ const pkg = getConfig('nice-move') || getPkg('nice-move');
19
32
 
20
33
  const io = checker(pkg);
21
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-move/eslint-config-base",
3
- "version": "0.12.14",
3
+ "version": "0.12.16",
4
4
  "description": "A `eslint` config for best practice",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -51,7 +51,7 @@
51
51
  "globals": "^16.0.0",
52
52
  "resolve.exports": "^2.0.3",
53
53
  "settingz": "^0.2.0",
54
- "typescript-eslint": "^8.28.0"
54
+ "typescript-eslint": "^8.29.0"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "eslint": "^9.23.0"