@putout/eslint 1.5.0 β†’ 1.6.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 CHANGED
@@ -35,7 +35,7 @@ const [source, places] = await eslint({
35
35
 
36
36
  Isn't it looks similar to 🐊**Putout** way? It definitely is! But... It has a couple differences you should remember:
37
37
 
38
- - ☝️ *[🐊**Putout** returns object with `code` and `places` properties](https://github.com/coderaiser/putout#plugins).*
38
+ - ☝️ *[🐊**Putout** returns object with `code` and `places` properties](https://github.com/coderaiser/putout#plugins), and **ESLint* returns a tuple**
39
39
  - ☝️ ***ESLint** has a `name` property that is used to calculate configuration file.*
40
40
 
41
41
  And you can even override any of **ESLint** βš™οΈ options with help of `config` property:
@@ -53,7 +53,7 @@ const [source, places] = await eslint({
53
53
  });
54
54
  ```
55
55
 
56
- If you want to apply 🐊**Putout** transformations using [`putout/putout`](https://github.com/coderaiser/putout/tree/master/packages/eslint-plugin-putout#readme) **ESLint** rule, enable 🐊**Putout** with the same called flag lowercased:
56
+ If you want to apply 🐊**Putout** transformations using [`putout/putout`](https://github.com/coderaiser/putout/tree/master/packages/eslint-plugin-putout#readme) **ESLint** rule, enable 🐊**Putout** with the same called but lowercased flag:
57
57
 
58
58
  ```js
59
59
  const [source, places] = await eslint({
@@ -153,6 +153,7 @@ When you need to run **ESLint** with one plugin (*rule*), just use `lint` it wil
153
153
 
154
154
  ```js
155
155
  const lint = require('@putout/eslint/lint');
156
+ const {createPlugin} = require('@putout/eslint/create-plugin');
156
157
  const removeDebugger = require('./remove-debugger');
157
158
 
158
159
  const [code, places] = lint('debugger', {
package/lib/eslint.js CHANGED
@@ -6,6 +6,7 @@ const tryToCatch = require('try-to-catch');
6
6
  const {keys} = Object;
7
7
  const eslintId = ' (eslint)';
8
8
  const overrideConfigFile = process.env.ESLINT_CONFIG_FILE;
9
+ const noESLint = process.env.NO_ESLINT;
9
10
 
10
11
  const noConfigFound = (config, configError) => {
11
12
  if (configError && configError.messageTemplate === 'no-config-found')
@@ -30,6 +31,9 @@ module.exports = async ({name, code, fix, config, putout = false}) => {
30
31
  [],
31
32
  ];
32
33
 
34
+ if (noESLint)
35
+ return noChanges;
36
+
33
37
  const [, ESLint] = await tryToCatch(simpleImport, './get-eslint.mjs');
34
38
 
35
39
  if (!ESLint)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/eslint",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Wrapper that simplifies ESLint API and makes it compatible with 🐊Putout",
@@ -43,13 +43,13 @@
43
43
  "eslint-plugin-n": "^15.2.4",
44
44
  "eslint-plugin-putout": "^16.0.0",
45
45
  "just-camel-case": "^4.0.2",
46
- "lerna": "^5.0.0",
46
+ "lerna": "^6.0.1",
47
47
  "madrun": "^9.0.0",
48
48
  "mock-require": "^3.0.3",
49
49
  "montag": "^1.0.0",
50
50
  "nodemon": "^2.0.1",
51
51
  "putout": "*",
52
- "supertape": "^7.0.0",
52
+ "supertape": "^8.0.0",
53
53
  "try-catch": "^3.0.0"
54
54
  },
55
55
  "license": "MIT",