eslint-plugin-putout 10.7.0 → 11.0.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/README.md +1 -0
- package/lib/evaluate/README.md +1 -1
- package/lib/index.js +3 -2
- package/lib/tape-add-newline-before-assertion/index.js +3 -3
- package/lib/ts.js +1 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -93,6 +93,7 @@ List of disabled `putout` rules:
|
|
|
93
93
|
|
|
94
94
|
- [remove-empty](https://github.com/coderaiser/putout/tree/v20.0.0/packages/plugin-remove-empty);
|
|
95
95
|
- [remove-unused-variables](https://github.com/coderaiser/putout/tree/v20.0.0/packages/remove-unused-variables);
|
|
96
|
+
- [remove-unused-types](https://github.com/coderaiser/putout/tree/v20.0.0/packages/remove-unused-types);
|
|
96
97
|
- [remove-unused-for-of-variables](https://github.com/coderaiser/putout/tree/v20.0.0/packages/remove-unused-for-of-variables);
|
|
97
98
|
- [remove-unused-expressions](https://github.com/coderaiser/putout/tree/v20.0.0/packages);
|
|
98
99
|
- [remove-skip](https://github.com/coderaiser/putout/tree/v20.0.0/packages/remove-skip);
|
package/lib/evaluate/README.md
CHANGED
|
@@ -21,7 +21,7 @@ const fn = (__filename, __dirname, require) => {
|
|
|
21
21
|
|
|
22
22
|
This rule aims to evaluate expressions `source` of `ImportDeclaration`:
|
|
23
23
|
|
|
24
|
-
Examples of **incorrect** code
|
|
24
|
+
Examples of **incorrect** code located in `hello.spec.js` for this rule:
|
|
25
25
|
|
|
26
26
|
```js
|
|
27
27
|
import {readFile} from '__putout_evaluate: `./` + basename(__filename).replace(`.spec.js`, `.js`)';
|
package/lib/index.js
CHANGED
|
@@ -83,11 +83,12 @@ const safe = {
|
|
|
83
83
|
'putout/putout': ['error', {
|
|
84
84
|
rules: {
|
|
85
85
|
'remove-empty': 'off',
|
|
86
|
+
'remove-unused-types': 'off',
|
|
86
87
|
'remove-unused-variables': 'off',
|
|
87
88
|
'remove-unused-expressions': 'off',
|
|
88
89
|
'remove-unused-for-of-variables': 'off',
|
|
89
|
-
'remove-skip': 'off',
|
|
90
|
-
'remove-only': 'off',
|
|
90
|
+
'tape/remove-skip': 'off',
|
|
91
|
+
'tape/remove-only': 'off',
|
|
91
92
|
'remove-console': 'off',
|
|
92
93
|
'remove-debugger': 'off',
|
|
93
94
|
'convert-for-to-for-of': 'off',
|
|
@@ -6,10 +6,10 @@ module.exports.report = () => 'Add new line before assertion';
|
|
|
6
6
|
const regexp = /;\n +?t\..*;\n +?t.end\(\);/;
|
|
7
7
|
|
|
8
8
|
module.exports.filter = ({text}) => {
|
|
9
|
-
if (!/^test
|
|
9
|
+
if (!/^test(\.only|\.skip)?\(/.test(text))
|
|
10
10
|
return false;
|
|
11
11
|
|
|
12
|
-
const assertions = text.match(
|
|
12
|
+
const assertions = text.match(/\st\..*/g);
|
|
13
13
|
|
|
14
14
|
if (!assertions)
|
|
15
15
|
return false;
|
|
@@ -21,7 +21,7 @@ module.exports.filter = ({text}) => {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
module.exports.fix = ({text}) => {
|
|
24
|
-
const [assertion] = text.match(
|
|
24
|
+
const [assertion] = text.match(/\st\..*/);
|
|
25
25
|
return text.replace(assertion, `\n${assertion}`);
|
|
26
26
|
};
|
|
27
27
|
|
package/lib/ts.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-putout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "eslint plugin for putout",
|
|
5
5
|
"release": false,
|
|
6
6
|
"tag": false,
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"watch:test": "madrun watch:test",
|
|
25
25
|
"lint": "madrun lint",
|
|
26
26
|
"lint:all": "madrun lint:all",
|
|
27
|
-
"lint:
|
|
27
|
+
"lint:safe": "madrun lint:safe",
|
|
28
28
|
"fresh:lint": "madrun fresh:lint",
|
|
29
29
|
"lint:fresh": "madrun lint:fresh",
|
|
30
30
|
"fix:lint": "madrun fix:lint",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"node": ">=14"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"eslint": ">=8.0.0
|
|
62
|
-
"putout": ">=
|
|
61
|
+
"eslint": ">=8.0.0",
|
|
62
|
+
"putout": ">=21"
|
|
63
63
|
},
|
|
64
64
|
"license": "MIT",
|
|
65
65
|
"publishConfig": {
|