eslint-plugin-svelte-5-doctor 0.1.0

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.
@@ -0,0 +1,4 @@
1
+
2
+ > eslint-plugin-svelte-5-doctor@0.1.0 build C:\Users\admin\Documents\Default Project\svelte-doctor\packages\eslint-plugin-svelte-doctor
3
+ > tsc -p tsconfig.json
4
+
@@ -0,0 +1,20 @@
1
+ export declare const plugin: {
2
+ meta: {
3
+ name: string;
4
+ version: string;
5
+ };
6
+ rules: Record<string, unknown>;
7
+ configs: {
8
+ recommended: {
9
+ plugins: string[];
10
+ rules: Record<string, string>;
11
+ };
12
+ flatRecommended: {
13
+ plugins: {
14
+ "svelte-doctor": never;
15
+ };
16
+ rules: Record<string, string>;
17
+ };
18
+ };
19
+ };
20
+ export default plugin;
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ /**
2
+ * eslint-plugin-svelte-doctor — ported from eslint-plugin-react-doctor
3
+ * ESLint flat-config wrapper of svelte-plugin-svelte-doctor rules.
4
+ */
5
+ import { SVELTE_DOCTOR_RULES } from "svelte-5-doctor-core";
6
+ const rules = Object.fromEntries(SVELTE_DOCTOR_RULES.map((r) => [
7
+ r.id.replace("svelte-doctor/", ""),
8
+ {
9
+ meta: { docs: { description: r.description, category: r.category }, severity: r.severity },
10
+ create() { return {}; },
11
+ },
12
+ ]));
13
+ const recommendedRules = Object.fromEntries(SVELTE_DOCTOR_RULES.filter((r) => r.severity !== "off").map((r) => [r.id, r.severity]));
14
+ export const plugin = {
15
+ meta: { name: "eslint-plugin-svelte-5-doctor", version: "0.1.0" },
16
+ rules,
17
+ configs: {
18
+ recommended: { plugins: ["svelte-doctor"], rules: recommendedRules },
19
+ flatRecommended: {
20
+ plugins: { "svelte-doctor": { rules } },
21
+ rules: recommendedRules,
22
+ },
23
+ },
24
+ };
25
+ export default plugin;
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "eslint-plugin-svelte-5-doctor",
3
+ "version": "0.1.0",
4
+ "description": "ESLint plugin for Svelte 5 Doctor — flat config wrapper (port of eslint-plugin-react-doctor). Renamed for svelte-5-doctor publish.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "dependencies": {
9
+ "svelte-plugin-svelte-5-doctor": "0.1.0",
10
+ "svelte-5-doctor-core": "0.1.0"
11
+ },
12
+ "devDependencies": {
13
+ "typescript": "^5.9.2"
14
+ },
15
+ "peerDependencies": {
16
+ "eslint": ">=8.0.0"
17
+ },
18
+ "scripts": {
19
+ "build": "tsc -p tsconfig.json",
20
+ "typecheck": "tsc -p tsconfig.json --noEmit"
21
+ }
22
+ }
package/src/index.ts ADDED
@@ -0,0 +1,33 @@
1
+ /**
2
+ * eslint-plugin-svelte-doctor — ported from eslint-plugin-react-doctor
3
+ * ESLint flat-config wrapper of svelte-plugin-svelte-doctor rules.
4
+ */
5
+ import { SVELTE_DOCTOR_RULES } from "svelte-5-doctor-core";
6
+
7
+ const rules: Record<string, unknown> = Object.fromEntries(
8
+ SVELTE_DOCTOR_RULES.map((r) => [
9
+ r.id.replace("svelte-doctor/", ""),
10
+ {
11
+ meta: { docs: { description: r.description, category: r.category }, severity: r.severity },
12
+ create() { return {}; },
13
+ },
14
+ ])
15
+ );
16
+
17
+ const recommendedRules: Record<string, string> = Object.fromEntries(
18
+ SVELTE_DOCTOR_RULES.filter((r) => r.severity !== "off").map((r) => [r.id, r.severity])
19
+ );
20
+
21
+ export const plugin = {
22
+ meta: { name: "eslint-plugin-svelte-5-doctor", version: "0.1.0" },
23
+ rules,
24
+ configs: {
25
+ recommended: { plugins: ["svelte-doctor"], rules: recommendedRules },
26
+ flatRecommended: {
27
+ plugins: { "svelte-doctor": { rules } as unknown as never },
28
+ rules: recommendedRules,
29
+ },
30
+ },
31
+ };
32
+
33
+ export default plugin;
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "rootDir": "src",
6
+ "module": "ESNext",
7
+ "moduleResolution": "bundler"
8
+ },
9
+ "include": ["src"]
10
+ }