redlint 6.7.0 β†’ 6.8.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,10 @@
1
+ 2026.06.07, v6.8.0
2
+
3
+ feature:
4
+ - 4bd96fe redlint: convert: convert-toml-to-yaml: add
5
+ - c58d5a5 convert-json-to-toml: add
6
+ - 2978ff4 redlint: convert toml to json
7
+
1
8
  2026.06.07, v6.7.0
2
9
 
3
10
  feature:
@@ -0,0 +1,14 @@
1
+ import * as pluginFilesystem from '@putout/plugin-filesystem';
2
+
3
+ const [, pluginConvertJsonToToml] = pluginFilesystem.rules['convert-json-to-toml'];
4
+
5
+ export const convertJsonToToml = (filename) => ({
6
+ rules: {
7
+ 'filesystem/convert-json-to-toml': ['on', {
8
+ filename,
9
+ }],
10
+ },
11
+ plugins: [
12
+ ['filesystem/convert-json-to-toml', pluginConvertJsonToToml],
13
+ ],
14
+ });
@@ -0,0 +1,14 @@
1
+ import * as pluginFilesystem from '@putout/plugin-filesystem';
2
+
3
+ const [, pluginConvertTomlToJson] = pluginFilesystem.rules['convert-toml-to-json'];
4
+
5
+ export const convertTomlToJson = (filename) => ({
6
+ rules: {
7
+ 'filesystem/convert-toml-to-json': ['on', {
8
+ filename,
9
+ }],
10
+ },
11
+ plugins: [
12
+ ['filesystem/convert-toml-to-json', pluginConvertTomlToJson],
13
+ ],
14
+ });
@@ -0,0 +1,14 @@
1
+ import * as pluginFilesystem from '@putout/plugin-filesystem';
2
+
3
+ const [, pluginConvertTomlToYaml] = pluginFilesystem.rules['convert-toml-to-yaml'];
4
+
5
+ export const convertTomlToYaml = (filename) => ({
6
+ rules: {
7
+ 'filesystem/convert-toml-to-yaml': ['on', {
8
+ filename,
9
+ }],
10
+ },
11
+ plugins: [
12
+ ['filesystem/convert-toml-to-yaml', pluginConvertTomlToYaml],
13
+ ],
14
+ });
@@ -7,12 +7,21 @@ import {
7
7
  CONVERT_YAML_TO_JSON_DEBUG,
8
8
  CONVERT_JSON_TO_YAML,
9
9
  CONVERT_JSON_TO_YAML_DEBUG,
10
+ CONVERT_TOML_TO_JSON,
11
+ CONVERT_TOML_TO_JSON_DEBUG,
12
+ CONVERT_JSON_TO_TOML,
13
+ CONVERT_JSON_TO_TOML_DEBUG,
14
+ CONVERT_TOML_TO_YAML,
15
+ CONVERT_TOML_TO_YAML_DEBUG,
10
16
  CONVERT_RC_TO_FLAT,
11
17
  } from '../menu.js';
12
18
  import {convertYamlToJson} from './converters/convert-yaml-to-json.js';
13
19
  import {convertJsonToYaml} from './converters/convert-json-to-yaml.js';
14
20
  import {convertJsonToJs} from './converters/convert-json-to-js.js';
15
21
  import {convertJSToJson} from './converters/convert-js-to-json.js';
22
+ import {convertTomlToJson} from './converters/convert-toml-to-json.js';
23
+ import {convertJsonToToml} from './converters/convert-json-to-toml.js';
24
+ import {convertTomlToYaml} from './converters/convert-toml-to-yaml.js';
16
25
  import {convertRCToFlat} from './converters/convert-rc-to-flat.js';
17
26
 
