zirka 0.0.61 → 0.0.62
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 +17 -16
- package/dist/styleguide.cjs +5 -5
- package/dist/styleguide.d.cts +1 -1
- package/dist/styleguide.d.ts +1 -1
- package/dist/styleguide.js +5 -5
- package/package.json +1 -1
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` |
|
|
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
46
|
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
47
|
|
|
47
|
-
### The pasika presets (`
|
|
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
|
-
`
|
|
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
|
|
72
|
-
|
|
|
73
|
-
| `browser`
|
|
74
|
-
| `node`
|
|
75
|
-
| `typescript`
|
|
76
|
-
| `react`
|
|
77
|
-
| `next`
|
|
78
|
-
| `
|
|
79
|
-
| `pasikaNextjsApp`
|
|
80
|
-
| `playwright`
|
|
81
|
-
| `ignores`
|
|
82
|
-
| `additionalConfigs`
|
|
83
|
-
| `prettier`
|
|
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
|
|
package/dist/styleguide.cjs
CHANGED
|
@@ -1086,8 +1086,8 @@ __export(styleguide_exports, {
|
|
|
1086
1086
|
});
|
|
1087
1087
|
module.exports = __toCommonJS(styleguide_exports);
|
|
1088
1088
|
function styleguide(options) {
|
|
1089
|
-
const { browser, node, typescript, react: react2, next,
|
|
1090
|
-
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ??
|
|
1089
|
+
const { browser, node, typescript, react: react2, next, pasikaApp, pasikaNextjsApp, playwright, prettier } = options;
|
|
1090
|
+
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? pasikaApp ?? pasikaNextjsApp ?? playwright;
|
|
1091
1091
|
const prettierConfig = prettier ? getPrettierConfig(prettier) : void 0;
|
|
1092
1092
|
if (!hasEslintOptions) {
|
|
1093
1093
|
return { prettierConfig };
|
|
@@ -1135,7 +1135,7 @@ var init_styleguide = __esm({
|
|
|
1135
1135
|
typescript,
|
|
1136
1136
|
react: react2,
|
|
1137
1137
|
next,
|
|
1138
|
-
|
|
1138
|
+
pasikaApp,
|
|
1139
1139
|
pasikaNextjsApp,
|
|
1140
1140
|
playwright,
|
|
1141
1141
|
ignores,
|
|
@@ -1147,8 +1147,8 @@ var init_styleguide = __esm({
|
|
|
1147
1147
|
{ loader: () => Promise.resolve().then(() => (init_typescript2(), typescript_exports)).then((m) => m.typescriptConfig), severity: typescript },
|
|
1148
1148
|
{ loader: () => Promise.resolve().then(() => (init_react(), react_exports)).then((m) => m.reactConfig), severity: react2 },
|
|
1149
1149
|
{ loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
|
|
1150
|
-
{ loader: () => loadPasikaConfigs("
|
|
1151
|
-
{ loader: () => loadPasikaConfigs("
|
|
1150
|
+
{ loader: () => loadPasikaConfigs("pasikaApp"), severity: pasikaApp, isPasika: true },
|
|
1151
|
+
{ loader: () => loadPasikaConfigs("pasikaNextjsApp"), severity: pasikaNextjsApp, isPasika: true },
|
|
1152
1152
|
{ loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
|
|
1153
1153
|
];
|
|
1154
1154
|
const eslintConfigs = [];
|
package/dist/styleguide.d.cts
CHANGED
|
@@ -16,7 +16,7 @@ interface StyleguideOptions {
|
|
|
16
16
|
typescript?: RuleSeverity;
|
|
17
17
|
react?: RuleSeverity;
|
|
18
18
|
next?: RuleSeverity;
|
|
19
|
-
|
|
19
|
+
pasikaApp?: RuleSeverity;
|
|
20
20
|
pasikaNextjsApp?: RuleSeverity;
|
|
21
21
|
playwright?: RuleSeverity;
|
|
22
22
|
ignores?: string[];
|
package/dist/styleguide.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ interface StyleguideOptions {
|
|
|
16
16
|
typescript?: RuleSeverity;
|
|
17
17
|
react?: RuleSeverity;
|
|
18
18
|
next?: RuleSeverity;
|
|
19
|
-
|
|
19
|
+
pasikaApp?: RuleSeverity;
|
|
20
20
|
pasikaNextjsApp?: RuleSeverity;
|
|
21
21
|
playwright?: RuleSeverity;
|
|
22
22
|
ignores?: string[];
|
package/dist/styleguide.js
CHANGED
|
@@ -1064,8 +1064,8 @@ var init_playwright = __esm({
|
|
|
1064
1064
|
|
|
1065
1065
|
// styleguide.ts
|
|
1066
1066
|
function styleguide(options) {
|
|
1067
|
-
const { browser, node, typescript, react: react2, next,
|
|
1068
|
-
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ??
|
|
1067
|
+
const { browser, node, typescript, react: react2, next, pasikaApp, pasikaNextjsApp, playwright, prettier } = options;
|
|
1068
|
+
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? pasikaApp ?? pasikaNextjsApp ?? playwright;
|
|
1069
1069
|
const prettierConfig = prettier ? getPrettierConfig(prettier) : void 0;
|
|
1070
1070
|
if (!hasEslintOptions) {
|
|
1071
1071
|
return { prettierConfig };
|
|
@@ -1113,7 +1113,7 @@ var init_styleguide = __esm({
|
|
|
1113
1113
|
typescript,
|
|
1114
1114
|
react: react2,
|
|
1115
1115
|
next,
|
|
1116
|
-
|
|
1116
|
+
pasikaApp,
|
|
1117
1117
|
pasikaNextjsApp,
|
|
1118
1118
|
playwright,
|
|
1119
1119
|
ignores,
|
|
@@ -1125,8 +1125,8 @@ var init_styleguide = __esm({
|
|
|
1125
1125
|
{ loader: () => Promise.resolve().then(() => (init_typescript2(), typescript_exports)).then((m) => m.typescriptConfig), severity: typescript },
|
|
1126
1126
|
{ loader: () => Promise.resolve().then(() => (init_react(), react_exports)).then((m) => m.reactConfig), severity: react2 },
|
|
1127
1127
|
{ loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
|
|
1128
|
-
{ loader: () => loadPasikaConfigs("
|
|
1129
|
-
{ loader: () => loadPasikaConfigs("
|
|
1128
|
+
{ loader: () => loadPasikaConfigs("pasikaApp"), severity: pasikaApp, isPasika: true },
|
|
1129
|
+
{ loader: () => loadPasikaConfigs("pasikaNextjsApp"), severity: pasikaNextjsApp, isPasika: true },
|
|
1130
1130
|
{ loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
|
|
1131
1131
|
];
|
|
1132
1132
|
const eslintConfigs = [];
|