@checkdigit/eslint-plugin 6.6.0-PR.79-5f54 → 6.6.0-PR.79-1cec

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.
@@ -25,7 +25,7 @@ __export(src_exports, {
25
25
  module.exports = __toCommonJS(src_exports);
26
26
 
27
27
  // package.json
28
- var package_default = { name: "@checkdigit/eslint-plugin", version: "6.6.0-PR.79-5f54", description: "Check Digit eslint plugins", keywords: ["eslint", "eslintplugin"], homepage: "https://github.com/checkdigit/eslint-plugin#readme", bugs: { url: "https://github.com/checkdigit/eslint-plugin/issues" }, repository: { type: "git", url: "https://github.com/checkdigit/eslint-plugin" }, license: "MIT", author: "Check Digit, LLC", sideEffects: false, type: "module", exports: { ".": { types: "./dist-types/index.d.ts", require: "./dist-cjs/index.cjs", import: "./dist-mjs/index.mjs", default: "./dist-mjs/index.mjs" } }, files: ["src", "dist-types", "dist-cjs", "dist-mjs", "!src/**/*.test.ts", "!src/**/*.spec.ts", "!dist-types/**/*.test.d.ts", "!dist-types/**/*.spec.d.ts", "!dist-cjs/**/*.test.cjs", "!dist-cjs/**/*.spec.cjs", "!dist-mjs/**/*.test.mjs", "!dist-mjs/**/*.spec.mjs", "SECURITY.md"], scripts: { "build:dist-cjs": 'rimraf dist-cjs && npx builder --type=commonjs --sourceMap --entryPoint=index.ts --outDir=dist-cjs --outFile=index.cjs --external=espree && echo "module.exports = module.exports.default;" >> dist-cjs/index.cjs && node dist-cjs/index.cjs', "build:dist-mjs": "rimraf dist-mjs && npx builder --type=module --sourceMap --outDir=dist-mjs && node dist-mjs/index.mjs", "build:dist-types": "rimraf dist-types && npx builder --type=types --outDir=dist-types", "ci:compile": "tsc --noEmit", "ci:coverage": 'NODE_OPTIONS="--disable-warning ExperimentalWarning --experimental-vm-modules" jest --coverage=true', "ci:lint": "npm run lint", "ci:style": "npm run prettier", "ci:test": 'NODE_OPTIONS="--disable-warning ExperimentalWarning --experimental-vm-modules" jest --coverage=false', lint: "eslint --max-warnings 0 --ignore-path .gitignore .", "lint:fix": "eslint --ignore-path .gitignore . --fix", prepublishOnly: "npm run build:dist-types && npm run build:dist-cjs && npm run build:dist-mjs", prettier: "prettier --ignore-path .gitignore --list-different .", "prettier:fix": "prettier --ignore-path .gitignore --write .", test: "npm run ci:compile && npm run ci:test && npm run ci:lint && npm run ci:style" }, prettier: "@checkdigit/prettier-config", jest: { preset: "@checkdigit/jest-config" }, devDependencies: { "@checkdigit/jest-config": "^6.0.2", "@checkdigit/prettier-config": "^5.5.0", "@checkdigit/typescript-config": "6.0.0", "@types/eslint": "8.56.10", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "@typescript-eslint/rule-tester": "7.18.0", "@typescript-eslint/utils": "7.18.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-eslint-plugin": "^6.2.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-no-only-tests": "^3.1.0", "eslint-plugin-no-secrets": "^1.0.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-sonarjs": "0.24.0", "http-status-codes": "^2.3.0" }, peerDependencies: { eslint: ">=8 <9" }, engines: { node: ">=20.14" } };
28
+ var package_default = { name: "@checkdigit/eslint-plugin", version: "6.6.0-PR.79-1cec", description: "Check Digit eslint plugins", keywords: ["eslint", "eslintplugin"], homepage: "https://github.com/checkdigit/eslint-plugin#readme", bugs: { url: "https://github.com/checkdigit/eslint-plugin/issues" }, repository: { type: "git", url: "https://github.com/checkdigit/eslint-plugin" }, license: "MIT", author: "Check Digit, LLC", sideEffects: false, type: "module", exports: { ".": { types: "./dist-types/index.d.ts", require: "./dist-cjs/index.cjs", import: "./dist-mjs/index.mjs", default: "./dist-mjs/index.mjs" } }, files: ["src", "dist-types", "dist-cjs", "dist-mjs", "!src/**/*.test.ts", "!src/**/*.spec.ts", "!dist-types/**/*.test.d.ts", "!dist-types/**/*.spec.d.ts", "!dist-cjs/**/*.test.cjs", "!dist-cjs/**/*.spec.cjs", "!dist-mjs/**/*.test.mjs", "!dist-mjs/**/*.spec.mjs", "SECURITY.md"], scripts: { "build:dist-cjs": 'rimraf dist-cjs && npx builder --type=commonjs --sourceMap --entryPoint=index.ts --outDir=dist-cjs --outFile=index.cjs --external=espree && echo "module.exports = module.exports.default;" >> dist-cjs/index.cjs && node dist-cjs/index.cjs', "build:dist-mjs": "rimraf dist-mjs && npx builder --type=module --sourceMap --outDir=dist-mjs && node dist-mjs/index.mjs", "build:dist-types": "rimraf dist-types && npx builder --type=types --outDir=dist-types", "ci:compile": "tsc --noEmit", "ci:coverage": 'NODE_OPTIONS="--disable-warning ExperimentalWarning --experimental-vm-modules" jest --coverage=true', "ci:lint": "npm run lint", "ci:style": "npm run prettier", "ci:test": 'NODE_OPTIONS="--disable-warning ExperimentalWarning --experimental-vm-modules" jest --coverage=false', lint: "eslint --max-warnings 0 --ignore-path .gitignore .", "lint:fix": "eslint --ignore-path .gitignore . --fix", prepublishOnly: "npm run build:dist-types && npm run build:dist-cjs && npm run build:dist-mjs", prettier: "prettier --ignore-path .gitignore --list-different .", "prettier:fix": "prettier --ignore-path .gitignore --write .", test: "npm run ci:compile && npm run ci:test && npm run ci:lint && npm run ci:style" }, prettier: "@checkdigit/prettier-config", jest: { preset: "@checkdigit/jest-config" }, devDependencies: { "@checkdigit/jest-config": "^6.0.2", "@checkdigit/prettier-config": "^5.5.0", "@checkdigit/typescript-config": "6.0.0", "@types/eslint": "8.56.10", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "@typescript-eslint/rule-tester": "7.18.0", "@typescript-eslint/utils": "7.18.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-eslint-plugin": "^6.2.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-no-only-tests": "^3.1.0", "eslint-plugin-no-secrets": "^1.0.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-sonarjs": "0.24.0", "http-status-codes": "^2.3.0" }, peerDependencies: { eslint: ">=8 <9" }, engines: { node: ">=20.14" } };
29
29
 
30
30
  // src/get-documentation-url.ts
31
31
  function getDocumentationUrl(ruleId3) {
@@ -1,5 +1,5 @@
1
1
  // src/no-enum.ts
2
- import { ESLintUtils } from "@typescript-eslint/utils";
2
+ import { ESLintUtils, TSESTree } from "@typescript-eslint/utils";
3
3
  var ruleId = "no-enum";
4
4
  var NO_ENUM = "NO_ENUM";
5
5
  var createRule = ESLintUtils.RuleCreator((name) => name);
@@ -23,6 +23,14 @@ var rule = createRule({
23
23
  node,
24
24
  messageId: NO_ENUM
25
25
  });
26
+ },
27
+ Property(node) {
28
+ if (node.key.type === TSESTree.AST_NODE_TYPES.Identifier && node.key.name === "enum" && node.value.type === TSESTree.AST_NODE_TYPES.ArrayExpression) {
29
+ context.report({
30
+ node,
31
+ messageId: NO_ENUM
32
+ });
33
+ }
26
34
  }
27
35
  };
28
36
  }
