redlint 5.3.2 → 5.3.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.
package/ChangeLog CHANGED
@@ -1,3 +1,13 @@
1
+ 2026.01.30, v5.3.4
2
+
3
+ feature:
4
+ - 4fec1c1 run: improve convert from ESM to CommonJS
5
+
6
+ 2026.01.29, v5.3.3
7
+
8
+ fix:
9
+ - 9569503 redlint: test: read only current directory
10
+
1
11
  2026.01.28, v5.3.2
2
12
 
3
13
  feature:
@@ -20,7 +20,7 @@ export const scan = (root, {options, push}) => {
20
20
  if (!names.length)
21
21
  return;
22
22
 
23
- const fixtureDir = getFile(root, 'fixture');
23
+ const [fixtureDir] = getFile(root, 'fixture');
24
24
 
25
25
  for (const [a, b] of names) {
26
26
  if (!fixtureDir || !getFile(fixtureDir, a))
@@ -27,6 +27,8 @@ function createPlugin(content, require) {
27
27
  const {code} = putout(content, {
28
28
  plugins: [
29
29
  'nodejs/convert-esm-to-commonjs',
30
+ 'remove-nested-blocks',
31
+ 'putout',
30
32
  ],
31
33
  });
32
34
 
package/lib/test/test.js CHANGED
@@ -13,9 +13,10 @@ const createLog = (output) => (a) => {
13
13
  };
14
14
 
15
15
  const {
16
- findFile,
17
16
  readFileContent,
18
17
  getFilename,
18
+ getRootDirectory,
19
+ getFile,
19
20
  } = operator;
20
21
 
21
22
  const SUCCESS = '🍀';
@@ -27,15 +28,14 @@ export const test = (filesystem, overrides = {}) => {
27
28
  const [{source}] = branch(filesystem);
28
29
  const ast = parse(source);
29
30
 
30
- const [spec] = findFile(ast, 'index.spec.js');
31
+ const root = getRootDirectory(ast);
32
+ const [index, spec] = getFile(root, ['index.js', 'index.spec.js']);
31
33
 
32
34
  if (!spec)
33
35
  return [
34
36
  Error(`No 'index.spec.js' found`),
35
37
  ];
36
38
 
37
- const [index] = findFile(ast, 'index.js');
38
-
39
39
  if (!index)
40
40
  return [
41
41
  Error(`No 'index.js' found`),
@@ -45,6 +45,7 @@ export const test = (filesystem, overrides = {}) => {
45
45
  const names = getFixtureNames(specContent);
46
46
 
47
47
  initFixture(ast, names);
48
+
48
49
  const fixture = readFixture(ast, names);
49
50
 
50
51
  const plugin = readFileContent(index);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redlint",
3
- "version": "5.3.2",
3
+ "version": "5.3.4",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Lint Filesystem with 🐊Putout",