zirka 0.0.61 → 0.0.63

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
@@ -39,12 +39,13 @@ Each config block is loaded lazily — if you don't enable `react`, none of its
39
39
  | `typescript` | — | `typescript-eslint` strict + stylistic, type-aware |
40
40
  | `react` | — | `@eslint-react`, `react-hooks`, `jsx-a11y` |
41
41
  | `next` | — | `@next/eslint-plugin-next` |
42
- | `playwright` | — | `eslint-plugin-playwright` | | `pasikaTypescriptApp` | — | Pasika rules for a plain TypeScript repository |
42
+ | `playwright` | — | `eslint-plugin-playwright` |
43
+ | `pasikaApp` | — | Pasika rules for a plain TypeScript repository |
43
44
  | `pasikaNextjsApp` | — | Pasika rules for a Next.js application |
44
45
 
45
- Base rules (always included with any block): `@eslint/js` recommended, `@eslint-community/eslint-plugin-eslint-comments`, `eslint-plugin-unicorn`, and the hand-written best-practice, ES6, possible-errors, stylistic, and variables rule sets.
46
+ Base rules (always included with any block): `@eslint/js` recommended, `@eslint-community/eslint-plugin-eslint-comments`, `eslint-plugin-unicorn`, the hand-written best-practice, ES6, possible-errors, stylistic, and variables rule sets, and `eslint-plugin-prettier` (with `eslint-config-prettier` disabling any ESLint stylistic rule that would fight it) — so `eslint --fix` also reformats JS/TS files against whatever `prettier.config` the repository resolves.
46
47
 
47
- ### The pasika presets (`pasikaTypescriptApp` / `pasikaNextjsApp`)
48
+ ### The pasika presets (`pasikaApp` / `pasikaNextjsApp`)
48
49
 
49
50
  Enabling a pasika preset wires four language-scoped rule sets (see the pasika README for the full rule tables):
50
51
 
