@nice-move/eslint-config-base 0.16.0 → 0.16.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.
Files changed (2) hide show
  1. package/lib/utils.mjs +6 -5
  2. package/package.json +5 -5
package/lib/utils.mjs CHANGED
@@ -1,10 +1,9 @@
1
- import { createRequire } from 'node:module';
1
+ import { readFileSync } from 'node:fs';
2
+ import { fileURLToPath } from 'node:url';
2
3
 
3
4
  import globals from 'globals';
4
5
  import { getPkg } from 'settingz';
5
6
 
6
- export const require = createRequire(import.meta.url);
7
-
8
7
  export function pkgHas(checker, getResult) {
9
8
  const pkg = getPkg();
10
9
 
@@ -19,8 +18,10 @@ export function pkgHas(checker, getResult) {
19
18
 
20
19
  function getConfig(name) {
21
20
  try {
22
- // eslint-disable-next-line import-x/no-unresolved
23
- return require('@nice-move/config/package.json')[name];
21
+ const url = import.meta.resolve('@nice-move/config/package.json');
22
+ const config = JSON.parse(readFileSync(fileURLToPath(url), 'utf8'));
23
+
24
+ return config[name];
24
25
  } catch {
25
26
  return null;
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-move/eslint-config-base",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "A `eslint` config for best practice",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -34,8 +34,8 @@
34
34
  "main": "index.mjs",
35
35
  "type": "module",
36
36
  "dependencies": {
37
- "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
38
- "@eslint/eslintrc": "^3.3.6",
37
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.8.1",
38
+ "@eslint/eslintrc": "^3.3.7",
39
39
  "@eslint/js": "^10.0.1",
40
40
  "@eslint/markdown": "^8.0.3",
41
41
  "@nice-move/eslint-plugin-html": "^0.1.1",
@@ -44,12 +44,12 @@
44
44
  "eslint-plugin-import-x": "^4.17.1",
45
45
  "eslint-plugin-n": "^18.3.0",
46
46
  "eslint-plugin-promise": "^7.3.0",
47
- "eslint-plugin-regexp": "^3.2.0",
47
+ "eslint-plugin-regexp": "^3.3.1",
48
48
  "eslint-plugin-unicorn": "^74.0.0",
49
49
  "espree": "^11.2.0",
50
50
  "globals": "^17.11.0",
51
51
  "settingz": "^0.2.0",
52
- "typescript-eslint": "^8.68.0"
52
+ "typescript-eslint": "^8.70.1"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "eslint": "^10.9.1"