@@ -32,4 +40,4 @@ export {
32
40
  no_enum_default as default,
33
41
  ruleId
34
42
  };
35
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL25vLWVudW0udHMiXSwKICAibWFwcGluZ3MiOiAiO0FBRUEsU0FBUyxtQkFBNkI7QUFRL0IsSUFBTSxTQUFTO0FBQ3RCLElBQU0sVUFBVTtBQUVoQixJQUFNLGFBQWEsWUFBWSxZQUFZLENBQUMsU0FBUyxJQUFJO0FBRXpELElBQU0sT0FBTyxXQUFXO0FBQUEsRUFDdEIsTUFBTTtBQUFBLEVBQ04sTUFBTTtBQUFBLElBQ0osTUFBTTtBQUFBLElBQ04sTUFBTTtBQUFBLE1BQ0osYUFBYTtBQUFBLElBQ2Y7QUFBQSxJQUNBLFFBQVEsQ0FBQztBQUFBLElBQ1QsVUFBVTtBQUFBLE1BQ1IsQ0FBQyxPQUFPLEdBQUc7QUFBQSxJQUNiO0FBQUEsRUFDRjtBQUFBLEVBQ0EsZ0JBQWdCLENBQUM7QUFBQSxFQU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BQVMsU0FBUyxlQUFlLGlCQUM1QztBQUNBLGtCQUFRLE9BQU87QUFBQSxZQUNiO0FBQUEsWUFDQSxXQUFXO0FBQUEsVUFDYixDQUFDO0FBQUEsUUFDSDtBQUFBLE1BQ0Y7QUFBQSxJQUNGO0FBQUEsRUFDRjtBQUNGLENBQUM7QUFFRCxJQUFPLGtCQUFROyIsCiAgIm5hbWVzIjogW10KfQo=
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@checkdigit/eslint-plugin","version":"6.6.0-PR.79-5f54","description":"Check Digit eslint plugins","keywords":["eslint","eslintplugin"],"homepage":"https://github.com/checkdigit/eslint-plugin#readme","bugs":{"url":"https://github.com/checkdigit/eslint-plugin/issues"},"repository":{"type":"git","url":"https://github.com/checkdigit/eslint-plugin"},"license":"MIT","author":"Check Digit, LLC","sideEffects":false,"type":"module","exports":{".":{"types":"./dist-types/index.d.ts","require":"./dist-cjs/index.cjs","import":"./dist-mjs/index.mjs","default":"./dist-mjs/index.mjs"}},"files":["src","dist-types","dist-cjs","dist-mjs","!src/**/*.test.ts","!src/**/*.spec.ts","!dist-types/**/*.test.d.ts","!dist-types/**/*.spec.d.ts","!dist-cjs/**/*.test.cjs","!dist-cjs/**/*.spec.cjs","!dist-mjs/**/*.test.mjs","!dist-mjs/**/*.spec.mjs","SECURITY.md"],"scripts":{"build:dist-cjs":"rimraf dist-cjs && npx builder --type=commonjs --sourceMap --entryPoint=index.ts --outDir=dist-cjs --outFile=index.cjs --external=espree && echo \"module.exports = module.exports.default;\" >> dist-cjs/index.cjs && node dist-cjs/index.cjs","build:dist-mjs":"rimraf dist-mjs && npx builder --type=module --sourceMap --outDir=dist-mjs && node dist-mjs/index.mjs","build:dist-types":"rimraf dist-types && npx builder --type=types --outDir=dist-types","ci:compile":"tsc --noEmit","ci:coverage":"NODE_OPTIONS=\"--disable-warning ExperimentalWarning --experimental-vm-modules\" jest --coverage=true","ci:lint":"npm run lint","ci:style":"npm run prettier","ci:test":"NODE_OPTIONS=\"--disable-warning ExperimentalWarning --experimental-vm-modules\" jest --coverage=false","lint":"eslint --max-warnings 0 --ignore-path .gitignore .","lint:fix":"eslint --ignore-path .gitignore . --fix","prepublishOnly":"npm run build:dist-types && npm run build:dist-cjs && npm run build:dist-mjs","prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","test":"npm run ci:compile && npm run ci:test && npm run ci:lint && npm run ci:style"},"prettier":"@checkdigit/prettier-config","jest":{"preset":"@checkdigit/jest-config"},"devDependencies":{"@checkdigit/jest-config":"^6.0.2","@checkdigit/prettier-config":"^5.5.0","@checkdigit/typescript-config":"6.0.0","@types/eslint":"8.56.10","@typescript-eslint/eslint-plugin":"7.18.0","@typescript-eslint/parser":"7.18.0","@typescript-eslint/rule-tester":"7.18.0","@typescript-eslint/utils":"7.18.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-plugin":"^6.2.0","eslint-plugin-import":"^2.29.1","eslint-plugin-no-only-tests":"^3.1.0","eslint-plugin-no-secrets":"^1.0.2","eslint-plugin-node":"^11.1.0","eslint-plugin-sonarjs":"0.24.0","http-status-codes":"^2.3.0"},"peerDependencies":{"eslint":">=8 <9"},"engines":{"node":">=20.14"}}
1
+ {"name":"@checkdigit/eslint-plugin","version":"6.6.0-PR.79-1cec","description":"Check Digit eslint plugins","keywords":["eslint","eslintplugin"],"homepage":"https://github.com/checkdigit/eslint-plugin#readme","bugs":{"url":"https://github.com/checkdigit/eslint-plugin/issues"},"repository":{"type":"git","url":"https://github.com/checkdigit/eslint-plugin"},"license":"MIT","author":"Check Digit, LLC","sideEffects":false,"type":"module","exports":{".":{"types":"./dist-types/index.d.ts","require":"./dist-cjs/index.cjs","import":"./dist-mjs/index.mjs","default":"./dist-mjs/index.mjs"}},"files":["src","dist-types","dist-cjs","dist-mjs","!src/**/*.test.ts","!src/**/*.spec.ts","!dist-types/**/*.test.d.ts","!dist-types/**/*.spec.d.ts","!dist-cjs/**/*.test.cjs","!dist-cjs/**/*.spec.cjs","!dist-mjs/**/*.test.mjs","!dist-mjs/**/*.spec.mjs","SECURITY.md"],"scripts":{"build:dist-cjs":"rimraf dist-cjs && npx builder --type=commonjs --sourceMap --entryPoint=index.ts --outDir=dist-cjs --outFile=index.cjs --external=espree && echo \"module.exports = module.exports.default;\" >> dist-cjs/index.cjs && node dist-cjs/index.cjs","build:dist-mjs":"rimraf dist-mjs && npx builder --type=module --sourceMap --outDir=dist-mjs && node dist-mjs/index.mjs","build:dist-types":"rimraf dist-types && npx builder --type=types --outDir=dist-types","ci:compile":"tsc --noEmit","ci:coverage":"NODE_OPTIONS=\"--disable-warning ExperimentalWarning --experimental-vm-modules\" jest --coverage=true","ci:lint":"npm run lint","ci:style":"npm run prettier","ci:test":"NODE_OPTIONS=\"--disable-warning ExperimentalWarning --experimental-vm-modules\" jest --coverage=false","lint":"eslint --max-warnings 0 --ignore-path .gitignore .","lint:fix":"eslint --ignore-path .gitignore . --fix","prepublishOnly":"npm run build:dist-types && npm run build:dist-cjs && npm run build:dist-mjs","prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","test":"npm run ci:compile && npm run ci:test && npm run ci:lint && npm run ci:style"},"prettier":"@checkdigit/prettier-config","jest":{"preset":"@checkdigit/jest-config"},"devDependencies":{"@checkdigit/jest-config":"^6.0.2","@checkdigit/prettier-config":"^5.5.0","@checkdigit/typescript-config":"6.0.0","@types/eslint":"8.56.10","@typescript-eslint/eslint-plugin":"7.18.0","@typescript-eslint/parser":"7.18.0","@typescript-eslint/rule-tester":"7.18.0","@typescript-eslint/utils":"7.18.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-plugin":"^6.2.0","eslint-plugin-import":"^2.29.1","eslint-plugin-no-only-tests":"^3.1.0","eslint-plugin-no-secrets":"^1.0.2","eslint-plugin-node":"^11.1.0","eslint-plugin-sonarjs":"0.24.0","http-status-codes":"^2.3.0"},"peerDependencies":{"eslint":">=8 <9"},"engines":{"node":">=20.14"}}
package/src/no-enum.ts CHANGED
@@ -34,6 +34,18 @@ const rule = createRule({
34
34
  messageId: NO_ENUM,
35
35
  });
36
36
  },
37
+ Property(node: TSESTree.Property) {
38
+ if (
39
+ node.key.type === TSESTree.AST_NODE_TYPES.Identifier &&
40
+ node.key.name === 'enum' &&
41
+ node.value.type === TSESTree.AST_NODE_TYPES.ArrayExpression
42
+ ) {
43
+ context.report({
44
+ node,
45
+ messageId: NO_ENUM,
46
+ });
47
+ }
48
+ },
37
49
  };
38
50
  },
39
51
  });