eslint-plugin-nima 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.
Files changed (49) hide show
  1. package/package.json +29 -18
  2. package/dist/configs/recommended.d.ts +0 -5
  3. package/dist/configs/recommended.js +0 -8
  4. package/dist/configs/recommended.js.map +0 -1
  5. package/dist/constants/boolean-prefixes.d.ts +0 -1
  6. package/dist/constants/boolean-prefixes.js +0 -12
  7. package/dist/constants/boolean-prefixes.js.map +0 -1
  8. package/dist/constants/hooks.d.ts +0 -2
  9. package/dist/constants/hooks.js +0 -26
  10. package/dist/constants/hooks.js.map +0 -1
  11. package/dist/index.d.ts +0 -87
  12. package/dist/index.js +0 -44
  13. package/dist/index.js.map +0 -1
  14. package/dist/rules/boolean-naming-convention.d.ts +0 -9
  15. package/dist/rules/boolean-naming-convention.js +0 -307
  16. package/dist/rules/boolean-naming-convention.js.map +0 -1
  17. package/dist/rules/no-console-log.d.ts +0 -3
  18. package/dist/rules/no-console-log.js +0 -32
  19. package/dist/rules/no-console-log.js.map +0 -1
  20. package/dist/rules/no-console-warn.d.ts +0 -3
  21. package/dist/rules/no-console-warn.js +0 -32
  22. package/dist/rules/no-console-warn.js.map +0 -1
  23. package/dist/rules/no-console.error.d.ts +0 -3
  24. package/dist/rules/no-console.error.js +0 -32
  25. package/dist/rules/no-console.error.js.map +0 -1
  26. package/dist/rules/no-handler-suffix.d.ts +0 -3
  27. package/dist/rules/no-handler-suffix.js +0 -82
  28. package/dist/rules/no-handler-suffix.js.map +0 -1
  29. package/dist/rules/no-objects-in-deps.d.ts +0 -3
  30. package/dist/rules/no-objects-in-deps.js +0 -74
  31. package/dist/rules/no-objects-in-deps.js.map +0 -1
  32. package/dist/rules/params-naming-convention.d.ts +0 -8
  33. package/dist/rules/params-naming-convention.js +0 -92
  34. package/dist/rules/params-naming-convention.js.map +0 -1
  35. package/dist/rules/prefer-arrow-functions.d.ts +0 -10
  36. package/dist/rules/prefer-arrow-functions.js +0 -205
  37. package/dist/rules/prefer-arrow-functions.js.map +0 -1
  38. package/dist/rules/prefer-react-fc.d.ts +0 -6
  39. package/dist/rules/prefer-react-fc.js +0 -206
  40. package/dist/rules/prefer-react-fc.js.map +0 -1
  41. package/dist/rules/prefer-react-with-hooks.d.ts +0 -5
  42. package/dist/rules/prefer-react-with-hooks.js +0 -143
  43. package/dist/rules/prefer-react-with-hooks.js.map +0 -1
  44. package/dist/utility/getFunctionName.d.ts +0 -2
  45. package/dist/utility/getFunctionName.js +0 -33
  46. package/dist/utility/getFunctionName.js.map +0 -1
  47. package/dist/utility/getType.d.ts +0 -3
  48. package/dist/utility/getType.js +0 -21
  49. package/dist/utility/getType.js.map +0 -1
