eslint-plugin-function 0.0.5 → 0.0.7

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/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # eslint-plugin-function
2
+
3
+ The ESLint plugin for function-related rules.
4
+
5
+ > [!WARNING]
6
+ > This package is a work in progress and is not yet ready for production use.
7
+
8
+ ## Installation
9
+
10
+ ```sh
11
+ # npm
12
+ npm install --save-dev eslint-plugin-function
13
+ ```
14
+
15
+ ## Configure ESLint
16
+
17
+ ```js
18
+ // eslint.config.js
19
+
20
+ // @ts-check
21
+ import eslintJs from "@eslint/js";
22
+ import tseslint from "typescript-eslint";
23
+ import pluginFunction from "eslint-plugin-function";
24
+
25
+ export default tseslint.config({
26
+ files: ["**/*.ts", "**/*.tsx"],
27
+ extends: [
28
+ eslintJs.configs.recommended,
29
+ tseslint.configs.recommended,
30
+ ],
31
+ plugins: {
32
+ function: pluginFunction,
33
+ },
34
+ languageOptions: {
35
+ parser: tseslint.parser,
36
+ parserOptions: {
37
+ project: "./tsconfig.json",
38
+ },
39
+ },
40
+ rules: {
41
+ // Enforce functions matching the given pattern always return a boolean value
42
+ "function/function-return-boolean": ["error", { pattern: "/^(is|has|should)/" }],
43
+ },
44
+ });
45
+ ```
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ declare const _default: {
6
6
  readonly version: string;
7
7
  };
8
8
  readonly rules: {
9
- readonly "function-definition": _typescript_eslint_utils_ts_eslint.RuleModule<CamelCase<"function-definition">, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
9
+ readonly "function-definition": _typescript_eslint_utils_ts_eslint.RuleModule<"functionDefinition", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
10
10
  readonly "function-return-boolean": _typescript_eslint_utils_ts_eslint.RuleModule<"functionReturnBoolean", readonly [{
11
11
  readonly pattern?: string;
12
12
  } | undefined], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { AST_NODE_TYPES } from '@typescript-eslint/types';
9
9
 
10
10
  // package.json
11
11
  var name = "eslint-plugin-function";
12
- var version = "0.0.5";
12
+ var version = "0.0.7";
13
13
  function getDocsUrl() {
14
14
  return "TODO: add docs for local ESLint rules";
15
15
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eslint-plugin-function",
3
- "version": "0.0.5",
4
- "description": "ESLint plugin for function",
3
+ "version": "0.0.7",
4
+ "description": "(WIP) The ESLint plugin for function-related rules.",
5
5
  "sideEffects": false,
6
6
  "type": "module",
7
7
  "exports": {