eslint-plugin-function-rule 0.0.1 → 0.0.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.
@@ -0,0 +1,28 @@
1
+ import * as _eslint_core0 from "@eslint/core";
2
+ import { RuleDefinition } from "@eslint/core";
3
+
4
+ //#region index.d.ts
5
+ declare function functionRule(create: RuleDefinition["create"]): {
6
+ rules: {
7
+ "function-rule": {
8
+ meta: {
9
+ fixable: string;
10
+ hasSuggestions: boolean;
11
+ };
12
+ create: (context: _eslint_core0.RuleContext<{
13
+ LangOptions: _eslint_core0.LanguageOptions;
14
+ Code: _eslint_core0.SourceCode<{
15
+ LangOptions: _eslint_core0.LanguageOptions;
16
+ RootNode: unknown;
17
+ SyntaxElementWithLoc: unknown;
18
+ ConfigNode: unknown;
19
+ }>;
20
+ RuleOptions: unknown[];
21
+ Node: unknown;
22
+ MessageIds: string;
23
+ }>) => _eslint_core0.RuleVisitor;
24
+ };
25
+ };
26
+ };
27
+ //#endregion
28
+ export { functionRule as default };
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ //#region index.ts
2
+ function functionRule(create) {
3
+ return { rules: { "function-rule": {
4
+ meta: {
5
+ fixable: "code",
6
+ hasSuggestions: true
7
+ },
8
+ create
9
+ } } };
10
+ }
11
+
12
+ //#endregion
13
+ export { functionRule as default };
package/package.json CHANGED
@@ -1,12 +1,29 @@
1
1
  {
2
2
  "name": "eslint-plugin-function-rule",
3
- "version": "0.0.1",
4
- "module": "index.ts",
3
+ "version": "0.0.2",
4
+ "license": "MIT",
5
+ "sideEffects": false,
5
6
  "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "package.json"
16
+ ],
6
17
  "dependencies": {
7
18
  "@eslint/core": "^0.17.0"
8
19
  },
20
+ "devDependencies": {
21
+ "tsdown": "^0.16.1"
22
+ },
9
23
  "peerDependencies": {
10
24
  "typescript": "^5"
25
+ },
26
+ "scripts": {
27
+ "build": "tsdown"
11
28
  }
12
29
  }
package/index.ts DELETED
@@ -1,15 +0,0 @@
1
- import type { RuleDefinition } from "@eslint/core"
2
-
3
- export default function functionRule(create: RuleDefinition["create"]) {
4
- return {
5
- rules: {
6
- "function-rule": {
7
- meta: {
8
- fixable: "code",
9
- hasSuggestions: true,
10
- },
11
- create
12
- }
13
- }
14
- }
15
- }
package/tsconfig.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- // Environment setup & latest features
4
- "lib": ["ESNext"],
5
- "target": "ESNext",
6
- "module": "Preserve",
7
- "moduleDetection": "force",
8
- "allowJs": true,
9
-
10
- // Bundler mode
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- "verbatimModuleSyntax": true,
14
- "noEmit": true,
15
-
16
- // Best practices
17
- "strict": true,
18
- "skipLibCheck": true,
19
- "noFallthroughCasesInSwitch": true,
20
- "noUncheckedIndexedAccess": true,
21
- "noImplicitOverride": true,
22
-
23
- // Some stricter flags (disabled by default)
24
- "noUnusedLocals": false,
25
- "noUnusedParameters": false,
26
- "noPropertyAccessFromIndexSignature": false
27
- }
28
- }