@noctcore/eslint-utils 0.1.0 → 0.1.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/dist/index.cjs CHANGED
@@ -28,10 +28,8 @@ module.exports = __toCommonJS(index_exports);
28
28
 
29
29
  // src/createRule.ts
30
30
  var import_utils = require("@typescript-eslint/utils");
31
- var REPO = "https://github.com/noctcore/eslint-plugins";
32
- var makeCreateRule = (domain) => import_utils.ESLintUtils.RuleCreator(
33
- (ruleName) => `${REPO}/blob/main/packages/eslint-plugin-${domain}/docs/rules/${ruleName}.md`
34
- );
31
+ var DOCS = "https://noctcore.github.io/eslint-plugins";
32
+ var makeCreateRule = (domain) => import_utils.ESLintUtils.RuleCreator((ruleName) => `${DOCS}/rules/${domain}/${ruleName}/`);
35
33
 
36
34
  // src/index.ts
37
35
  var import_utils2 = require("@typescript-eslint/utils");
package/dist/index.d.cts CHANGED
@@ -4,9 +4,11 @@ export { AST_NODE_TYPES, ESLintUtils, TSESLint, TSESTree } from '@typescript-esl
4
4
  /**
5
5
  * Build a typed `RuleCreator` for a `@noctcore` plugin package.
6
6
  *
7
- * `domain` is the plugin's short name (e.g. `react`, `architecture`). It is
8
- * cosmetic it only points each rule's docs URL at
9
- * `packages/eslint-plugin-<domain>/docs/rules/<rule>.md`.
7
+ * `domain` is the plugin's short name (e.g. `react`, `architecture`), the part
8
+ * of the package name after `eslint-plugin-`. It only shapes each rule's docs
9
+ * URL, which points at the rule's page on the docs site:
10
+ * `https://noctcore.github.io/eslint-plugins/rules/<domain>/<rule>/`. That page
11
+ * is generated from `packages/eslint-plugin-<domain>/docs/rules/<rule>.md`.
10
12
  *
11
13
  * ```ts
12
14
  * // packages/eslint-plugin-react/src/createRule.ts
package/dist/index.d.ts CHANGED
@@ -4,9 +4,11 @@ export { AST_NODE_TYPES, ESLintUtils, TSESLint, TSESTree } from '@typescript-esl
4
4
  /**
5
5
  * Build a typed `RuleCreator` for a `@noctcore` plugin package.
6
6
  *
7
- * `domain` is the plugin's short name (e.g. `react`, `architecture`). It is
8
- * cosmetic it only points each rule's docs URL at
9
- * `packages/eslint-plugin-<domain>/docs/rules/<rule>.md`.
7
+ * `domain` is the plugin's short name (e.g. `react`, `architecture`), the part
8
+ * of the package name after `eslint-plugin-`. It only shapes each rule's docs
9
+ * URL, which points at the rule's page on the docs site:
10
+ * `https://noctcore.github.io/eslint-plugins/rules/<domain>/<rule>/`. That page
11
+ * is generated from `packages/eslint-plugin-<domain>/docs/rules/<rule>.md`.
10
12
  *
11
13
  * ```ts
12
14
  * // packages/eslint-plugin-react/src/createRule.ts
package/dist/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  // src/createRule.ts
2
2
  import { ESLintUtils } from "@typescript-eslint/utils";
3
- var REPO = "https://github.com/noctcore/eslint-plugins";
4
- var makeCreateRule = (domain) => ESLintUtils.RuleCreator(
5
- (ruleName) => `${REPO}/blob/main/packages/eslint-plugin-${domain}/docs/rules/${ruleName}.md`
6
- );
3
+ var DOCS = "https://noctcore.github.io/eslint-plugins";
4
+ var makeCreateRule = (domain) => ESLintUtils.RuleCreator((ruleName) => `${DOCS}/rules/${domain}/${ruleName}/`);
7
5
 
8
6
  // src/index.ts
9
7
  import { AST_NODE_TYPES, ESLintUtils as ESLintUtils2 } from "@typescript-eslint/utils";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noctcore/eslint-utils",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Shared rule-creator and AST helpers for @noctcore ESLint plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,9 +15,15 @@
15
15
  },
16
16
  "./package.json": "./package.json"
17
17
  },
18
- "files": ["dist"],
18
+ "files": [
19
+ "dist"
20
+ ],
19
21
  "sideEffects": false,
20
- "keywords": ["eslint", "noctcore", "eslint-utils"],
22
+ "keywords": [
23
+ "eslint",
24
+ "noctcore",
25
+ "eslint-utils"
26
+ ],
21
27
  "publishConfig": {
22
28
  "access": "public",
23
29
  "provenance": true