redlint 6.4.0 → 6.5.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.
package/ChangeLog CHANGED
@@ -1,3 +1,15 @@
1
+ 2026.05.04, v6.5.0
2
+
3
+ feature:
4
+ - 50ca776 redlint: @putout/plugin-react v4.0.1
5
+ - 5a7ae00 redlint: montag v2.0.1
6
+ - d9736f6 redlint: view: no file found
7
+
8
+ 2026.04.15, v6.4.1
9
+
10
+ feature:
11
+ - 460b40c redlint: redstd: add
12
+
1
13
  2026.04.15, v6.4.0
2
14
 
3
15
  feature:
package/bin/redlint.js CHANGED
@@ -9,6 +9,7 @@ import formatterDump from '@putout/formatter-dump';
9
9
  import ora from 'ora';
10
10
  import {isCI} from 'ci-info';
11
11
  import {bundle} from '@putout/bundler';
12
+ import {readStdin} from 'redstd';
12
13
  import {edit, editHelp} from '#edit';
13
14
  import {help} from '../lib/help/help.js';
14
15
  import {choose} from '../lib/choose.js';
@@ -61,7 +62,6 @@ import {
61
62
  TEST,
62
63
  isTest,
63
64
  } from '../lib/menu.js';
64
- import {readStdin} from './read-stdin.js';
65
65
 
66
66
  const {log} = console;
67
67
  const {exit} = process;
package/lib/edit/help.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import process from 'node:process';
2
- import montag from 'montag';
2
+ import {montag} from 'montag';
3
3
 
4
4
  const {stdout} = process;
5
5
 
package/lib/help/help.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import process from 'node:process';
2
- import montag from 'montag';
2
+ import {montag} from 'montag';
3
3
  import {logo} from './logo.js';
4
4
 
5
5
  const {stdout} = process;
package/lib/help/logo.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import chalk from 'chalk';
2
- import montag from 'montag';
2
+ import {montag} from 'montag';
3
3
 
4
4
  export const logo = montag`
5
5
  ${chalk.red('██████ ███████ ██████ ')} ██ ██ ███ ██ ████████
package/lib/view/view.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import {readFileSync as _readFileSync} from 'node:fs';
2
2
  import {codeFrameColumns} from '@putout/babel';
3
3
  import dedent from 'dedent';
4
+ import {tryCatch} from 'try-catch';
4
5
  import {parseFiles} from './parse-files/index.js';
5
6
 
6
7
  const {entries} = Object;
@@ -11,7 +12,11 @@ export const view = (filename, overrides = {}) => {
11
12
  } = overrides;
12
13
 
13
14
  const lines = [];
14
- const filesystem = readFileSync(filename, 'utf8');
15
+ const [error, filesystem] = tryCatch(readFileSync, filename, 'utf8');
16
+
17
+ if (error)
18
+ return error.message;
19
+
15
20
  const files = parseFiles(filesystem);
16
21
 
17
22
  for (const [line, nameWithContent] of entries(files)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redlint",
3
- "version": "6.4.0",
3
+ "version": "6.5.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Lint Filesystem with 🐊Putout",
@@ -47,7 +47,7 @@
47
47
  "@putout/plugin-eslint": "^15.0.0",
48
48
  "@putout/plugin-filesystem": "^13.0.0",
49
49
  "@putout/plugin-nodejs": "^21.0.0",
50
- "@putout/plugin-react": "^3.0.0",
50
+ "@putout/plugin-react": "^4.0.1",
51
51
  "@putout/processor-filesystem": "^8.0.0",
52
52
  "chalk": "^5.3.0",
53
53
  "ci-info": "^4.0.0",
@@ -56,9 +56,11 @@
56
56
  "fullstore": "^4.0.0",
57
57
  "ignore": "^7.0.0",
58
58
  "jest-diff": "^30.2.0",
59
- "montag": "^1.2.1",
59
+ "montag": "^2.0.1",
60
60
  "ora": "^9.0.0",
61
61
  "putout": "^42.0.0",
62
+ "redstd": "^1.0.0",
63
+ "try-catch": "^4.0.9",
62
64
  "try-to-catch": "^4.0.0"
63
65
  },
64
66
  "keywords": [
package/bin/read-stdin.js DELETED
@@ -1,23 +0,0 @@
1
- import {promisify} from 'node:util';
2
- import process from 'node:process';
3
-
4
- export const readStdin = promisify((overrides, fn) => {
5
- const {stdin} = fn ? overrides : process;
6
-
7
- fn = fn || overrides;
8
-
9
- stdin.setEncoding('utf8');
10
-
11
- if (stdin.isTTY)
12
- return fn(null, '');
13
-
14
- const data = [];
15
-
16
- stdin.on('data', (chunk) => {
17
- data.push(chunk);
18
- });
19
-
20
- stdin.on('end', () => {
21
- fn(null, data.join(''));
22
- });
23
- });