Skip to content

Commit 0f28e10

Browse files
committed
chore: migrate to flat config
1 parent 28020d7 commit 0f28e10

22 files changed

+2204
-1142
lines changed

.eslintrc.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

eslint.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import freaktechnikConfigNode from "@freaktechnik/eslint-config-node";
2+
import freaktechnikConfigTest from "@freaktechnik/eslint-config-test";
3+
import eslintPlugin from "eslint-plugin-eslint-plugin";
4+
5+
export default [
6+
...freaktechnikConfigNode,
7+
eslintPlugin.configs["flat/recommended"],
8+
freaktechnikConfigTest,
9+
{
10+
files: ["**"],
11+
rules: {
12+
"unicorn/prefer-module": "off"
13+
}
14+
},
15+
{
16+
files: ["test/rules/*.mjs"],
17+
...eslintPlugin.configs["flat/tests-recommended"]
18+
}
19+
];

index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ import preferFlat from "./rules/prefer-flat.js";
1212
const index = {
1313
meta: {
1414
name: "eslint-plugin-array-func",
15-
version: "5.0.1"
15+
version: "5.0.1",
1616
},
1717
rules: {
1818
"from-map": fromMap,
1919
"no-unnecessary-this-arg": noUnnecessaryThisArgument,
2020
"prefer-array-from": preferArrayFrom,
2121
"avoid-reverse": avoidReverse,
2222
"prefer-flat-map": preferFlatMap,
23-
"prefer-flat": preferFlat
23+
"prefer-flat": preferFlat,
2424
},
25-
configs: {}
25+
configs: {},
2626
};
2727
index.configs.recommended = {
2828
plugins: { "array-func": index },
2929
rules: {
3030
"array-func/from-map": "error",
3131
"array-func/no-unnecessary-this-arg": "error",
3232
"array-func/prefer-array-from": "error",
33-
"array-func/avoid-reverse": "error"
34-
}
33+
"array-func/avoid-reverse": "error",
34+
},
3535
};
3636
index.configs.all = {
3737
plugins: { "array-func": index },
@@ -41,8 +41,8 @@ index.configs.all = {
4141
"array-func/prefer-array-from": "error",
4242
"array-func/avoid-reverse": "error",
4343
"array-func/prefer-flat-map": "error",
44-
"array-func/prefer-flat": "error"
45-
}
44+
"array-func/prefer-flat": "error",
45+
},
4646
};
4747

4848
export default index;

0 commit comments

Comments
 (0)