flatlint 3.5.0 → 3.7.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,13 @@
1
+ 2025.12.29, v3.7.0
2
+
3
+ feature:
4
+ - 3cbe4d6 flatlint: debug -> obug
5
+
6
+ 2025.12.28, v3.6.0
7
+
8
+ feature:
9
+ - 03ab628 flatlint: add-missing-comma: }" -> },"
10
+
1
11
  2025.12.10, v3.5.0
2
12
 
3
13
  feature:
package/README.md CHANGED
@@ -255,7 +255,7 @@ t.equal(expected, []);
255
255
  <details><summary>remove useless dot</summary>
256
256
 
257
257
  ```diff
258
- -fn([].);
258
+ -fn([]);
259
259
  +fn([].);
260
260
  ```
261
261
 
@@ -37,6 +37,9 @@ export const match = () => ({
37
37
 
38
38
  return !path.isNextPunctuator();
39
39
  },
40
+ '}': (vars, path) => {
41
+ return path.isNextPunctuator(quote);
42
+ },
40
43
  '"__a"': (vars, path) => {
41
44
  if (path.isNextPunctuator(quote))
42
45
  return true;
@@ -54,4 +57,6 @@ export const match = () => ({
54
57
  export const replace = () => ({
55
58
  '__a': '__a,',
56
59
  '"__a"': '"__a",',
60
+ '}': '},',
57
61
  });
62
+
@@ -1,4 +1,4 @@
1
- import debug from 'debug';
1
+ import {createDebug} from 'obug';
2
2
  import {compare} from '#compare';
3
3
  import {prepare} from '#parser';
4
4
  import {
@@ -10,8 +10,12 @@ import {createPath} from './path.js';
10
10
 
11
11
  const returns = (a) => () => a;
12
12
  const {entries} = Object;
13
- const logCompare = debug('flatlint:compare');
14
- const logFix = debug('flatlint:fix');
13
+ const logCompare = createDebug('flatlint:compare', {
14
+ useColors: true,
15
+ });
16
+ const logFix = createDebug('flatlint:fix', {
17
+ useColors: true,
18
+ });
15
19
 
16
20
  export const replace = (tokens, {fix, rule, plugin}) => {
17
21
  const places = [];
@@ -1,7 +1,2 @@
1
- import {lint} from '#flatlint';
2
- import {plugins} from './plugins.js';
3
-
4
- export {
5
- lint,
6
- plugins,
7
- };
1
+ export {lint} from '#flatlint';
2
+ export {plugins} from './plugins.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "3.5.0",
3
+ "version": "3.7.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",
@@ -79,8 +79,8 @@
79
79
  "dependencies": {
80
80
  "@putout/engine-loader": "^16.0.0",
81
81
  "@putout/operator-keyword": "^3.0.0",
82
- "debug": "^4.4.0",
83
- "js-tokens": "^10.0.0"
82
+ "js-tokens": "^10.0.0",
83
+ "obug": "^2.1.1"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@putout/test": "^14.0.0",