-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.js
50 lines (48 loc) · 1.48 KB
/
index.js
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
/**
* @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 index = {
meta: {
name: "eslint-plugin-array-func",
version: "5.0.1",
},
rules: {
"from-map": fromMap,
"no-unnecessary-this-arg": noUnnecessaryThisArgument,
"prefer-array-from": preferArrayFrom,
"avoid-reverse": avoidReverse,
"prefer-flat-map": preferFlatMap,
"prefer-flat": preferFlat,
},
configs: {},
};
index.configs.recommended = {
name: 'array-func/recommended',
plugins: { "array-func": index },
rules: {
"array-func/from-map": "error",
"array-func/no-unnecessary-this-arg": "error",
"array-func/prefer-array-from": "error",
"array-func/avoid-reverse": "error",
},
};
index.configs.all = {
name: 'array-func/all',
plugins: { "array-func": index },
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 index;