18
27
  const CONVERTERS = {
@@ -24,6 +33,12 @@ const CONVERTERS = {
24
33
  [CONVERT_YAML_TO_JSON_DEBUG]: convertYamlToJson,
25
34
  [CONVERT_JSON_TO_YAML]: convertJsonToYaml,
26
35
  [CONVERT_JSON_TO_YAML_DEBUG]: convertJsonToYaml,
36
+ [CONVERT_TOML_TO_JSON]: convertTomlToJson,
37
+ [CONVERT_TOML_TO_JSON_DEBUG]: convertTomlToJson,
38
+ [CONVERT_JSON_TO_TOML]: convertJsonToToml,
39
+ [CONVERT_JSON_TO_TOML_DEBUG]: convertJsonToToml,
40
+ [CONVERT_TOML_TO_YAML]: convertTomlToYaml,
41
+ [CONVERT_TOML_TO_YAML_DEBUG]: convertTomlToYaml,
27
42
  [CONVERT_RC_TO_FLAT]: convertRCToFlat,
28
43
  };
29
44
 
@@ -7,6 +7,9 @@ import {
7
7
  CONVERT_RC_TO_FLAT,
8
8
  CONVERT_YAML_TO_JSON,
9
9
  CONVERT_JSON_TO_YAML,
10
+ CONVERT_TOML_TO_JSON,
11
+ CONVERT_JSON_TO_TOML,
12
+ CONVERT_TOML_TO_YAML,
10
13
  } from '../menu.js';
11
14
 
12
15
  export * from './convert.js';
@@ -16,6 +19,9 @@ export const chooseConvert = async () => {
16
19
  CONVERT_JSON_TO_JS,
17
20
  CONVERT_YAML_TO_JSON,
18
21
  CONVERT_JSON_TO_YAML,
22
+ CONVERT_TOML_TO_JSON,
23
+ CONVERT_JSON_TO_TOML,
24
+ CONVERT_TOML_TO_YAML,
19
25
  CONVERT_RC_TO_FLAT,
20
26
  BACK,
21
27
  EXIT,
package/lib/menu.js CHANGED
@@ -32,6 +32,15 @@ export const CONVERT_YAML_TO_JSON_DEBUG = '🦏 convert yaml to json: debug';
32
32
  export const CONVERT_JSON_TO_YAML = '🦏 convert json to yaml';
33
33
  export const CONVERT_JSON_TO_YAML_DEBUG = '🦏 convert json to yaml: debug';
34
34
 
35
+ export const CONVERT_TOML_TO_JSON = '🦏 convert toml to json';
36
+ export const CONVERT_TOML_TO_JSON_DEBUG = '🦏 convert toml to json: debug';
37
+
38
+ export const CONVERT_JSON_TO_TOML = '🦏 convert json to toml';
39
+ export const CONVERT_JSON_TO_TOML_DEBUG = '🦏 convert json to toml: debug';
40
+
41
+ export const CONVERT_TOML_TO_YAML = '🦏 convert toml to yaml';
42
+ export const CONVERT_TOML_TO_YAML_DEBUG = '🦏 convert toml to yaml: debug';
43
+
35
44
  export const RENAME_JS_TO_JSX = '🦏 rename js to jsx';
36
45
  export const RENAME_JS_TO_JSX_DEBUG = '🦏 rename js to jsx: debug';
37
46
 
@@ -64,6 +73,9 @@ export const isConvertChosen = (a) => {
64
73
  CONVERT_JS_TO_JSON,
65
74
  CONVERT_YAML_TO_JSON,
66
75
  CONVERT_JSON_TO_YAML,
76
+ CONVERT_TOML_TO_JSON,
77
+ CONVERT_JSON_TO_TOML,
78
+ CONVERT_TOML_TO_YAML,
67
79
  CONVERT_RC_TO_FLAT,
68
80
  ].includes(a);
69
81
  };
@@ -74,6 +86,9 @@ export const isConvertChosenDebug = (a) => [
74
86
  CONVERT_JSON_TO_JS_DEBUG,
75
87
  CONVERT_YAML_TO_JSON_DEBUG,
76
88
  CONVERT_JSON_TO_YAML_DEBUG,
89
+ CONVERT_TOML_TO_JSON_DEBUG,
90
+ CONVERT_JSON_TO_TOML_DEBUG,
91
+ CONVERT_TOML_TO_YAML_DEBUG,
77
92
  ].includes(a);
78
93
 
79
94
  export const isConvertRCToFlat = (a) => a === CONVERT_RC_TO_FLAT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redlint",
3
- "version": "6.7.0",
3
+ "version": "6.8.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Lint Filesystem with 🐊Putout",