@dnncommunity/dnn-elements 0.24.4-beta.11 → 0.24.4-beta.13

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,4 @@
1
+ import type { Linter } from "eslint";
2
+ import type { FlatConfig } from "@typescript-eslint/utils/ts-eslint";
3
+ export declare const recommended: Linter.Config;
4
+ export declare const flatRecommended: FlatConfig.Config[];
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.flatRecommended = exports.recommended = void 0;
4
+ const rules_1 = require("../rules");
5
+ // 🔁 Dynamically generate rule names with prefix
6
+ const pluginName = "dnn-elements";
7
+ const prefixedRules = Object.fromEntries(Object.keys(rules_1.rules).map(ruleName => [
8
+ `${pluginName}/${ruleName}`,
9
+ "error",
10
+ ]));
11
+ // ✅ Classic config (extends-based)
12
+ exports.recommended = {
13
+ plugins: [pluginName],
14
+ rules: prefixedRules,
15
+ };
16
+ // ✅ Flat config (for modern eslint.config.js)
17
+ exports.flatRecommended = [
18
+ {
19
+ plugins: {
20
+ [pluginName]: {
21
+ rules: rules_1.rules,
22
+ },
23
+ },
24
+ rules: prefixedRules,
25
+ },
26
+ ];
27
+ //# sourceMappingURL=recommended.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recommended.js","sourceRoot":"","sources":["../../src/configs/recommended.ts"],"names":[],"mappings":";;;AAEA,oCAAiC;AAEjC,iDAAiD;AACjD,MAAM,UAAU,GAAG,cAAc,CAAC;AAElC,MAAM,aAAa,GAAuB,MAAM,CAAC,WAAW,CAC1D,MAAM,CAAC,IAAI,CAAC,aAAK,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;IACjC,GAAG,UAAU,IAAI,QAAQ,EAAE;IAC3B,OAAgB;CACjB,CAAC,CACH,CAAC;AAEF,mCAAmC;AACtB,QAAA,WAAW,GAAkB;IACxC,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,KAAK,EAAE,aAAa;CACrB,CAAC;AAEF,8CAA8C;AACjC,QAAA,eAAe,GAAwB;IAClD;QACE,OAAO,EAAE;YACP,CAAC,UAAU,CAAC,EAAE;gBACZ,KAAK,EAAL,aAAK;aACN;SACF;QACD,KAAK,EAAE,aAAa;KACrB;CACF,CAAC","sourcesContent":["import type { Linter } from \"eslint\";\r\nimport type { FlatConfig } from \"@typescript-eslint/utils/ts-eslint\";\r\nimport { rules } from \"../rules\";\r\n\r\n// 🔁 Dynamically generate rule names with prefix\r\nconst pluginName = \"dnn-elements\";\r\n\r\nconst prefixedRules: Linter.RulesRecord = Object.fromEntries(\r\n Object.keys(rules).map(ruleName => [\r\n `${pluginName}/${ruleName}`,\r\n \"error\" as const,\r\n ])\r\n);\r\n\r\n// ✅ Classic config (extends-based)\r\nexport const recommended: Linter.Config = {\r\n plugins: [pluginName],\r\n rules: prefixedRules,\r\n};\r\n\r\n// ✅ Flat config (for modern eslint.config.js)\r\nexport const flatRecommended: FlatConfig.Config[] = [\r\n {\r\n plugins: {\r\n [pluginName]: {\r\n rules,\r\n },\r\n },\r\n rules: prefixedRules,\r\n },\r\n];\r\n"]}
@@ -1,20 +1,3 @@
1
- declare const plugin: {
2
- configs: {
3
- readonly recommended: {
4
- plugins: {
5
- "dnn-elements": any;
6
- };
7
- rules: {
8
- "no-label-slot-in-checkbox": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noLabelSlotInCheckbox", [], import("./utils").TypedLintingRuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
9
- };
10
- };
11
- };
12
- meta: {
13
- name: string;
14
- version: string;
15
- };
16
- rules: {
17
- "no-label-slot-in-checkbox": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noLabelSlotInCheckbox", [], import("./utils").TypedLintingRuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
18
- };
19
- };
1
+ import type { Plugin } from "./types/plugin";
2
+ declare const plugin: Plugin;
20
3
  export default plugin;
