@wkovacs64/eslint-config 7.2.3 → 7.2.4

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/index.js +6 -2
  2. package/package.json +1 -2
package/index.js CHANGED
@@ -2,7 +2,6 @@
2
2
  //
3
3
  // Forked from https://github.com/epicweb-dev/config
4
4
  //
5
- import resolveFrom from 'resolve-from';
6
5
  import globals from 'globals';
7
6
  import eslint from '@eslint/js';
8
7
  import tseslint from 'typescript-eslint';
@@ -15,7 +14,12 @@ const WARN = 'warn';
15
14
  const OFF = 'off';
16
15
 
17
16
  function has(pkgName) {
18
- return Boolean(resolveFrom.silent(process.cwd(), pkgName));
17
+ try {
18
+ import.meta.resolve(pkgName, import.meta.url);
19
+ return true;
20
+ } catch {
21
+ return false;
22
+ }
19
23
  }
20
24
 
21
25
  const hasTypeScript = has('typescript');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wkovacs64/eslint-config",
3
- "version": "7.2.3",
3
+ "version": "7.2.4",
4
4
  "description": "@wKovacs64 ESLint config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -60,7 +60,6 @@
60
60
  "eslint-plugin-testing-library": "^6.2.2",
61
61
  "eslint-plugin-vitest": "^0.5.4",
62
62
  "globals": "^15.3.0",
63
- "resolve-from": "5.0.0",
64
63
  "typescript-eslint": "^8.0.0-alpha.20"
65
64
  },
66
65
  "devDependencies": {