eslint-plugin-gb 9.0.0 → 9.1.0-1
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 +5 -8
- package/package.json +5 -2
- package/test.js +18 -0
package/configs/flat/base.js
CHANGED
package/configs/member-order.js
CHANGED
package/index.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const flatBase = require("./configs/flat/base.js");
|
|
3
|
+
const flatRecommended = require("./configs/flat/recommended.js");
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
import flatBase from "./configs/flat/base.js";
|
|
5
|
-
|
|
6
|
-
const pkg = JSON.parse(
|
|
7
|
-
fs.readFileSync(new URL("./package.json", import.meta.url), "utf8"),
|
|
8
|
-
);
|
|
5
|
+
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf8"));
|
|
9
6
|
|
|
10
7
|
const plugin = {
|
|
11
8
|
meta: {
|
|
@@ -43,4 +40,4 @@ const plugin = {
|
|
|
43
40
|
// ],
|
|
44
41
|
// });
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
module.exports = plugin;
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-gb",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.0-1",
|
|
4
4
|
"description": "ESLint rules I like",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "npx jest"
|
|
8
|
+
},
|
|
6
9
|
"peerDependencies": {
|
|
7
10
|
"eslint": "^9.9.0"
|
|
8
11
|
},
|
|
@@ -10,7 +13,7 @@
|
|
|
10
13
|
"type": "git",
|
|
11
14
|
"url": "git+https://github.com/GaryB432/eslint-plugin-gb.git"
|
|
12
15
|
},
|
|
13
|
-
"type": "
|
|
16
|
+
"type": "commonjs",
|
|
14
17
|
"keywords": [
|
|
15
18
|
"eslint",
|
|
16
19
|
"eslint-plugin",
|
package/test.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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 plugin names", () => {
|
|
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
|
+
});
|