From 52a5cb08d4a7793a53555adbfedda3b0c8633fe6 Mon Sep 17 00:00:00 2001 From: meowbmw Date: Tue, 15 Jul 2025 14:06:24 +0800 Subject: [PATCH 1/2] clean up for publish --- .../sample_eslint.config.mjs => eslint.config.publish.mjs | 3 +-- package.json | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) rename sample_config/sample_eslint.config.mjs => eslint.config.publish.mjs (92%) diff --git a/sample_config/sample_eslint.config.mjs b/eslint.config.publish.mjs similarity index 92% rename from sample_config/sample_eslint.config.mjs rename to eslint.config.publish.mjs index bcb185e..a71b550 100644 --- a/sample_config/sample_eslint.config.mjs +++ b/eslint.config.publish.mjs @@ -2,12 +2,11 @@ import tsParser from "@typescript-eslint/parser"; import tseslint from "typescript-eslint"; // Import the local plugin using ES Module syntax -import localPlugin from "../index.js"; // Assumes index.js is the entry point +import localPlugin from "./index.js"; // Assumes index.js is the entry point import { dirname } from "node:path"; import { fileURLToPath } from "node:url"; // Sample configuration file for the rule -// ! This configuration file is provided as example and path needs to be modified before use (check path in the code below). // Usage: // npx eslint --config "$CONFIG_FILE" "${TARGET_DIR}/**/*.ts" diff --git a/package.json b/package.json index e00413b..a601a6d 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,8 @@ "main": "index.js", "files": [ "dist", + "!dist/tests", + "eslint.config.publish.mjs", "index.js", "README.md", "LICENSE" From 5d2251e8c58d6e8f79917f88158a1755ea3e55f1 Mon Sep 17 00:00:00 2001 From: meowbmw Date: Tue, 15 Jul 2025 14:16:53 +0800 Subject: [PATCH 2/2] up doc --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 109c25d..a6d1906 100644 --- a/Readme.md +++ b/Readme.md @@ -29,7 +29,7 @@ Optimizes code for better WebAssembly performance: ## Configuration -See `sample_config/sample_eslint.config.mjs` for a detailed example of how to configure and use this plugin. +See `eslint.config.publish.mjs` for a detailed example of how to configure and use this plugin. It includes some other pre-written rules including: