stylelint-find-new-rules 5.0.1 → 6.0.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.
@@ -0,0 +1 @@
1
+ export { default } from '@pulsanova/eslint-config-node';
package/lib/cli.js CHANGED
@@ -4,7 +4,6 @@ import colors from 'picocolors';
4
4
  import { readPackageSync } from 'read-pkg';
5
5
  import process from 'node:process';
6
6
  import { dirname } from 'node:path';
7
- import { fileURLToPath } from 'node:url';
8
7
  import standalone from './index.js';
9
8
  import { print, printRules } from './utils/print.js';
10
9
 
@@ -93,7 +92,7 @@ if (!options.unused && !options.deprecated && !options.current && !options.avail
93
92
 
94
93
  const printResults = (rules) => {
95
94
  const pkg = readPackageSync({
96
- cwd: dirname(dirname(fileURLToPath(import.meta.url))),
95
+ cwd: dirname(import.meta.dirname),
97
96
  normalize: false,
98
97
  });
99
98
  print(`stylelint-find-new-rules v${pkg.version}`);
@@ -132,4 +131,10 @@ const printResults = (rules) => {
132
131
  }
133
132
  process.exit(hasOutdatedRules ? 1 : 0);
134
133
  };
135
- standalone(argv._[0]).then(printResults).catch(handleError);
134
+
135
+ try {
136
+ const rules = await standalone(argv._[0]);
137
+ printResults(rules);
138
+ } catch (err) {
139
+ handleError(err);
140
+ }
@@ -16,7 +16,7 @@ export const getAllRules = async (config) => {
16
16
  await import(
17
17
  isAbsolute(plugin)
18
18
  ? pathToFileURL(plugin).toString()
19
- : plugin
19
+ : plugin,
20
20
  )
21
21
  );
22
22
  rawPluginRules = rawPluginRules.default || rawPluginRules; // - ESM / CommonJS.
@@ -39,7 +39,6 @@ export const getAllRules = async (config) => {
39
39
  };
40
40
 
41
41
  export const getUsedRules = async (config, allRules = null) => {
42
- // eslint-disable-next-line require-atomic-updates
43
42
  allRules ??= await getAllRules(config);
44
43
 
45
44
  const rules = Object.keys(config.rules || {})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stylelint-find-new-rules",
3
- "version": "5.0.1",
3
+ "version": "6.0.0",
4
4
  "description": "Find stylelint rules that you don't have in your config",
5
5
  "homepage": "https://github.com/Donov4n/stylelint-find-new-rules",
6
6
  "license": "MIT",
@@ -22,20 +22,19 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "columnify": "~1.6.0",
25
- "picocolors": "^1.0.0",
26
- "read-package-up": "^11.0.0",
27
- "read-pkg": "^9.0.1",
28
- "yargs": "~17.7.2"
25
+ "picocolors": "^1.1.1",
26
+ "read-pkg": "^10.0.0",
27
+ "yargs": "~18.0.0"
29
28
  },
30
29
  "devDependencies": {
31
- "@pulsanova/eslint-config-node": "~2.3.0",
32
- "eslint": "^8.56.0",
33
- "stylelint": "^16"
30
+ "@pulsanova/eslint-config-node": "~3.1.2",
31
+ "eslint": "~9.39.2",
32
+ "stylelint": "^17"
34
33
  },
35
34
  "peerDependencies": {
36
- "stylelint": "^16"
35
+ "stylelint": "^17"
37
36
  },
38
37
  "engines": {
39
- "node": ">=18.12.0"
38
+ "node": ">=20.19.0"
40
39
  }
41
40
  }