eslint-plugin-putout 10.4.0 → 10.5.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.
@@ -4,6 +4,7 @@ Evaluate expression started with `__putout_evaluate: `.
4
4
  Provided code is processed with [`@putout/plugin-declare-undefined-variables`](https://github.com/coderaiser/putout/tree/master/packages/plugin-declare-undefined-variables). So next code:
5
5
 
6
6
  ```js
7
+ import {join} from 'path';
7
8
  __putout_evaluate: join("hello", " ", "world");
8
9
  ```
9
10
 
@@ -20,15 +21,15 @@ const fn = (__filename, __dirname, require) => {
20
21
 
21
22
  This rule aims to evaluate expressions `source` of `ImportDeclaration`:
22
23
 
23
- Examples of **incorrect** code for this rule:
24
+ Examples of **incorrect** code locaed in `hello.spec.js` for this rule:
24
25
 
25
26
  ```js
26
- import {password} from '__putout_evaluate: join("hello", " ", "world")';
27
+ import {readFile} from '__putout_evaluate: `./` + basename(__filename).replace(`.spec.js`, `.js`)';
28
+
27
29
  ```
28
30
 
29
31
  Examples of **correct** code for this rule:
30
32
 
31
33
  ```js
32
- import {password} from 'hello world';
34
+ import {readFile} from './hello.js';
33
35
  ```
34
-
package/lib/ts.js CHANGED
@@ -11,6 +11,7 @@ module.exports = [{
11
11
  },
12
12
  rules: {
13
13
  'no-undef': 'off',
14
+ 'no-var': 'off',
14
15
  },
15
16
  }];
16
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-putout",
3
- "version": "10.4.0",
3
+ "version": "10.5.0",
4
4
  "description": "eslint plugin for putout",
5
5
  "release": false,
6
6
  "tag": false,
@@ -51,7 +51,8 @@
51
51
  "mocha": "^9.0.1",
52
52
  "montag": "^1.0.0",
53
53
  "simport": "^1.2.0",
54
- "supertape": "^6.6.0"
54
+ "supertape": "^6.6.0",
55
+ "try-to-catch": "^3.0.0"
55
56
  },
56
57
  "engines": {
57
58
  "node": ">=14"