|
1 | 1 | "use strict";
|
2 | 2 |
|
3 |
| -module.exports = { |
4 |
| - configs: { |
5 |
| - "getify-says": { |
6 |
| - plugins: [ "@getify/proper-arrows", ], |
7 |
| - rules: { |
8 |
| - "@getify/proper-arrows/params": [ "error", { "unused": "trailing", "count": 2, "length": 3, "allowed": [ "e", "v", "cb", "fn", "pr", ], }, ], |
9 |
| - "@getify/proper-arrows/name": "error", |
10 |
| - "@getify/proper-arrows/return": [ "error", { "ternary": 1, }, ], |
11 |
| - "@getify/proper-arrows/where": "error", |
12 |
| - "@getify/proper-arrows/this": [ "error", "nested", { "no-global": true, }, ], |
13 |
| - }, |
14 |
| - }, |
15 |
| - }, |
| 3 | +var recommendedRulesConfig = { |
| 4 | + "@getify/proper-arrows/params": [ "error", { "unused": "trailing", "count": 2, "length": 3, "allowed": [ "e", "v", "cb", "fn", "pr", ], }, ], |
| 5 | + "@getify/proper-arrows/name": "error", |
| 6 | + "@getify/proper-arrows/return": [ "error", { "ternary": 1, }, ], |
| 7 | + "@getify/proper-arrows/where": "error", |
| 8 | + "@getify/proper-arrows/this": [ "error", "nested", { "no-global": true, }, ], |
| 9 | +} |
| 10 | + |
| 11 | +var plugin = { |
16 | 12 | rules: {
|
17 | 13 | "params": {
|
18 | 14 | meta: {
|
@@ -636,6 +632,20 @@ module.exports = {
|
636 | 632 | },
|
637 | 633 | };
|
638 | 634 |
|
| 635 | +plugin.configs = { |
| 636 | + "getify-says": { |
| 637 | + plugins: [ "@getify/proper-arrows", ], |
| 638 | + rules: recommendedRulesConfig, |
| 639 | + }, |
| 640 | + "getify-says/flat": { |
| 641 | + name: "getify-says/flat", |
| 642 | + plugins: { |
| 643 | + "@getify/proper-arrows": plugin |
| 644 | + }, |
| 645 | + rules: recommendedRulesConfig, |
| 646 | + }, |
| 647 | +}; |
| 648 | + |
639 | 649 |
|
640 | 650 | // ***************************
|
641 | 651 |
|
@@ -837,3 +847,5 @@ var getAncestors = (context, sourceCode, node) => {
|
837 | 847 | );
|
838 | 848 | return getAncestors(context, sourceCode, node);
|
839 | 849 | };
|
| 850 | + |
| 851 | +module.exports = plugin; |
0 commit comments