@boundaries/eslint-plugin 5.2.0-beta.1

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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +798 -0
  3. package/dist/Config/Config.d.ts +40 -0
  4. package/dist/Config/Config.js +119 -0
  5. package/dist/Config/Recommended.d.ts +10 -0
  6. package/dist/Config/Recommended.js +36 -0
  7. package/dist/Config/Strict.d.ts +8 -0
  8. package/dist/Config/Strict.js +26 -0
  9. package/dist/Elements/Elements.d.ts +43 -0
  10. package/dist/Elements/Elements.js +107 -0
  11. package/dist/Elements/Elements.types.d.ts +5 -0
  12. package/dist/Elements/Elements.types.js +2 -0
  13. package/dist/Elements/index.d.ts +2 -0
  14. package/dist/Elements/index.js +18 -0
  15. package/dist/Messages/Messages.d.ts +14 -0
  16. package/dist/Messages/Messages.js +204 -0
  17. package/dist/Messages/index.d.ts +1 -0
  18. package/dist/Messages/index.js +17 -0
  19. package/dist/Public/Config.types.d.ts +2 -0
  20. package/dist/Public/Config.types.js +5 -0
  21. package/dist/Public/Rules.types.d.ts +10 -0
  22. package/dist/Public/Rules.types.js +15 -0
  23. package/dist/Public/Settings.types.d.ts +13 -0
  24. package/dist/Public/Settings.types.js +21 -0
  25. package/dist/Public/index.d.ts +3 -0
  26. package/dist/Public/index.js +19 -0
  27. package/dist/Rules/ElementTypes.d.ts +25 -0
  28. package/dist/Rules/ElementTypes.js +269 -0
  29. package/dist/Rules/EntryPoint.d.ts +2 -0
  30. package/dist/Rules/EntryPoint.js +122 -0
  31. package/dist/Rules/External.d.ts +2 -0
  32. package/dist/Rules/External.js +119 -0
  33. package/dist/Rules/NoIgnored.d.ts +2 -0
  34. package/dist/Rules/NoIgnored.js +19 -0
  35. package/dist/Rules/NoPrivate.d.ts +2 -0
  36. package/dist/Rules/NoPrivate.js +53 -0
  37. package/dist/Rules/NoUnknown.d.ts +2 -0
  38. package/dist/Rules/NoUnknown.js +22 -0
  39. package/dist/Rules/NoUnknownFiles.d.ts +3 -0
  40. package/dist/Rules/NoUnknownFiles.js +29 -0
  41. package/dist/Rules/Support/DependencyRule.d.ts +4 -0
  42. package/dist/Rules/Support/DependencyRule.js +49 -0
  43. package/dist/Rules/Support/DependencyRule.types.d.ts +17 -0
  44. package/dist/Rules/Support/DependencyRule.types.js +2 -0
  45. package/dist/Rules/Support/Helpers.d.ts +8 -0
  46. package/dist/Rules/Support/Helpers.js +39 -0
  47. package/dist/Rules/Support/index.d.ts +3 -0
  48. package/dist/Rules/Support/index.js +19 -0
  49. package/dist/Settings/Helpers.d.ts +41 -0
  50. package/dist/Settings/Helpers.js +72 -0
  51. package/dist/Settings/Settings.d.ts +6 -0
  52. package/dist/Settings/Settings.js +49 -0
  53. package/dist/Settings/Settings.types.d.ts +448 -0
  54. package/dist/Settings/Settings.types.js +190 -0
  55. package/dist/Settings/Validations.d.ts +137 -0
  56. package/dist/Settings/Validations.js +359 -0
  57. package/dist/Settings/index.d.ts +4 -0
  58. package/dist/Settings/index.js +20 -0
  59. package/dist/Support/Common.d.ts +30 -0
  60. package/dist/Support/Common.js +47 -0
  61. package/dist/Support/Debug.d.ts +5 -0
  62. package/dist/Support/Debug.js +54 -0
  63. package/dist/Support/index.d.ts +2 -0
  64. package/dist/Support/index.js +18 -0
  65. package/dist/index.d.ts +8 -0
  66. package/dist/index.js +76 -0
  67. package/package.json +81 -0
