-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.js
More file actions
51 lines (49 loc) · 1.56 KB
/
index.js
File metadata and controls
51 lines (49 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* @license MIT
* @author Martin Giger
*/
import fromMap from "./rules/from-map.js";
import noUnnecessaryThisArgument from "./rules/no-unnecessary-this-arg.js";
import preferArrayFrom from "./rules/prefer-array-from.js";
import avoidReverse from "./rules/avoid-reverse.js";
import preferFlatMap from "./rules/prefer-flat-map.js";
import preferFlat from "./rules/prefer-flat.js";
const arrayFunctions = {
meta: {
name: "eslint-plugin-array-func",
version: "5.0.1",
namespace: "array-func",
},
rules: {
"from-map": fromMap,
"no-unnecessary-this-arg": noUnnecessaryThisArgument,
"prefer-array-from": preferArrayFrom,
"avoid-reverse": avoidReverse,
"prefer-flat-map": preferFlatMap,
"prefer-flat": preferFlat,
},
configs: {},
};
arrayFunctions.configs.recommended = {
name: 'array-func/recommended',
plugins: { "array-func": arrayFunctions },
rules: {
"array-func/from-map": "error",
"array-func/no-unnecessary-this-arg": "error",
"array-func/prefer-array-from": "error",
"array-func/avoid-reverse": "error",
},
};
arrayFunctions.configs.all = {
name: 'array-func/all',
plugins: { "array-func": arrayFunctions },
rules: {
"array-func/from-map": "error",
"array-func/no-unnecessary-this-arg": "error",
"array-func/prefer-array-from": "error",
"array-func/avoid-reverse": "error",
"array-func/prefer-flat-map": "error",
"array-func/prefer-flat": "error",
},
};
export default arrayFunctions;