@@ -1,24 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const rules_1 = require("./rules");
4
- const { name, version } =
5
- // `import`ing here would bypass the TSConfig's `"rootDir": "src"`
6
- // eslint-disable-next-line @typescript-eslint/no-require-imports
7
- require("../../package.json");
4
+ const recommended_1 = require("./configs/recommended");
5
+ const { name, version } = require("../../package.json");
8
6
  const plugin = {
9
- configs: {
10
- get recommended() {
11
- return recommended;
12
- },
13
- },
14
7
  meta: { name, version },
15
8
  rules: rules_1.rules,
16
- };
17
- const recommended = {
18
- plugins: {
19
- "dnn-elements": plugin,
9
+ configs: {
10
+ recommended: recommended_1.recommended,
11
+ flat: {
12
+ recommended: recommended_1.flatRecommended,
13
+ },
20
14
  },
21
- rules: rules_1.rules,
22
15
  };
23
16
  exports.default = plugin;
24
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,mCAAgC;AAEhC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;AACrB,kEAAkE;AAClE,iEAAiE;AACjE,OAAO,CAAC,oBAAoB,CAAwC,CAAC;AAEvE,MAAM,MAAM,GAAG;IACX,OAAO,EAAE;QACL,IAAI,WAAW;YACX,OAAO,WAAW,CAAC;QACvB,CAAC;KACJ;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;IACvB,KAAK,EAAL,aAAK;CACR,CAAC;AAEF,MAAM,WAAW,GAAG;IAChB,OAAO,EAAE;QACL,cAAc,EAAE,MAAM;KACzB;IACD,KAAK,EAAL,aAAK;CACR,CAAC;AAEF,kBAAe,MAAM,CAAC","sourcesContent":["import { rules } from \"./rules\";\r\n\r\nconst { name, version } =\r\n // `import`ing here would bypass the TSConfig's `\"rootDir\": \"src\"`\r\n // eslint-disable-next-line @typescript-eslint/no-require-imports\r\n require(\"../../package.json\") as typeof import(\"../../package.json\");\r\n\r\nconst plugin = {\r\n configs: {\r\n get recommended() {\r\n return recommended;\r\n },\r\n },\r\n meta: { name, version },\r\n rules,\r\n};\r\n\r\nconst recommended = {\r\n plugins: {\r\n \"dnn-elements\": plugin,\r\n },\r\n rules,\r\n};\r\n\r\nexport default plugin;"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,mCAAgC;AAChC,uDAAqE;AAErE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAGnD,CAAC;AAEJ,MAAM,MAAM,GAAW;IACrB,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;IACvB,KAAK,EAAL,aAAK;IACL,OAAO,EAAE;QACP,WAAW,EAAX,yBAAW;QACX,IAAI,EAAE;YACJ,WAAW,EAAE,6BAAe;SAC7B;KACF;CACF,CAAC;AAEF,kBAAe,MAAM,CAAC","sourcesContent":["import { rules } from \"./rules\";\r\nimport { recommended, flatRecommended } from \"./configs/recommended\";\r\nimport type { Plugin } from \"./types/plugin\";\r\nconst { name, version } = require(\"../../package.json\") as {\r\n name: string;\r\n version: string;\r\n };\r\n\r\nconst plugin: Plugin = {\r\n meta: { name, version },\r\n rules,\r\n configs: {\r\n recommended,\r\n flat: {\r\n recommended: flatRecommended,\r\n },\r\n },\r\n};\r\n\r\nexport default plugin;\r\n"]}
@@ -0,0 +1,18 @@
1
+ import type { Linter } from "eslint";
2
+ import type { RuleModule } from "@typescript-eslint/utils/ts-eslint";
3
+ import type { FlatConfig } from "@typescript-eslint/utils/ts-eslint";
4
+ type RulesRecord = Record<string, RuleModule<string, readonly unknown[]>>;
5
+ export type Plugin = {
6
+ meta: {
7
+ name: string;
8
+ version: string;
9
+ };
10
+ rules: RulesRecord;
11
+ configs: {
12
+ recommended: Linter.Config;
13
+ flat: {
14
+ recommended: FlatConfig.Config[];
15
+ };
16
+ };
17
+ };
18
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"","sourcesContent":["import type { Linter } from \"eslint\";\r\nimport type { RuleModule } from \"@typescript-eslint/utils/ts-eslint\";\r\nimport type { FlatConfig } from \"@typescript-eslint/utils/ts-eslint\";\r\n\r\ntype RulesRecord = Record<string, RuleModule<string, readonly unknown[]>>;\r\n\r\nexport type Plugin = {\r\n meta: {\r\n name: string;\r\n version: string;\r\n };\r\n rules: RulesRecord;\r\n configs: {\r\n recommended: Linter.Config;\r\n flat: {\r\n recommended: FlatConfig.Config[];\r\n }\r\n };\r\n};"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnncommunity/dnn-elements",
3
- "version": "0.24.4-beta.11",
3
+ "version": "0.24.4-beta.13",
4
4
  "description": "Dnn themed custom elements.",
5
5
  "repository": "https://github.com/dnncommunity/dnn-elements",
6
6
  "homepage": "https://dnncommunity.github.io/dnn-elements",