package/package.json CHANGED
@@ -1,48 +1,59 @@
1
1
  {
2
2
  "name": "eslint-plugin-nima",
3
- "type": "module",
4
- "version": "0.0.1",
3
+ "version": "0.0.2",
5
4
  "description": "ESLint plugin for NIMA Labs",
5
+ "keywords": [
6
+ "eslint",
7
+ "eslintplugin",
8
+ "eslint-plugin",
9
+ "nima"
10
+ ],
11
+ "repository": "NIMA-Enterprises/eslint-plugin",
6
12
  "author": "NIMA",
7
- "main": "dist/index.js",
8
- "types": "dist/index.d.ts",
13
+ "main": "lib/index.js",
14
+ "files": [
15
+ "/lib",
16
+ "README.md"
17
+ ],
18
+ "type": "commonjs",
9
19
  "scripts": {
10
20
  "build": "rm -rf dist && tsc --project tsconfig.build.json",
21
+ "check-types": "tsc --noEmit",
11
22
  "dev": "tsc --watch",
12
23
  "lint": "eslint .",
13
24
  "lint:fix": "eslint . --fix",
14
- "check-types": "tsc --noEmit",
15
- "validate": "pnpm lint:fix && pnpm check-types",
16
- "prepare": "husky"
25
+ "prepare": "husky",
26
+ "test": "jest",
27
+ "validate": "pnpm lint:fix && pnpm check-types"
17
28
  },
18
- "exports": {
19
- ".": "./dist/index.js"
29
+ "dependencies": {
30
+ "@typescript-eslint/utils": "^8.40.0",
31
+ "ts-node": "^10.9.2"
20
32
  },
21
- "files": [
22
- "dist",
23
- "README.md"
24
- ],
25
33
  "devDependencies": {
26
34
  "@eslint/core": "^0.15.2",
27
35
  "@eslint/js": "^9.32.0",
36
+ "@types/jest": "^30.0.0",
28
37
  "@types/node": "^24.3.0",
29
38
  "@typescript-eslint/rule-tester": "^8.40.0",
30
39
  "eslint-plugin-perfectionist": "^4.15.0",
31
40
  "globals": "^16.3.0",
32
41
  "husky": "^9.1.7",
42
+ "jest": "^30.0.5",
33
43
  "jiti": "^2.5.1",
44
+ "ts-jest": "^29.4.1",
34
45
  "typescript": "^5.9.2",
35
46
  "typescript-eslint": "^8.39.0"
36
47
  },
37
- "dependencies": {
38
- "@typescript-eslint/utils": "^8.40.0"
39
- },
40
48
  "peerDependencies": {
41
49
  "eslint": "^9.0.0"
42
50
  },
43
51
  "engines": {
44
52
  "node": ">=16.0.0"
45
53
  },
46
- "packageManager": "pnpm@8.9.0",
47
- "license": "MIT"
54
+ "publishConfig": {
55
+ "access": "public"
56
+ },
57
+ "license": "MIT",
58
+ "packageManager": "pnpm@8.9.0"
48
59
  }
@@ -1,5 +0,0 @@
1
- import type { FlatConfig } from "@typescript-eslint/utils/ts-eslint";
2
- import type { RuleKey } from "../index.js";
3
- export declare const recommended: {
4
- [K in RuleKey as `dragonswap/${K}`]?: FlatConfig.RuleLevel;
5
- };
@@ -1,8 +0,0 @@
1
- export const recommended = {
2
- "dragonswap/no-console-error": "error",
3
- "dragonswap/no-console-log": "error",
4
- "dragonswap/no-console-warn": "error",
5
- "dragonswap/no-handler-suffix": "error",
6
- "dragonswap/prefer-react-fc": "warn",
7
- };
8
- //# sourceMappingURL=recommended.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recommended.js","sourceRoot":"","sources":["../../src/configs/recommended.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,WAAW,GAEpB;IACF,6BAA6B,EAAE,OAAO;IACtC,2BAA2B,EAAE,OAAO;IACpC,4BAA4B,EAAE,OAAO;IACrC,8BAA8B,EAAE,OAAO;IACvC,4BAA4B,EAAE,MAAM;CACrC,CAAC"}
@@ -1 +0,0 @@
1
- export declare const DEFAULT_PREFIXES: string[];
@@ -1,12 +0,0 @@
1
- export const DEFAULT_PREFIXES = [
2
- "is",
3
- "has",
4
- "can",
5
- "should",
6
- "will",
7
- "are",
8
- "were",
9
- "was",
10
- "is",
11
- ];
12
- //# sourceMappingURL=boolean-prefixes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boolean-prefixes.js","sourceRoot":"","sources":["../../src/constants/boolean-prefixes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI;IACJ,KAAK;IACL,KAAK;IACL,QAAQ;IACR,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,IAAI;CACL,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const REACT_HOOKS: Set<string>;
2
- export declare const HOOKS_WITH_DEPS: Set<string>;
@@ -1,26 +0,0 @@
1
- export const REACT_HOOKS = new Set([
2
- "use",
3
- "useCallback",
4
- "useContext",
5
- "useDebugValue",
6
- "useDeferredValue",
7
- "useEffect",
8
- "useId",
9
- "useImperativeHandle",
10
- "useInsertionEffect",
11
- "useLayoutEffect",
12
- "useMemo",
13
- "useReducer",
14
- "useRef",
15
- "useState",
16
- "useSyncExternalStore",
17
- "useTransition",
18
- ]);
19
- export const HOOKS_WITH_DEPS = new Set([
20
- "useCallback",
21
- "useEffect",
22
- "useInsertionEffect",
23
- "useLayoutEffect",
24
- "useMemo",
25
- ]);
26
- //# sourceMappingURL=hooks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/constants/hooks.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IACjC,KAAK;IACL,aAAa;IACb,YAAY;IACZ,eAAe;IACf,kBAAkB;IAClB,WAAW;IACX,OAAO;IACP,qBAAqB;IACrB,oBAAoB;IACpB,iBAAiB;IACjB,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,sBAAsB;IACtB,eAAe;CAChB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IACrC,aAAa;IACb,WAAW;IACX,oBAAoB;IACpB,iBAAiB;IACjB,SAAS;CACV,CAAC,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,87 +0,0 @@
1
- import type { RuleModule } from "@typescript-eslint/utils/ts-eslint";
2
- import type { ESLint, Linter } from "eslint";
3
- declare const rules: {
4
- "boolean-naming-convention": RuleModule<"booleanFunctionName" | "booleanParameterName" | "booleanPropertyName" | "booleanVariableName", [{
5
- allowedPrefixes: string[];
6
- checkFunctions: boolean;
7
- checkParameters: boolean;
8
- checkProperties: boolean;
9
- checkVariables: boolean;
10
- }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
11
- "no-console-error": RuleModule<"noConsole", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
12
- "no-console-log": RuleModule<"noConsole", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
13
- "no-console-warn": RuleModule<"noConsole", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
14
- "no-handler-suffix": RuleModule<"badHandleName", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
15
- "no-objects-in-deps": RuleModule<"noObjects", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
16
- "params-naming-convention": RuleModule<"useObjectParams", [{
17
- allowedParameters: number;
18
- ignore: string[];
19
- ignoreFunctions: string[];
20
- ignorePrefixes: string[];
21
- }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
22
- "prefer-arrow-functions": RuleModule<"preferArrowFunction" | "preferArrowFunctionExpression" | "preferArrowMethod", [{
23
- allowAsync: boolean;
24
- allowConstructors: boolean;
25
- allowFunctionDeclarations: boolean;
26
- allowFunctionExpressions: boolean;
27
- allowGenerators: boolean;
28
- allowMethodDefinitions: boolean;
29
- }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
30
- "prefer-react-fc": RuleModule<"addReactImport" | "requireReactFC", [{
31
- allowArrowFunctions: boolean;
32
- allowFunctionDeclarations: boolean;
33
- }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
34
- "prefer-react-with-hooks": RuleModule<"preferReact" | "preferReactPrefix", [{
35
- autoFix: boolean;
36
- }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
37
- };
38
- export type RuleKey = keyof typeof rules;
39
- interface Plugin extends Omit<ESLint.Plugin, "rules"> {
40
- configs: {
41
- "flat/recommended": Linter.Config;
42
- recommended: ESLint.ConfigData;
43
- };
44
- rules: Record<RuleKey, RuleModule<any, any, any>>;
45
- }
46
- declare const plugin: {
47
- configs: Plugin["configs"];
48
- meta: {
49
- name: string;
50
- };
51
- rules: {
52
- "boolean-naming-convention": RuleModule<"booleanFunctionName" | "booleanParameterName" | "booleanPropertyName" | "booleanVariableName", [{
53
- allowedPrefixes: string[];
54
- checkFunctions: boolean;
55
- checkParameters: boolean;
56
- checkProperties: boolean;
57
- checkVariables: boolean;
58
- }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
59
- "no-console-error": RuleModule<"noConsole", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
60
- "no-console-log": RuleModule<"noConsole", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
61
- "no-console-warn": RuleModule<"noConsole", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
62
- "no-handler-suffix": RuleModule<"badHandleName", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
63
- "no-objects-in-deps": RuleModule<"noObjects", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
64
- "params-naming-convention": RuleModule<"useObjectParams", [{
65
- allowedParameters: number;
66
- ignore: string[];
67
- ignoreFunctions: string[];
68
- ignorePrefixes: string[];
69
- }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
70
- "prefer-arrow-functions": RuleModule<"preferArrowFunction" | "preferArrowFunctionExpression" | "preferArrowMethod", [{
71
- allowAsync: boolean;
72
- allowConstructors: boolean;
73
- allowFunctionDeclarations: boolean;
74
- allowFunctionExpressions: boolean;
75
- allowGenerators: boolean;
76
- allowMethodDefinitions: boolean;
77
- }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
78
- "prefer-react-fc": RuleModule<"addReactImport" | "requireReactFC", [{
79
- allowArrowFunctions: boolean;
80
- allowFunctionDeclarations: boolean;
81
- }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
82
- "prefer-react-with-hooks": RuleModule<"preferReact" | "preferReactPrefix", [{
83
- autoFix: boolean;
84
- }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
85
- };
86
- };
87
- export default plugin;
package/dist/index.js DELETED
@@ -1,44 +0,0 @@
1
- import { recommended } from "./configs/recommended.js";
2
- import * as BooleanNamingConvention from "./rules/boolean-naming-convention.js";
3
- import * as NoConsoleLog from "./rules/no-console-log.js";
4
- import * as NoConsoleWarn from "./rules/no-console-warn.js";
5
- import * as NoConsoleError from "./rules/no-console.error.js";
6
- import * as NoHandlerSuffix from "./rules/no-handler-suffix.js";
7
- import * as NoObjectsInDeps from "./rules/no-objects-in-deps.js";
8
- import * as ParamsNamingConvention from "./rules/params-naming-convention.js";
9
- import * as PreferArrowFunctions from "./rules/prefer-arrow-functions.js";
10
- import * as PreferReactFc from "./rules/prefer-react-fc.js";
11
- import * as PreferReactWithHooks from "./rules/prefer-react-with-hooks.js";
12
- const rules = {
13
- [BooleanNamingConvention.name]: BooleanNamingConvention.rule,
14
- [NoConsoleError.name]: NoConsoleError.rule,
15
- [NoConsoleLog.name]: NoConsoleLog.rule,
16
- [NoConsoleWarn.name]: NoConsoleWarn.rule,
17
- [NoHandlerSuffix.name]: NoHandlerSuffix.rule,
18
- [NoObjectsInDeps.name]: NoObjectsInDeps.rule,
19
- [ParamsNamingConvention.name]: ParamsNamingConvention.rule,
20
- [PreferArrowFunctions.name]: PreferArrowFunctions.rule,
21
- [PreferReactFc.name]: PreferReactFc.rule,
22
- [PreferReactWithHooks.name]: PreferReactWithHooks.rule,
23
- };
24
- const plugin = {
25
- configs: {},
26
- meta: {
27
- name: "eslint-plugin-dragonswap",
28
- },
29
- rules,
30
- };
31
- Object.assign(plugin.configs, {
32
- "flat/recommended": {
33
- plugins: {
34
- dragonswap: plugin,
35
- },
36
- rules: recommended,
37
- },
38
- recommended: {
39
- plugins: ["dragonswap"],
40
- rules: recommended,
41
- },
42
- });
43
- export default plugin;
44
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,uBAAuB,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,YAAY,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,eAAe,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,sBAAsB,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,oBAAoB,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,aAAa,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,oBAAoB,MAAM,oCAAoC,CAAC;AAE3E,MAAM,KAAK,GAAG;IACZ,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,uBAAuB,CAAC,IAAI;IAC5D,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC,IAAI;IAC1C,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,IAAI;IACtC,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,IAAI;IACxC,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC,IAAI;IAC5C,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC,IAAI;IAC5C,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC,IAAI;IAC1D,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,oBAAoB,CAAC,IAAI;IACtD,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,IAAI;IACxC,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,oBAAoB,CAAC,IAAI;CACvD,CAAC;AAYF,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,EAAuB;IAEhC,IAAI,EAAE;QACJ,IAAI,EAAE,0BAA0B;KACjC;IAED,KAAK;CACN,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;IAC5B,kBAAkB,EAAE;QAClB,OAAO,EAAE;YACP,UAAU,EAAE,MAAM;SACnB;QACD,KAAK,EAAE,WAAW;KACnB;IACD,WAAW,EAAE;QACX,OAAO,EAAE,CAAC,YAAY,CAAC;QACvB,KAAK,EAAE,WAAW;KACnB;CACF,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -1,9 +0,0 @@
1
- import { ESLintUtils } from "@typescript-eslint/utils";
2
- export declare const name = "boolean-naming-convention";
3
- export declare const rule: ESLintUtils.RuleModule<"booleanFunctionName" | "booleanParameterName" | "booleanPropertyName" | "booleanVariableName", [{
4
- allowedPrefixes: string[];
5
- checkFunctions: boolean;
6
- checkParameters: boolean;
7
- checkProperties: boolean;
8
- checkVariables: boolean;
9
- }], unknown, ESLintUtils.RuleListener>;
@@ -1,307 +0,0 @@
1
- import { AST_NODE_TYPES, ESLintUtils, } from "@typescript-eslint/utils";
2
- import { DEFAULT_PREFIXES } from "../constants/boolean-prefixes.js";
3
- import { getType } from "../utility/getType.js";
4
- export const name = "boolean-naming-convention";
5
- export const rule = ESLintUtils.RuleCreator.withoutDocs({
6
- create: (context, options) => {
7
- var _a;
8
- const allowedPrefixes = options[0].allowedPrefixes;
9
- const checkVariables = options[0].checkVariables;
10
- const checkFunctions = options[0].checkFunctions;
11
- const checkParameters = options[0].checkParameters;
12
- const checkProperties = options[0].checkProperties;
13
- const services = context.sourceCode.parserServices;
14
- const checker = (_a = services === null || services === void 0 ? void 0 : services.program) === null || _a === void 0 ? void 0 : _a.getTypeChecker();
15
- function hasValidBooleanPrefix(name) {
16
- return allowedPrefixes === null || allowedPrefixes === void 0 ? void 0 : allowedPrefixes.some((prefix) => name.toLowerCase().startsWith(prefix.toLowerCase()));
17
- }
18
- function generateSuggestion(name) {
19
- return name.charAt(0).toUpperCase() + name.slice(1);
20
- }
21
- function isBooleanType(node) {
22
- try {
23
- const type = getType(context, node);
24
- return type === "boolean" || type === "true" || type === "false";
25
- }
26
- catch {
27
- return false;
28
- }
29
- }
30
- const isParamBoolean = (node) => {
31
- var _a;
32
- for (const param of node.params) {
33
- if (param.type === AST_NODE_TYPES.Identifier &&
34
- ((_a = param.typeAnnotation) === null || _a === void 0 ? void 0 : _a.typeAnnotation.type) ===
35
- AST_NODE_TYPES.TSBooleanKeyword) {
36
- const name = param.name;
37
- if (!hasValidBooleanPrefix(name)) {
38
- context.report({
39
- data: {
40
- name,
41
- suggestion: generateSuggestion(name),
42
- },
43
- messageId: "booleanParameterName",
44
- node: param,
45
- });
46
- }
47
- }
48
- }
49
- };
50
- function functionReturnsBooleanType(node) {
51
- var _a;
52
- try {
53
- const tsNode = (_a = services === null || services === void 0 ? void 0 : services.esTreeNodeToTSNodeMap) === null || _a === void 0 ? void 0 : _a.get(node);
54
- if (!tsNode)
55
- return false;
56
- const signature = checker === null || checker === void 0 ? void 0 : checker.getSignatureFromDeclaration(tsNode);
57
- if (signature && checker) {
58
- const returnType = checker.getReturnTypeOfSignature(signature);
59
- const returnTypeString = checker.typeToString(returnType);
60
- return (returnTypeString === "boolean" ||
61
- returnTypeString === "true" ||
62
- returnTypeString === "false");
63
- }
64
- return false;
65
- }
66
- catch {
67
- return false;
68
- }
69
- }
70
- return {
71
- ArrowFunctionExpression(node) {
72
- if (checkParameters) {
73
- isParamBoolean(node);
74
- }
75
- },
76
- FunctionDeclaration: (node) => {
77
- if (!checkFunctions)
78
- return;
79
- if (node.id && functionReturnsBooleanType(node)) {
80
- const name = node.id.name;
81
- if (!hasValidBooleanPrefix(name)) {
82
- context.report({
83
- data: {
84
- name,
85
- suggestion: generateSuggestion(name),
86
- },
87
- messageId: "booleanFunctionName",
88
- node: node.id,
89
- });
90
- }
91
- }
92
- if (checkParameters) {
93
- isParamBoolean(node);
94
- }
95
- },
96
- FunctionExpression(node) {
97
- if (checkParameters) {
98
- isParamBoolean(node);
99
- }
100
- },
101
- ObjectExpression: (node) => {
102
- if (!checkProperties)
103
- return;
104
- for (const prop of node.properties) {
105
- if (prop.type === AST_NODE_TYPES.Property &&
106
- prop.key.type === AST_NODE_TYPES.Identifier &&
107
- !prop.computed &&
108
- prop.value) {
109
- if (isBooleanType(prop.value)) {
110
- const name = prop.key.name;
111
- if (!hasValidBooleanPrefix(name)) {
112
- context.report({
113
- data: {
114
- name,
115
- suggestion: generateSuggestion(name),
116
- },
117
- messageId: "booleanPropertyName",
118
- node: prop.key,
119
- });
120
- }
121
- }
122
- }
123
- }
124
- },
125
- Property: (node) => {
126
- var _a;
127
- if (!checkParameters)
128
- return;
129
- if (node.key.type === AST_NODE_TYPES.Identifier &&
130
- node.value.type === AST_NODE_TYPES.Identifier &&
131
- ((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === AST_NODE_TYPES.ObjectPattern) {
132
- let current = node.parent;
133
- while (current && current.type !== AST_NODE_TYPES.Identifier) {
134
- current = current.parent;
135
- }
136
- let param = node.parent;
137
- while (param && param.parent) {
138
- if (param.parent.type === AST_NODE_TYPES.ArrowFunctionExpression ||
139
- param.parent.type === AST_NODE_TYPES.FunctionExpression ||
140
- param.parent.type === AST_NODE_TYPES.FunctionDeclaration) {
141
- break;
142
- }
143
- param = param.parent;
144
- }
145
- if (param && "typeAnnotation" in param && param.typeAnnotation) {
146
- const typeAnnotation = param.typeAnnotation;
147
- if (typeAnnotation.typeAnnotation.type ===
148
- AST_NODE_TYPES.TSTypeLiteral) {
149
- const typeLiteral = typeAnnotation.typeAnnotation;
150
- const propertyType = typeLiteral.members.find((member) => {
151
- var _a, _b;
152
- if (member.type === AST_NODE_TYPES.TSPropertySignature &&
153
- ((_a = member.key) === null || _a === void 0 ? void 0 : _a.type) === AST_NODE_TYPES.Identifier &&
154
- member.key.name ===
155
- node.key.name) {
156
- return (((_b = member.typeAnnotation) === null || _b === void 0 ? void 0 : _b.typeAnnotation.type) ===
157
- AST_NODE_TYPES.TSBooleanKeyword);
158
- }
159
- return false;
160
- });
161
- if (propertyType) {
162
- const name = node.value.name;
163
- if (!hasValidBooleanPrefix(name)) {
164
- context.report({
165
- data: {
166
- name,
167
- suggestion: generateSuggestion(name),
168
- },
169
- messageId: "booleanParameterName",
170
- node: node.value,
171
- });
172
- }
173
- }
174
- }
175
- }
176
- }
177
- },
178
- VariableDeclarator: (node) => {
179
- var _a;
180
- if (node.id.type === "ObjectPattern") {
181
- if (!checkParameters)
182
- return;
183
- if (node.id.type === AST_NODE_TYPES.ObjectPattern && node.init) {
184
- node.id.properties.forEach((prop) => {
185
- var _a;
186
- if (prop.type === AST_NODE_TYPES.Property &&
187
- prop.key.type === AST_NODE_TYPES.Identifier &&
188
- prop.value.type === AST_NODE_TYPES.Identifier) {
189
- const valueName = prop.value.name;
190
- try {
191
- const tsNode = (_a = services === null || services === void 0 ? void 0 : services.esTreeNodeToTSNodeMap) === null || _a === void 0 ? void 0 : _a.get(prop.value);
192
- if (tsNode && checker) {
193
- const type = checker.getTypeAtLocation(tsNode);
194
- const typeString = checker.typeToString(type);
195
- if (typeString === "boolean" ||
196
- typeString === "true" ||
197
- typeString === "false") {
198
- if (!hasValidBooleanPrefix(valueName)) {
199
- context.report({
200
- data: {
201
- name: valueName,
202
- suggestion: generateSuggestion(valueName),
203
- },
204
- messageId: "booleanVariableName",
205
- node: prop.value,
206
- });
207
- }
208
- }
209
- }
210
- }
211
- catch { }
212
- }
213
- });
214
- }
215
- }
216
- if (!checkVariables)
217
- return;
218
- if (node.id.type === AST_NODE_TYPES.Identifier) {
219
- if (((_a = node.id.typeAnnotation) === null || _a === void 0 ? void 0 : _a.typeAnnotation.type) ===
220
- AST_NODE_TYPES.TSBooleanKeyword) {
221
- const name = node.id.name;
222
- if (!hasValidBooleanPrefix(name)) {
223
- context.report({
224
- data: {
225
- name,
226
- suggestion: generateSuggestion(name),
227
- },
228
- messageId: "booleanVariableName",
229
- node: node.id,
230
- });
231
- }
232
- return;
233
- }
234
- if (node.init) {
235
- if ((node.init.type === AST_NODE_TYPES.ArrowFunctionExpression ||
236
- node.init.type === AST_NODE_TYPES.FunctionExpression) &&
237
- functionReturnsBooleanType(node.init)) {
238
- const name = node.id.name;
239
- if (!hasValidBooleanPrefix(name)) {
240
- context.report({
241
- data: {
242
- name,
243
- suggestion: generateSuggestion(name),
244
- },
245
- messageId: "booleanFunctionName",
246
- node: node.id,
247
- });
248
- }
249
- }
250
- else if (isBooleanType(node.init)) {
251
- const name = node.id.name;
252
- if (!hasValidBooleanPrefix(name)) {
253
- context.report({
254
- data: {
255
- name,
256
- suggestion: generateSuggestion(name),
257
- },
258
- messageId: "booleanVariableName",
259
- node: node.id,
260
- });
261
- }
262
- }
263
- }
264
- }
265
- },
266
- };
267
- },
268
- defaultOptions: [
269
- {
270
- allowedPrefixes: DEFAULT_PREFIXES,
271
- checkFunctions: true,
272
- checkParameters: true,
273
- checkProperties: true,
274
- checkVariables: true,
275
- },
276
- ],
277
- meta: {
278
- docs: {
279
- description: "Enforces boolean variables to use appropriate prefixes (is, has, can, should, etc.)",
280
- },
281
- messages: {
282
- booleanFunctionName: "DragonSwap: Function '{{name}}' returns a boolean, use a prefix like is{{suggestion}}}",
283
- booleanParameterName: "DragonSwap: Boolean parameter '{{name}}' should use a prefix like is{{suggestion}}}",
284
- booleanPropertyName: "DragonSwap: Boolean property '{{name}}' should use a prefix like is{{suggestion}}}",
285
- booleanVariableName: "DragonSwap: Boolean variable '{{name}}' should use a prefix like is{{suggestion}}}",
286
- },
287
- schema: [
288
- {
289
- additionalProperties: false,
290
- properties: {
291
- allowedPrefixes: {
292
- default: DEFAULT_PREFIXES,
293
- items: { type: "string" },
294
- type: "array",
295
- },
296
- checkFunctions: { default: true, type: "boolean" },
297
- checkParameters: { default: true, type: "boolean" },
298
- checkProperties: { default: true, type: "boolean" },
299
- checkVariables: { default: true, type: "boolean" },
300
- },
301
- type: "object",
302
- },
303
- ],
304
- type: "suggestion",
305
- },
306
- });
307
- //# sourceMappingURL=boolean-naming-convention.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boolean-naming-convention.js","sourceRoot":"","sources":["../../src/rules/boolean-naming-convention.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,GAEZ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,MAAM,CAAC,MAAM,IAAI,GAAG,2BAA2B,CAAC;AAEhD,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC;IACtD,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;;QAC3B,MAAM,eAAe,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC;QACnD,MAAM,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;QACjD,MAAM,cAAc,GAAG,OAAO,CAAC,CAA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AI,EAAE,SAAS,EAAE;iBACnD;gBACD,IAAI,EAAE,QAAQ;aACf;SACF;QACD,IAAI,EAAE,YAAY;KACnB;CACF,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { ESLintUtils } from "@typescript-eslint/utils";
2
- export declare const name = "no-console-log";
3
- export declare const rule: ESLintUtils.RuleModule<"noConsole", [], unknown, ESLintUtils.RuleListener>;