zirka 0.0.66 → 0.0.68

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.
package/README.md CHANGED
@@ -69,19 +69,19 @@ Enabling a pasika preset wires four language-scoped rule sets (see the pasika RE
69
69
 
70
70
  ### Options
71
71
 
72
- | Option | Type | Description |
73
- | ------------------- | -------------------------------- | ---------------------------------------------- |
74
- | `browser` | `RuleSeverity` | Browser globals |
75
- | `node` | `RuleSeverity` | Node.js globals |
76
- | `typescript` | `RuleSeverity` | TypeScript-ESLint strict rules |
77
- | `react` | `RuleSeverity` | React + JSX-a11y rules |
78
- | `next` | `RuleSeverity` | Next.js rules |
79
- | `pasikaApp` | `RuleSeverity` | Pasika rules for a plain TypeScript repository |
80
- | `pasikaNextjsApp` | `RuleSeverity` | Pasika rules for a Next.js application |
81
- | `playwright` | `RuleSeverity` | Playwright test rules |
82
- | `ignores` | `string[]` | Glob patterns to ignore |
83
- | `additionalConfigs` | `Linter.Config[]` | Extra flat config entries appended last |
84
- | `prettier` | `true \| { tailwind?: boolean }` | Enable Prettier config |
72
+ | Option | Type | Description |
73
+ | ------------------- | ------------------------------------------------------------- | ---------------------------------------------- |
74
+ | `browser` | `RuleSeverity` | Browser globals |
75
+ | `node` | `RuleSeverity` | Node.js globals |
76
+ | `typescript` | `RuleSeverity` | TypeScript-ESLint strict rules |
77
+ | `react` | `RuleSeverity` | React + JSX-a11y rules |
78
+ | `next` | `RuleSeverity` | Next.js rules |
79
+ | `pasikaApp` | `RuleSeverity` | Pasika rules for a plain TypeScript repository |
80
+ | `pasikaNextjsApp` | `RuleSeverity` | Pasika rules for a Next.js application |
81
+ | `playwright` | `RuleSeverity \| { files: string[]; severity: RuleSeverity }` | Playwright test rules and optional file scope |
82
+ | `ignores` | `string[]` | Glob patterns to ignore |
83
+ | `additionalConfigs` | `Linter.Config[]` | Extra flat config entries appended last |
84
+ | `prettier` | `true \| { tailwind?: boolean }` | Enable Prettier config |
85
85
 
86
86
  ---
87
87
 
@@ -1072,18 +1072,24 @@ var init_next = __esm({
1072
1072
  // eslint/playwright.ts
1073
1073
  var playwright_exports = {};
1074
1074
  __export(playwright_exports, {
1075
- playwrightConfig: () => playwrightConfig
1075
+ createPlaywrightConfig: () => createPlaywrightConfig
1076
1076
  });
1077
- var import_config9, import_eslint_plugin_playwright, playwrightConfig;
1077
+ var import_config9, import_eslint_plugin_playwright, DEFAULT_PLAYWRIGHT_FILES, createPlaywrightConfig;
1078
1078
  var init_playwright = __esm({
1079
1079
  "eslint/playwright.ts"() {
1080
1080
  "use strict";
1081
1081
  import_config9 = require("eslint/config");
1082
1082
  import_eslint_plugin_playwright = __toESM(require("eslint-plugin-playwright"), 1);
1083
- playwrightConfig = (0, import_config9.defineConfig)([
1083
+ DEFAULT_PLAYWRIGHT_FILES = [
1084
+ "**/*.spec.{js,ts}",
1085
+ "**/*.test.{js,ts}",
1086
+ "**/tests/**/*.{js,ts}",
1087
+ "**/e2e/**/*.{js,ts}"
1088
+ ];
1089
+ createPlaywrightConfig = (files = DEFAULT_PLAYWRIGHT_FILES) => (0, import_config9.defineConfig)([
1084
1090
  {
1085
1091
  ...import_eslint_plugin_playwright.default.configs["flat/recommended"],
1086
- files: ["**/*.spec.{js,ts}", "**/*.test.{js,ts}", "**/tests/**/*.{js,ts}", "**/e2e/**/*.{js,ts}"],
1092
+ files,
1087
1093
  rules: {
1088
1094
  ...import_eslint_plugin_playwright.default.configs["flat/recommended"].rules
1089
1095
  }
@@ -1155,6 +1161,8 @@ var init_styleguide = __esm({
1155
1161
  ignores,
1156
1162
  additionalConfigs = []
1157
1163
  } = options;
1164
+ const playwrightSeverity = typeof playwright === "string" ? playwright : playwright?.severity;
1165
+ const playwrightFiles = typeof playwright === "string" ? void 0 : playwright?.files;
1158
1166
  const configLoaders = [
1159
1167
  { loader: () => Promise.resolve().then(() => (init_browser(), browser_exports)).then((m) => m.browserConfig), severity: browser },
1160
1168
  { loader: () => Promise.resolve().then(() => (init_node(), node_exports)).then((m) => m.nodeConfig), severity: node },
@@ -1163,7 +1171,10 @@ var init_styleguide = __esm({
1163
1171
  { loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
1164
1172
  { loader: () => loadPasikaConfigs("pasikaApp"), severity: pasikaApp, isPasika: true },
1165
1173
  { loader: () => loadPasikaConfigs("pasikaNextjsApp"), severity: pasikaNextjsApp, isPasika: true },
1166
- { loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
1174
+ {
1175
+ loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.createPlaywrightConfig(playwrightFiles)),
1176
+ severity: playwrightSeverity
1177
+ }
1167
1178
  ];
1168
1179
  const eslintConfigs = [];
1169
1180
  for (const { loader, severity, isPasika } of configLoaders) {
@@ -10,6 +10,10 @@ declare enum RuleSeverity {
10
10
  interface PrettierOptions {
11
11
  tailwind?: boolean;
12
12
  }
13
+ interface PlaywrightOptions {
14
+ files: string[];
15
+ severity: RuleSeverity;
16
+ }
13
17
  interface StyleguideOptions {
14
18
  browser?: RuleSeverity;
15
19
  node?: RuleSeverity;
@@ -18,7 +22,7 @@ interface StyleguideOptions {
18
22
  next?: RuleSeverity;
19
23
  pasikaApp?: RuleSeverity;
20
24
  pasikaNextjsApp?: RuleSeverity;
21
- playwright?: RuleSeverity;
25
+ playwright?: PlaywrightOptions | RuleSeverity;
22
26
  ignores?: string[];
23
27
  additionalConfigs?: Linter.Config[];
24
28
  prettier?: PrettierOptions | true;
@@ -10,6 +10,10 @@ declare enum RuleSeverity {
10
10
  interface PrettierOptions {
11
11
  tailwind?: boolean;
12
12
  }
13
+ interface PlaywrightOptions {
14
+ files: string[];
15
+ severity: RuleSeverity;
16
+ }
13
17
  interface StyleguideOptions {
14
18
  browser?: RuleSeverity;
15
19
  node?: RuleSeverity;
@@ -18,7 +22,7 @@ interface StyleguideOptions {
18
22
  next?: RuleSeverity;
19
23
  pasikaApp?: RuleSeverity;
20
24
  pasikaNextjsApp?: RuleSeverity;
21
- playwright?: RuleSeverity;
25
+ playwright?: PlaywrightOptions | RuleSeverity;
22
26
  ignores?: string[];
23
27
  additionalConfigs?: Linter.Config[];
24
28
  prettier?: PrettierOptions | true;
@@ -1056,18 +1056,24 @@ var init_next = __esm({
1056
1056
  // eslint/playwright.ts
1057
1057
  var playwright_exports = {};
1058
1058
  __export(playwright_exports, {
1059
- playwrightConfig: () => playwrightConfig
1059
+ createPlaywrightConfig: () => createPlaywrightConfig
1060
1060
  });
1061
1061
  import { defineConfig as defineConfig9 } from "eslint/config";
1062
1062
  import playwrightPlugin from "eslint-plugin-playwright";
1063
- var playwrightConfig;
1063
+ var DEFAULT_PLAYWRIGHT_FILES, createPlaywrightConfig;
1064
1064
  var init_playwright = __esm({
1065
1065
  "eslint/playwright.ts"() {
1066
1066
  "use strict";
1067
- playwrightConfig = defineConfig9([
1067
+ DEFAULT_PLAYWRIGHT_FILES = [
1068
+ "**/*.spec.{js,ts}",
1069
+ "**/*.test.{js,ts}",
1070
+ "**/tests/**/*.{js,ts}",
1071
+ "**/e2e/**/*.{js,ts}"
1072
+ ];
1073
+ createPlaywrightConfig = (files = DEFAULT_PLAYWRIGHT_FILES) => defineConfig9([
1068
1074
  {
1069
1075
  ...playwrightPlugin.configs["flat/recommended"],
1070
- files: ["**/*.spec.{js,ts}", "**/*.test.{js,ts}", "**/tests/**/*.{js,ts}", "**/e2e/**/*.{js,ts}"],
1076
+ files,
1071
1077
  rules: {
1072
1078
  ...playwrightPlugin.configs["flat/recommended"].rules
1073
1079
  }
@@ -1133,6 +1139,8 @@ var init_styleguide = __esm({
1133
1139
  ignores,
1134
1140
  additionalConfigs = []
1135
1141
  } = options;
1142
+ const playwrightSeverity = typeof playwright === "string" ? playwright : playwright?.severity;
1143
+ const playwrightFiles = typeof playwright === "string" ? void 0 : playwright?.files;
1136
1144
  const configLoaders = [
1137
1145
  { loader: () => Promise.resolve().then(() => (init_browser(), browser_exports)).then((m) => m.browserConfig), severity: browser },
1138
1146
  { loader: () => Promise.resolve().then(() => (init_node(), node_exports)).then((m) => m.nodeConfig), severity: node },
@@ -1141,7 +1149,10 @@ var init_styleguide = __esm({
1141
1149
  { loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
1142
1150
  { loader: () => loadPasikaConfigs("pasikaApp"), severity: pasikaApp, isPasika: true },
1143
1151
  { loader: () => loadPasikaConfigs("pasikaNextjsApp"), severity: pasikaNextjsApp, isPasika: true },
1144
- { loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
1152
+ {
1153
+ loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.createPlaywrightConfig(playwrightFiles)),
1154
+ severity: playwrightSeverity
1155
+ }
1145
1156
  ];
1146
1157
  const eslintConfigs = [];
1147
1158
  for (const { loader, severity, isPasika } of configLoaders) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zirka",
3
- "version": "0.0.66",
3
+ "version": "0.0.68",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -51,7 +51,7 @@
51
51
  "eslint-plugin-unicorn": "^73.0.0",
52
52
  "globals": "^16.2.0",
53
53
  "jiti": "^2.6.1",
54
- "pasika": "^0.7.0",
54
+ "pasika": "^0.7.5",
55
55
  "prettier-plugin-packagejson": "^2.5.14",
56
56
  "prettier-plugin-tailwindcss": "^0.6.14",
57
57
  "typescript-eslint": "^8.68.0"