eslint-plugin-putout 15.1.1 β†’ 15.2.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.
@@ -1,4 +1,4 @@
1
- # aling-spaces
1
+ # align-spaces
2
2
 
3
3
  When 🐊**Putout** processes files it can remove spaces from empty line, this `rule` fixes it.
4
4
 
@@ -10,7 +10,7 @@ module.exports.include = () => ['ImportDeclaration'];
10
10
  module.exports.filter = ({node}) => {
11
11
  const {value} = node.source;
12
12
 
13
- if (!/^__putout_evaluate:/.test(value))
13
+ if (!value.startsWith('__putout_evaluate:'))
14
14
  return false;
15
15
 
16
16
  return true;
package/lib/markdown.js CHANGED
@@ -30,7 +30,10 @@ module.exports = [{
30
30
  sourceType: 'module',
31
31
  parserOpts: {
32
32
  ...parserOpts,
33
- plugins: parserPlugins,
33
+ plugins: [
34
+ 'jsx',
35
+ ...parserPlugins,
36
+ ],
34
37
  },
35
38
  plugins: [
36
39
  '@babel/plugin-syntax-class-properties',
@@ -9,7 +9,7 @@ Part of [**eslint-plugin-putout**](https://github.com/coderaiser/putout/tree/mas
9
9
 
10
10
  ```js
11
11
  const onConnectError = squad(superFn(connect_error),
12
- logWraped(isLog, importStr),
12
+ logWrapped(isLog, importStr),
13
13
  addUrl(colorUrl),
14
14
  getDescription);
15
15
  ```
@@ -19,7 +19,7 @@ const onConnectError = squad(superFn(connect_error),
19
19
  ```js
20
20
  const onConnectError = squad(
21
21
  superFn(connect_error),
22
- logWraped(isLog, importStr),
22
+ logWrapped(isLog, importStr),
23
23
  addUrl(colorUrl),
24
24
  getDescription,
25
25
  );
@@ -23,13 +23,13 @@ module.exports.filter = ({node, text}) => {
23
23
  return false;
24
24
  }
25
25
 
26
- const cutedText = text.replace(name, '');
26
+ const textPeace = text.replace(name, '');
27
27
 
28
- if (cutedText.length < 60)
28
+ if (textPeace.length < 60)
29
29
  return false;
30
30
 
31
- const isOpenBracket = /^\(\n/.test(cutedText);
32
- const isCloseBracket = /\n\s*\)$/.test(cutedText);
31
+ const isOpenBracket = /^\(\n/.test(textPeace);
32
+ const isCloseBracket = /\n\s*\)$/.test(textPeace);
33
33
 
34
34
  if (isOpenBracket && isCloseBracket)
35
35
  return false;
@@ -7,18 +7,12 @@ Part of [**eslint-plugin-putout**](https://github.com/coderaiser/putout/tree/mas
7
7
  ## ❌ Example of incorrect code
8
8
 
9
9
  ```ts
10
- const user = {
11
- name,
12
- };
10
+ const user = {name};
13
11
 
14
- module.exports = {
15
- lint: 'putout lint',
16
- };
12
+ module.exports = {lint: 'putout lint'};
17
13
 
18
14
  type User = {name: string};
19
- interface Place {
20
- message: string
21
- }
15
+ interface Place {message: string}
22
16
  ```
23
17
 
24
18
  ## βœ… Example of correct code
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-putout",
3
- "version": "15.1.1",
3
+ "version": "15.2.0",
4
4
  "type": "commonjs",
5
5
  "description": "ESLint plugin for 🐊Putout",
6
6
  "release": false,
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "peerDependencies": {
67
67
  "eslint": ">=8.0.0",
68
- "putout": ">=25"
68
+ "putout": ">=26"
69
69
  },
70
70
  "license": "MIT",
71
71
  "publishConfig": {