redlint 3.22.0 → 3.22.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.
package/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2025.03.17, v3.22.1
2
+
3
+ feature:
4
+ - 9662887 redlint: recursive -> nested
5
+
1
6
  2025.03.17, v3.22.0
2
7
 
3
8
  feature:
package/bin/redlint.js CHANGED
@@ -131,7 +131,7 @@ async function uiLoop(arg) {
131
131
  if (isEdit(arg)) {
132
132
  const spinner = ora(`🪶edit filesystem`).start();
133
133
  const args = argOptions.join('');
134
- const recursive = /-r|--recursive/.test(args);
134
+ const nested = /-n|--nested/.test(args);
135
135
  const full = /-f|--full/.test(args);
136
136
 
137
137
  spinner.succeed();
@@ -139,7 +139,7 @@ async function uiLoop(arg) {
139
139
  dir: CWD,
140
140
  type: 'rename',
141
141
  full,
142
- recursive,
142
+ nested,
143
143
  });
144
144
  }
145
145
 
package/lib/edit/edit.js CHANGED
@@ -5,7 +5,7 @@ import {readDirectory} from './read-directory/index.js';
5
5
  import {writeTmpFile as _writeTmpFile} from './write-tmp-file.js';
6
6
  import {renameFiles as _renameFiles} from './rename-files/index.js';
7
7
 
8
- export const edit = (filesystem, {dir, recursive, full}, overrides = {}) => {
8
+ export const edit = (filesystem, {dir, nested, full}, overrides = {}) => {
9
9
  const {
10
10
  execute = execSync,
11
11
  readFileContent = readFileSync,
@@ -18,7 +18,7 @@ export const edit = (filesystem, {dir, recursive, full}, overrides = {}) => {
18
18
 
19
19
  const names = readDirectory(filesystem, {
20
20
  dir,
21
- recursive,
21
+ nested,
22
22
  full,
23
23
  });
24
24
 
@@ -15,13 +15,13 @@ export const scan = (rootPath, {push, options}) => {
15
15
  const {
16
16
  dir = '/',
17
17
  full,
18
- recursive,
18
+ nested,
19
19
  } = options;
20
20
 
21
21
  const names = [];
22
22
  const [dirPath] = findFile(rootPath, dir);
23
23
 
24
- const files = recursive ? findFile(dirPath, '*') : readDirectory(dirPath);
24
+ const files = nested ? findFile(dirPath, '*') : readDirectory(dirPath);
25
25
 
26
26
  for (const file of files) {
27
27
  const path = getFilename(file);
@@ -29,7 +29,7 @@ export const scan = (rootPath, {push, options}) => {
29
29
  if (dir === path)
30
30
  continue;
31
31
 
32
- if (!full && recursive) {
32
+ if (!full && nested) {
33
33
  const name = path
34
34
  .replace(dir, '')
35
35
  .replace(/^\//, '');
@@ -4,7 +4,7 @@ import * as getFileNames from './get-filenames/index.js';
4
4
 
5
5
  const getMessage = ({message}) => message;
6
6
 
7
- export const readDirectory = (filesystem, {dir, recursive, full}) => {
7
+ export const readDirectory = (filesystem, {dir, nested, full}) => {
8
8
  const source = toJS(filesystem, __filesystem);
9
9
  const ast = parse(source);
10
10
 
@@ -15,7 +15,7 @@ export const readDirectory = (filesystem, {dir, recursive, full}) => {
15
15
  'get-filenames': ['on', {
16
16
  dir,
17
17
  full,
18
- recursive,
18
+ nested,
19
19
  }],
20
20
  },
21
21
  plugins: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redlint",
3
- "version": "3.22.0",
3
+ "version": "3.22.1",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Lint Filesystem with 🐊Putout",