Skip to content

Commit

Permalink
feat: support eslint 9
Browse files Browse the repository at this point in the history
 Add flat config preset
  • Loading branch information
Smrtnyk committed Dec 24, 2024
1 parent 4d8658c commit b32e8eb
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
"use strict";

module.exports = {
configs: {
"getify-says": {
plugins: [ "@getify/proper-arrows", ],
rules: {
"@getify/proper-arrows/params": [ "error", { "unused": "trailing", "count": 2, "length": 3, "allowed": [ "e", "v", "cb", "fn", "pr", ], }, ],
"@getify/proper-arrows/name": "error",
"@getify/proper-arrows/return": [ "error", { "ternary": 1, }, ],
"@getify/proper-arrows/where": "error",
"@getify/proper-arrows/this": [ "error", "nested", { "no-global": true, }, ],
},
},
},
var recommendedRulesConfig = {
"@getify/proper-arrows/params": [ "error", { "unused": "trailing", "count": 2, "length": 3, "allowed": [ "e", "v", "cb", "fn", "pr", ], }, ],
"@getify/proper-arrows/name": "error",
"@getify/proper-arrows/return": [ "error", { "ternary": 1, }, ],
"@getify/proper-arrows/where": "error",
"@getify/proper-arrows/this": [ "error", "nested", { "no-global": true, }, ],
}

var plugin = {
rules: {
"params": {
meta: {
Expand Down Expand Up @@ -636,6 +632,20 @@ module.exports = {
},
};

plugin.configs = {
"getify-says": {
plugins: [ "@getify/proper-arrows", ],
rules: recommendedRulesConfig,
},
"getify-says/flat": {
name: "getify-says/flat",
plugins: {
"@getify/proper-arrows": plugin
},
rules: recommendedRulesConfig,
},
};


// ***************************

Expand Down Expand Up @@ -837,3 +847,5 @@ var getAncestors = (context, sourceCode, node) => {
);
return getAncestors(context, sourceCode, node);
};

module.exports = plugin;

0 comments on commit b32e8eb

Please sign in to comment.