eslint-plugin-putout 13.6.0 → 13.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.
Files changed (3) hide show
  1. package/README.md +0 -1
  2. package/lib/ts.js +22 -1
  3. package/package.json +5 -4
package/README.md CHANGED
@@ -132,4 +132,3 @@ Disabled 🐊`Putout` rules:
132
132
  ### safe+align
133
133
 
134
134
  When you want to enable ability to align spaces on empty lines, while have all benefits of `safe` preset: use `safe+align`.
135
-
package/lib/ts.js CHANGED
@@ -44,7 +44,7 @@ const extensionRules = {
44
44
  '@typescript-eslint/object-curly-spacing': 'error',
45
45
 
46
46
  'padding-line-between-statements': 'off',
47
- '@typescript-eslint/padding-line-between-statements': rules['padding-line-between-statements'],
47
+ '@typescript-eslint/padding-line-between-statements': convertPaddingLines(rules['padding-line-between-statements']),
48
48
 
49
49
  'quotes': 'off',
50
50
  '@typescript-eslint/quotes': rules.quotes,
@@ -101,3 +101,24 @@ module.exports = [
101
101
  },
102
102
  ];
103
103
 
104
+ function convertPaddingLines([state, ...lines]) {
105
+ const newLines = [];
106
+ for (const line of lines) {
107
+ let {prev, next} = line;
108
+
109
+ if (prev.includes('cjs-'))
110
+ prev = prev.replace('cjs-', '');
111
+
112
+ if (next.includes('cjs-'))
113
+ next = next.replace('cjs-', '');
114
+
115
+ newLines.push({
116
+ ...line,
117
+ prev,
118
+ next,
119
+ });
120
+ }
121
+
122
+ return [state, ...newLines];
123
+ }
124
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-putout",
3
- "version": "13.6.0",
3
+ "version": "13.7.0",
4
4
  "type": "commonjs",
5
5
  "description": "eslint plugin for putout",
6
6
  "release": false,
@@ -48,6 +48,8 @@
48
48
  "typescript": "^4.5.2"
49
49
  },
50
50
  "devDependencies": {
51
+ "@babel/plugin-syntax-typescript": "^7.12.1",
52
+ "@putout/test": "^4.3.0",
51
53
  "c8": "^7.5.0",
52
54
  "eslint": "^8.0.1",
53
55
  "eslint-plugin-eslint-plugin": "^3.2.0",
@@ -55,9 +57,8 @@
55
57
  "mocha": "^9.0.1",
56
58
  "montag": "^1.0.0",
57
59
  "simport": "^1.2.0",
58
- "supertape": "^6.6.0",
59
- "try-to-catch": "^3.0.0",
60
- "@babel/plugin-syntax-typescript": "^7.12.1"
60
+ "supertape": "^6.13.1",
61
+ "try-to-catch": "^3.0.0"
61
62
  },
62
63
  "engines": {
63
64
  "node": ">=14"