@kazupon/eslint-plugin 0.1.1 → 0.1.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/lib/index.d.ts +13 -3
- package/lib/index.js +6 -13
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import { ESLint } from "eslint";
|
|
1
|
+
import { ESLint, Linter } from "eslint";
|
|
2
2
|
|
|
3
3
|
//#region src/index.d.ts
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type PluginConfigs = {
|
|
5
|
+
recommended: Linter.Config<Linter.RulesRecord>[]
|
|
6
|
+
comment: Linter.Config<Linter.RulesRecord>[]
|
|
7
|
+
};
|
|
8
|
+
declare const plugin: Omit<ESLint.Plugin, "configs"> & {
|
|
9
|
+
configs: PluginConfigs
|
|
10
|
+
};
|
|
11
|
+
declare const commentConfig: Linter.Config[];
|
|
12
|
+
declare const configs: {
|
|
13
|
+
recommended: typeof commentConfig
|
|
14
|
+
comment: typeof commentConfig
|
|
15
|
+
};
|
|
6
16
|
|
|
7
17
|
//#endregion
|
|
8
18
|
export { configs, plugin as default, plugin };
|
package/lib/index.js
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { parseComment } from "@es-joy/jsdoccomment";
|
|
2
|
-
import fs from "node:fs";
|
|
3
2
|
|
|
4
|
-
//#region src/utils/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/utils/meta.ts
|
|
11
|
-
const pkg = readPackageJson(new URL("../../package.json", import.meta.url));
|
|
12
|
-
const name = pkg.name;
|
|
13
|
-
const version = pkg.version;
|
|
14
|
-
const namespace = pkg.name.split("/")[0];
|
|
3
|
+
//#region src/utils/constants.ts
|
|
4
|
+
const name = "@kazupon/eslint-plugin";
|
|
5
|
+
const version = "0.1.2";
|
|
6
|
+
const namespace = "@kazupon";
|
|
15
7
|
|
|
16
8
|
//#endregion
|
|
17
9
|
//#region src/utils/rule.ts
|
|
@@ -169,7 +161,8 @@ const plugin = {
|
|
|
169
161
|
name,
|
|
170
162
|
version
|
|
171
163
|
},
|
|
172
|
-
rules
|
|
164
|
+
rules,
|
|
165
|
+
configs: {}
|
|
173
166
|
};
|
|
174
167
|
const commentConfig = [{
|
|
175
168
|
name: "@kazupon/eslint-plugin/comment",
|