eslint-plugin-nima 1.2.5 → 1.2.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.
@@ -0,0 +1,14 @@
1
+ import { RuleModule } from "@typescript-eslint/utils/ts-eslint";
2
+ export declare const name = "no-optional-call-expression";
3
+ export declare const enum Messages {
4
+ BAD_CALL_EXPRESSION = "BAD_CALL_EXPRESSION"
5
+ }
6
+ export type Options = [];
7
+ type ExtendedPluginProperties = {
8
+ recommended: boolean;
9
+ };
10
+ export declare const config: {
11
+ docs: ExtendedPluginProperties & RuleModule<Messages, Options>["meta"]["docs"];
12
+ } & Omit<RuleModule<Messages, Options>["meta"], "defaultOptions">;
13
+ export declare const defaultOptions: Options;
14
+ export {};
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultOptions = exports.config = exports.Messages = exports.name = void 0;
4
+ exports.name = "no-optional-call-expression";
5
+ var Messages;
6
+ (function (Messages) {
7
+ Messages["BAD_CALL_EXPRESSION"] = "BAD_CALL_EXPRESSION";
8
+ })(Messages || (exports.Messages = Messages = {}));
9
+ exports.config = {
10
+ docs: {
11
+ description: "Restricts the use of optional chaining in call expressions.",
12
+ recommended: false,
13
+ url: "https://github.com/NIMA-Enterprises/eslint-plugin-nima/blob/main/documentation/rules/no-optional-call-expression.md",
14
+ },
15
+ messages: {
16
+ [Messages.BAD_CALL_EXPRESSION]: "NIMA: Avoid using optional chaining on call expressions.",
17
+ },
18
+ schema: [],
19
+ type: "suggestion",
20
+ };
21
+ exports.defaultOptions = [];
22
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/rules/no-optional-call-expression/config.ts"],"names":[],"mappings":";;;AAEa,QAAA,IAAI,GAAG,6BAA6B,CAAC;AAElD,IAAkB,QAEjB;AAFD,WAAkB,QAAQ;IACtB,uDAA2C,CAAA;AAC/C,CAAC,EAFiB,QAAQ,wBAAR,QAAQ,QAEzB;AAQY,QAAA,MAAM,GAGiD;IAChE,IAAI,EAAE;QACF,WAAW,EACP,6DAA6D;QACjE,WAAW,EAAE,KAAK;QAClB,GAAG,EAAE,qHAAqH;KAC7H;IACD,QAAQ,EAAE;QACN,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAC1B,0DAA0D;KACjE;IACD,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,YAAY;CACrB,CAAC;AACW,QAAA,cAAc,GAAY,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { TSESTree } from "@typescript-eslint/utils";
2
+ import { RuleContext } from "@typescript-eslint/utils/ts-eslint";
3
+ import { Messages, type Options } from "./config";
4
+ export declare const create: (context: RuleContext<Messages, Options>) => {
5
+ CallExpression: (node: TSESTree.CallExpression) => void;
6
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.create = void 0;
4
+ const config_1 = require("./config");
5
+ const create = (context) => {
6
+ return {
7
+ CallExpression: (node) => {
8
+ if (node.optional) {
9
+ context.report({
10
+ messageId: config_1.Messages.BAD_CALL_EXPRESSION,
11
+ node,
12
+ });
13
+ }
14
+ },
15
+ };
16
+ };
17
+ exports.create = create;
18
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/rules/no-optional-call-expression/create.ts"],"names":[],"mappings":";;;AAGA,qCAAkD;AAE3C,MAAM,MAAM,GAAG,CAAC,OAAuC,EAAE,EAAE;IAC9D,OAAO;QACH,cAAc,EAAE,CAAC,IAA6B,EAAE,EAAE;YAC9C,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAChB,OAAO,CAAC,MAAM,CAAC;oBACX,SAAS,EAAE,iBAAQ,CAAC,mBAAmB;oBACvC,IAAI;iBACP,CAAC,CAAC;YACP,CAAC;QACL,CAAC;KACJ,CAAC;AACN,CAAC,CAAC;AAXW,QAAA,MAAM,UAWjB"}
@@ -0,0 +1,2 @@
1
+ export { config, Messages } from "./config";
2
+ export * from "./rule";
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Messages = exports.config = void 0;
18
+ var config_1 = require("./config");
19
+ Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_1.config; } });
20
+ Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return config_1.Messages; } });
21
+ __exportStar(require("./rule"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/no-optional-call-expression/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mCAA4C;AAAnC,gGAAA,MAAM,OAAA;AAAE,kGAAA,QAAQ,OAAA;AACzB,yCAAuB"}
@@ -0,0 +1,5 @@
1
+ import { Messages, name } from "./config";
2
+ export { name };
3
+ export declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<Messages, [], {
4
+ recommended: boolean;
5
+ }, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rule = exports.name = void 0;
4
+ const core_1 = require("../../utility/core");
5
+ const config_1 = require("./config");
6
+ Object.defineProperty(exports, "name", { enumerable: true, get: function () { return config_1.name; } });
7
+ const create_1 = require("./create");
8
+ exports.rule = (0, core_1.createRule)({
9
+ create: create_1.create,
10
+ defaultOptions: config_1.defaultOptions,
11
+ meta: config_1.config,
12
+ name: config_1.name,
13
+ });
14
+ //# sourceMappingURL=rule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule.js","sourceRoot":"","sources":["../../../src/rules/no-optional-call-expression/rule.ts"],"names":[],"mappings":";;;AAAA,wCAA2C;AAE3C,qCAAgF;AAGvE,qFAHkC,aAAI,OAGlC;AAFb,qCAAkC;AAIrB,QAAA,IAAI,GAAG,IAAA,iBAAU,EAAoB;IAC9C,MAAM,EAAN,eAAM;IACN,cAAc,EAAd,uBAAc;IACd,IAAI,EAAE,eAAM;IACZ,IAAI,EAAJ,aAAI;CACP,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-nima",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "ESLint plugin for NIMA Labs",
5
5
  "keywords": [
6
6
  "eslint",
@@ -67,7 +67,7 @@
67
67
  "eslint": "^9.0.0"
68
68
  },
69
69
  "engines": {
70
- "node": ">=24.0.0"
70
+ "node": ">=22.0.0"
71
71
  },
72
72
  "publishConfig": {
73
73
  "access": "public"