eslint-plugin-putout 14.7.0 → 14.9.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
@@ -154,3 +154,7 @@ Disabled 🐊**Putout** rules:
154
154
  ### safe+align
155
155
 
156
156
  When you want to enable ability to align spaces on empty lines, while have all benefits of `safe` preset: use `safe+align`.
157
+
158
+ ## License
159
+
160
+ MIT
package/lib/markdown.js CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  const parserOpts = require('@putout/engine-parser/babel/options');
4
+ const parserPlugins = require('@putout/engine-parser/babel/plugins');
4
5
  const [ts] = require('./ts');
5
6
 
6
7
  const commonRules = {
7
8
  'no-undef': 'off',
8
- 'no-multi-spaces': 'off',
9
9
  'no-empty': 'off',
10
10
  'eol-last': 'off',
11
11
  'no-unreachable': 'off',
@@ -28,7 +28,10 @@ module.exports = [{
28
28
  requireConfigFile: false,
29
29
  babelOptions: {
30
30
  sourceType: 'module',
31
- parserOpts,
31
+ parserOpts: {
32
+ ...parserOpts,
33
+ plugins: parserPlugins,
34
+ },
32
35
  plugins: [
33
36
  '@babel/plugin-syntax-class-properties',
34
37
  ],
@@ -60,7 +60,16 @@ module.exports = {
60
60
  return EMPTY_VISITORS;
61
61
  }
62
62
 
63
- const places = findPlaces(ast, text, resultOptions);
63
+ const [error, places = []] = tryCatch(findPlaces, ast, text, resultOptions);
64
+
65
+ if (error) {
66
+ context.report({
67
+ message: `${parseError(error)} (putout)`,
68
+ node,
69
+ });
70
+
71
+ return EMPTY_VISITORS;
72
+ }
64
73
 
65
74
  for (const {rule, message, position} of places) {
66
75
  context.report({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-putout",
3
- "version": "14.7.0",
3
+ "version": "14.9.0",
4
4
  "type": "commonjs",
5
5
  "description": "eslint plugin for putout",
6
6
  "release": false,