@@ -55,7 +56,7 @@ Enabling a pasika preset wires four language-scoped rule sets (see the pasika RE
55
56
  | `**/*.md` (not `_templates/`) | `pasika/*` Markdown rules |
56
57
  | `package.json` | `pasika/*` JSON rules |
57
58
 
58
- `typescriptApp` is the plain-TypeScript-repository preset — the package.json manifest, the zirka configuration contract, the `src/**` TypeScript app source, and the docs. `nextjsApp` is everything in `typescriptApp` plus the Next.js-stack manifest requirement, the Next.js app source rules, and the Tailwind stylesheet rules. The JS/TS base blocks (browser, node, typescript, react, next, playwright) are scoped to JS/TS files, so the pasika language blocks are never shadowed — CSS, Markdown, and JSON files are linted by their own rules.
59
+ `pasikaApp` is the baseline preset for a plain TypeScript repository — the package.json manifest rules, the zirka configuration contract, and the docs. It carries no `src/**` block: source linting belongs to `pasikaNextjsApp`, which is everything in `pasikaApp` plus the Next.js-stack manifest requirement, the `src/**` app source rules, and the Tailwind stylesheet rules. The JS/TS base blocks (browser, node, typescript, react, next, playwright) are scoped to JS/TS files, so the pasika language blocks are never shadowed — CSS, Markdown, and JSON files are linted by their own rules.
59
60
 
60
61
  ### `RuleSeverity`
61
62
 
@@ -68,19 +69,19 @@ Enabling a pasika preset wires four language-scoped rule sets (see the pasika RE
68
69
 
69
70
  ### Options
70
71
 
71
- | Option | Type | Description |
72
- | --------------------- | -------------------------------- | ---------------------------------------------- |
73
- | `browser` | `RuleSeverity` | Browser globals |
74
- | `node` | `RuleSeverity` | Node.js globals |
75
- | `typescript` | `RuleSeverity` | TypeScript-ESLint strict rules |
76
- | `react` | `RuleSeverity` | React + JSX-a11y rules |
77
- | `next` | `RuleSeverity` | Next.js rules |
78
- | `pasikaTypescriptApp` | `RuleSeverity` | Pasika rules for a plain TypeScript repository |
79
- | `pasikaNextjsApp` | `RuleSeverity` | Pasika rules for a Next.js application |
80
- | `playwright` | `RuleSeverity` | Playwright test rules |
81
- | `ignores` | `string[]` | Glob patterns to ignore |
82
- | `additionalConfigs` | `Linter.Config[]` | Extra flat config entries appended last |
83
- | `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` | 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 |
84
85
 
85
86
  ---
86
87
 
@@ -626,12 +626,14 @@ var init_variables = __esm({
626
626
  });
627
627
 
628
628
  // eslint/_base.ts
629
- var import_js, import_config3, baseConfig;
629
+ var import_js, import_config3, import_eslint_config_prettier, import_eslint_plugin_prettier, baseConfig;
630
630
  var init_base = __esm({
631
631
  "eslint/_base.ts"() {
632
632
  "use strict";
633
633
  import_js = __toESM(require("@eslint/js"), 1);
634
634
  import_config3 = require("eslint/config");
635
+ import_eslint_config_prettier = __toESM(require("eslint-config-prettier"), 1);
636
+ import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
635
637
  init_constants();
636
638
  init_best_practice();
637
639
  init_es6();
@@ -653,6 +655,18 @@ var init_base = __esm({
653
655
  ...variablesRules
654
656
  }
655
657
  },
658
+ {
659
+ // eslint-config-prettier's rules (all "off") must come after the rule sets
660
+ // above so they win, disabling any ESLint stylistic rule that would fight
661
+ // prettier. The prettier plugin then runs prettier itself as a rule, so
662
+ // `eslint --fix` also reformats — the config it reads is whatever the
663
+ // consuming repository's own prettier.config resolves to.
664
+ plugins: { prettier: import_eslint_plugin_prettier.default },
665
+ rules: {
666
+ ...import_eslint_config_prettier.default.rules,
667
+ "prettier/prettier": "error"
668
+ }
669
+ },
656
670
  {
657
671
  languageOptions: {
658
672
  ecmaVersion: ECMA_VERSION,
@@ -1086,8 +1100,8 @@ __export(styleguide_exports, {
1086
1100
  });
1087
1101
  module.exports = __toCommonJS(styleguide_exports);
1088
1102
  function styleguide(options) {
1089
- const { browser, node, typescript, react: react2, next, pasikaTypescriptApp, pasikaNextjsApp, playwright, prettier } = options;
1090
- const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? pasikaTypescriptApp ?? pasikaNextjsApp ?? playwright;
1103
+ const { browser, node, typescript, react: react2, next, pasikaApp, pasikaNextjsApp, playwright, prettier } = options;
1104
+ const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? pasikaApp ?? pasikaNextjsApp ?? playwright;
1091
1105
  const prettierConfig = prettier ? getPrettierConfig(prettier) : void 0;
1092
1106
  if (!hasEslintOptions) {
1093
1107
  return { prettierConfig };
@@ -1135,7 +1149,7 @@ var init_styleguide = __esm({
1135
1149
  typescript,
1136
1150
  react: react2,
1137
1151
  next,
1138
- pasikaTypescriptApp,
1152
+ pasikaApp,
1139
1153
  pasikaNextjsApp,
1140
1154
  playwright,
1141
1155
  ignores,
@@ -1147,8 +1161,8 @@ var init_styleguide = __esm({
1147
1161
  { loader: () => Promise.resolve().then(() => (init_typescript2(), typescript_exports)).then((m) => m.typescriptConfig), severity: typescript },
1148
1162
  { loader: () => Promise.resolve().then(() => (init_react(), react_exports)).then((m) => m.reactConfig), severity: react2 },
1149
1163
  { loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
1150
- { loader: () => loadPasikaConfigs("typescriptApp"), severity: pasikaTypescriptApp, isPasika: true },
1151
- { loader: () => loadPasikaConfigs("nextjsApp"), severity: pasikaNextjsApp, isPasika: true },
1164
+ { loader: () => loadPasikaConfigs("pasikaApp"), severity: pasikaApp, isPasika: true },
1165
+ { loader: () => loadPasikaConfigs("pasikaNextjsApp"), severity: pasikaNextjsApp, isPasika: true },
1152
1166
  { loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
1153
1167
  ];
1154
1168
  const eslintConfigs = [];
@@ -16,7 +16,7 @@ interface StyleguideOptions {
16
16
  typescript?: RuleSeverity;
17
17
  react?: RuleSeverity;
18
18
  next?: RuleSeverity;
19
- pasikaTypescriptApp?: RuleSeverity;
19
+ pasikaApp?: RuleSeverity;
20
20
  pasikaNextjsApp?: RuleSeverity;
21
21
  playwright?: RuleSeverity;
22
22
  ignores?: string[];
@@ -16,7 +16,7 @@ interface StyleguideOptions {
16
16
  typescript?: RuleSeverity;
17
17
  react?: RuleSeverity;
18
18
  next?: RuleSeverity;
19
- pasikaTypescriptApp?: RuleSeverity;
19
+ pasikaApp?: RuleSeverity;
20
20
  pasikaNextjsApp?: RuleSeverity;
21
21
  playwright?: RuleSeverity;
22
22
  ignores?: string[];
@@ -612,6 +612,8 @@ var init_variables = __esm({
612
612
  // eslint/_base.ts
613
613
  import eslintJavascriptPlugin from "@eslint/js";
614
614
  import { defineConfig as defineConfig3 } from "eslint/config";
615
+ import eslintConfigPrettier from "eslint-config-prettier";
616
+ import prettierPlugin from "eslint-plugin-prettier";
615
617
  var baseConfig;
616
618
  var init_base = __esm({
617
619
  "eslint/_base.ts"() {
@@ -637,6 +639,18 @@ var init_base = __esm({
637
639
  ...variablesRules
638
640
  }
639
641
  },
642
+ {
643
+ // eslint-config-prettier's rules (all "off") must come after the rule sets
644
+ // above so they win, disabling any ESLint stylistic rule that would fight
645
+ // prettier. The prettier plugin then runs prettier itself as a rule, so
646
+ // `eslint --fix` also reformats — the config it reads is whatever the
647
+ // consuming repository's own prettier.config resolves to.
648
+ plugins: { prettier: prettierPlugin },
649
+ rules: {
650
+ ...eslintConfigPrettier.rules,
651
+ "prettier/prettier": "error"
652
+ }
653
+ },
640
654
  {
641
655
  languageOptions: {
642
656
  ecmaVersion: ECMA_VERSION,
@@ -1064,8 +1078,8 @@ var init_playwright = __esm({
1064
1078
 
1065
1079
  // styleguide.ts
1066
1080
  function styleguide(options) {
1067
- const { browser, node, typescript, react: react2, next, pasikaTypescriptApp, pasikaNextjsApp, playwright, prettier } = options;
1068
- const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? pasikaTypescriptApp ?? pasikaNextjsApp ?? playwright;
1081
+ const { browser, node, typescript, react: react2, next, pasikaApp, pasikaNextjsApp, playwright, prettier } = options;
1082
+ const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? pasikaApp ?? pasikaNextjsApp ?? playwright;
1069
1083
  const prettierConfig = prettier ? getPrettierConfig(prettier) : void 0;
1070
1084
  if (!hasEslintOptions) {
1071
1085
  return { prettierConfig };
@@ -1113,7 +1127,7 @@ var init_styleguide = __esm({
1113
1127
  typescript,
1114
1128
  react: react2,
1115
1129
  next,
1116
- pasikaTypescriptApp,
1130
+ pasikaApp,
1117
1131
  pasikaNextjsApp,
1118
1132
  playwright,
1119
1133
  ignores,
@@ -1125,8 +1139,8 @@ var init_styleguide = __esm({
1125
1139
  { loader: () => Promise.resolve().then(() => (init_typescript2(), typescript_exports)).then((m) => m.typescriptConfig), severity: typescript },
1126
1140
  { loader: () => Promise.resolve().then(() => (init_react(), react_exports)).then((m) => m.reactConfig), severity: react2 },
1127
1141
  { loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
1128
- { loader: () => loadPasikaConfigs("typescriptApp"), severity: pasikaTypescriptApp, isPasika: true },
1129
- { loader: () => loadPasikaConfigs("nextjsApp"), severity: pasikaNextjsApp, isPasika: true },
1142
+ { loader: () => loadPasikaConfigs("pasikaApp"), severity: pasikaApp, isPasika: true },
1143
+ { loader: () => loadPasikaConfigs("pasikaNextjsApp"), severity: pasikaNextjsApp, isPasika: true },
1130
1144
  { loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
1131
1145
  ];
1132
1146
  const eslintConfigs = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zirka",
3
- "version": "0.0.61",
3
+ "version": "0.0.63",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",