@@ -0,0 +1,8 @@
1
+ import type { PluginBoundaries } from "./Settings";
2
+ export * from "./Public";
3
+ /**
4
+ * Eslint plugin ensuring that architecture boundaries are respected by the elements in a project
5
+ * It enables to check the folders and files structure and the dependencies and relationships between them.
6
+ */
7
+ declare const publicInterface: PluginBoundaries;
8
+ export default publicInterface;
package/dist/index.js ADDED
@@ -0,0 +1,76 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ const fs_1 = require("fs");
21
+ const path_1 = require("path");
22
+ const Recommended_1 = __importDefault(require("./Config/Recommended"));
23
+ const Strict_1 = __importDefault(require("./Config/Strict"));
24
+ const ElementTypes_1 = __importDefault(require("./Rules/ElementTypes"));
25
+ const EntryPoint_1 = __importDefault(require("./Rules/EntryPoint"));
26
+ const External_1 = __importDefault(require("./Rules/External"));
27
+ const NoIgnored_1 = __importDefault(require("./Rules/NoIgnored"));
28
+ const NoPrivate_1 = __importDefault(require("./Rules/NoPrivate"));
29
+ const NoUnknown_1 = __importDefault(require("./Rules/NoUnknown"));
30
+ const NoUnknownFiles_1 = __importDefault(require("./Rules/NoUnknownFiles"));
31
+ const Settings_1 = require("./Settings");
32
+ // import { warn } from "./Support";
33
+ __exportStar(require("./Public"), exports);
34
+ /**
35
+ * The path to the plugin package.json file
36
+ */
37
+ const packageJsonPath = (0, path_1.join)(__dirname, "..", "package.json");
38
+ /**
39
+ * The content of the package.json file
40
+ */
41
+ const packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, "utf-8"));
42
+ // TODO: Enable this warning in the next major release
43
+ /* if (packageJson.name !== "@boundaries/eslint-plugin") {
44
+ warn(
45
+ `⚠️ The "eslint-plugin-boundaries" package has been renamed to "@boundaries/eslint-plugin". Please install the new package, as this one will soon no longer receive updates`
46
+ );
47
+ } */
48
+ const RULES = {
49
+ [Settings_1.RULE_SHORT_NAMES_MAP.ENTRY_POINT]: EntryPoint_1.default,
50
+ [Settings_1.RULE_SHORT_NAMES_MAP.ELEMENT_TYPES]: ElementTypes_1.default,
51
+ [Settings_1.RULE_SHORT_NAMES_MAP.EXTERNAL]: External_1.default,
52
+ [Settings_1.RULE_SHORT_NAMES_MAP.NO_IGNORED]: NoIgnored_1.default,
53
+ [Settings_1.RULE_SHORT_NAMES_MAP.NO_PRIVATE]: NoPrivate_1.default,
54
+ [Settings_1.RULE_SHORT_NAMES_MAP.NO_UNKNOWN]: NoUnknown_1.default,
55
+ [Settings_1.RULE_SHORT_NAMES_MAP.NO_UNKNOWN_FILES]: NoUnknownFiles_1.default,
56
+ };
57
+ /**
58
+ * Eslint plugin ensuring that architecture boundaries are respected by the elements in a project
59
+ * It enables to check the folders and files structure and the dependencies and relationships between them.
60
+ */
61
+ const publicInterface = {
62
+ meta: {
63
+ name: packageJson.name,
64
+ version: packageJson.version,
65
+ },
66
+ rules: RULES,
67
+ configs: {
68
+ recommended: Recommended_1.default,
69
+ strict: Strict_1.default,
70
+ },
71
+ };
72
+ exports.default = publicInterface;
73
+ // For CommonJS compatibility
74
+ module.exports = {
75
+ ...publicInterface,
76
+ };
package/package.json ADDED
@@ -0,0 +1,81 @@
1
+ {
2
+ "name": "@boundaries/eslint-plugin",
3
+ "version": "5.2.0-beta.1",
4
+ "description": "Eslint plugin checking architecture boundaries between elements",
5
+ "keywords": [
6
+ "eslint",
7
+ "eslint-plugin",
8
+ "eslintplugin",
9
+ "plugin",
10
+ "architecture",
11
+ "boundaries",
12
+ "dependencies",
13
+ "elements",
14
+ "hierarchy",
15
+ "import",
16
+ "dependency"
17
+ ],
18
+ "author": "Javier Brea",
19
+ "license": "MIT",
20
+ "repository": "https://github.com/javierbrea/eslint-plugin-boundaries",
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "main": "dist/index.js",
28
+ "types": "dist/index.d.ts",
29
+ "exports": {
30
+ ".": "./dist/index.js",
31
+ "./config": "./dist/Config/Config.js",
32
+ "./recommended": "./dist/Config/Recommended.js",
33
+ "./strict": "./dist/Config/Strict.js"
34
+ },
35
+ "typesVersions": {
36
+ "*": {
37
+ "config": [
38
+ "dist/Config/Config.d.ts"
39
+ ],
40
+ "recommended": [
41
+ "dist/Config/Recommended.d.ts"
42
+ ],
43
+ "strict": [
44
+ "dist/Config/Strict.d.ts"
45
+ ]
46
+ }
47
+ },
48
+ "peerDependencies": {
49
+ "eslint": ">=6.0.0"
50
+ },
51
+ "dependencies": {
52
+ "chalk": "4.1.2",
53
+ "eslint-import-resolver-node": "0.3.9",
54
+ "eslint-module-utils": "2.12.1",
55
+ "micromatch": "4.0.8",
56
+ "@boundaries/elements": "1.0.0"
57
+ },
58
+ "engines": {
59
+ "node": ">=18.18"
60
+ },
61
+ "devDependencies": {
62
+ "@types/estree": "1.0.8",
63
+ "@types/micromatch": "4.0.9"
64
+ },
65
+ "scripts": {
66
+ "eslint": "eslint",
67
+ "build": "pnpm build:tsc && pnpm copy:readme",
68
+ "build:tsc": "tsc",
69
+ "copy:readme": "cross-env node ./scripts/copy-readme.js",
70
+ "check:all": "echo 'All checks passed'",
71
+ "check:spell": "cspell --quiet .",
72
+ "check:types": "pnpm check:types:code && pnpm check:types:test",
73
+ "check:types:code": "tsc --noEmit",
74
+ "check:types:test": "tsc --noEmit --project ./test/tsconfig.json",
75
+ "lint": "eslint .",
76
+ "lint:fix": "eslint . --fix",
77
+ "serve:unit:report": "serve --config ./serve.test-unit-report.json",
78
+ "test": "jest",
79
+ "test:unit": "cross-env ESLINT_PLUGIN_BOUNDARIES_DEBUG=false pnpm test"
80
+ }
81
+ }