@chris.araneo/eslint-config 0.0.45 → 0.0.48

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,89 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/angular.ts
31
+ var angular_exports = {};
32
+ __export(angular_exports, {
33
+ default: () => angular_default
34
+ });
35
+ module.exports = __toCommonJS(angular_exports);
36
+ var import_angular_eslint = __toESM(require("angular-eslint"), 1);
37
+
38
+ // src/utils.ts
39
+ function isEmpty(value) {
40
+ return Array.isArray(value) && value.length === 0 || !Array.isArray(value);
41
+ }
42
+
43
+ // src/angular.ts
44
+ var angular_default = (isAngularApp = false, sources = [], templates = [], prefix) => {
45
+ if (!isAngularApp) {
46
+ return [];
47
+ }
48
+ const configs = [];
49
+ if (!isEmpty(sources)) {
50
+ configs.push({
51
+ extends: [...import_angular_eslint.default.configs.tsAll],
52
+ files: sources,
53
+ processor: import_angular_eslint.default.processInlineTemplates,
54
+ rules: {
55
+ "@angular-eslint/component-selector": [
56
+ "error",
57
+ {
58
+ prefix: prefix || "app",
59
+ style: "kebab-case",
60
+ type: "element"
61
+ }
62
+ ],
63
+ "@angular-eslint/directive-selector": [
64
+ "error",
65
+ {
66
+ prefix: prefix || "app",
67
+ style: "camelCase",
68
+ type: "attribute"
69
+ }
70
+ ],
71
+ "@angular-eslint/no-forward-ref": "off",
72
+ "@angular-eslint/prefer-on-push-component-change-detection": "off",
73
+ "@angular-eslint/prefer-output-emitter-ref": "off",
74
+ "@angular-eslint/prefer-signals": "off"
75
+ }
76
+ });
77
+ }
78
+ if (!isEmpty(templates)) {
79
+ configs.push({
80
+ files: templates,
81
+ extends: [...import_angular_eslint.default.configs.templateAll],
82
+ rules: {
83
+ "@angular-eslint/template/i18n": "off",
84
+ "@angular-eslint/template/prefer-control-flow": "off"
85
+ }
86
+ });
87
+ }
88
+ return configs;
89
+ };
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/json.ts
31
+ var json_exports = {};
32
+ __export(json_exports, {
33
+ default: () => json_default
34
+ });
35
+ module.exports = __toCommonJS(json_exports);
36
+ var import_eslint_plugin_jsonc = __toESM(require("eslint-plugin-jsonc"), 1);
37
+ var import_jsonc_eslint_parser = __toESM(require("jsonc-eslint-parser"), 1);
38
+
39
+ // src/utils.ts
40
+ function isEmpty(value) {
41
+ return Array.isArray(value) && value.length === 0 || !Array.isArray(value);
42
+ }
43
+
44
+ // src/json.ts
45
+ var json_default = (jsons = []) => {
46
+ if (isEmpty(jsons)) {
47
+ return [];
48
+ }
49
+ return [
50
+ ...import_eslint_plugin_jsonc.default.configs["flat/recommended-with-jsonc"],
51
+ {
52
+ files: jsons,
53
+ languageOptions: {
54
+ parser: import_jsonc_eslint_parser.default
55
+ },
56
+ rules: {
57
+ "jsonc/no-comments": "error",
58
+ "jsonc/no-dupe-keys": "error",
59
+ "jsonc/sort-keys": "error",
60
+ "jsonc/valid-json-number": "error"
61
+ }
62
+ }
63
+ ];
64
+ };