eslint-plugin-gb 9.1.0-0 → 9.1.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configs/flat/base.js +2 -2
- package/configs/flat/recommended.js +5 -2
- package/configs/member-order.js +1 -1
- package/index.js +4 -7
- package/package.json +4 -1
- package/test.js +25 -0
package/configs/flat/base.js
CHANGED
package/configs/member-order.js
CHANGED
package/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import flatRecommended from "./configs/flat/recommended.js";
|
|
1
|
+
const flatBase = require("./configs/flat/base.js");
|
|
2
|
+
const flatRecommended = require("./configs/flat/recommended.js");
|
|
4
3
|
|
|
5
|
-
const pkg =
|
|
6
|
-
fs.readFileSync(new URL("./package.json", import.meta.url), "utf8")
|
|
7
|
-
);
|
|
4
|
+
const pkg = require("./package.json");
|
|
8
5
|
|
|
9
6
|
const plugin = {
|
|
10
7
|
meta: {
|
|
@@ -42,4 +39,4 @@ const plugin = {
|
|
|
42
39
|
// ],
|
|
43
40
|
// });
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
module.exports = plugin;
|
package/package.json
CHANGED
package/test.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const plugin = require("./index");
|
|
2
|
+
|
|
3
|
+
describe("plugin", () => {
|
|
4
|
+
it("has correct plugin names", () => {
|
|
5
|
+
expect(Object.keys(plugin.configs).sort()).toEqual([
|
|
6
|
+
"flat/base",
|
|
7
|
+
"flat/recommended",
|
|
8
|
+
]);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it("has correct config name", () => {
|
|
12
|
+
const rec = plugin.configs["flat/recommended"];
|
|
13
|
+
expect(rec[0]).toEqual({
|
|
14
|
+
name: "gb/recommended/rules",
|
|
15
|
+
rules: expect.any(Object),
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it("has correct plugin meta", () => {
|
|
20
|
+
expect(plugin.meta).toEqual({
|
|
21
|
+
name: "eslint-plugin-gb",
|
|
22
|
+
version: expect.any(String),
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
});
|