zirka 0.0.30 → 0.0.33
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 +1 -0
- package/dist/styleguide.cjs +16 -25
- package/dist/styleguide.d.cts +3 -2
- package/dist/styleguide.d.ts +3 -2
- package/dist/styleguide.js +16 -25
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -61,6 +61,7 @@ Base rules (always included with any block): `@eslint/js` recommended, `eslint-p
|
|
|
61
61
|
| `typescript` | `RuleSeverity` | TypeScript-ESLint strict rules |
|
|
62
62
|
| `react` | `RuleSeverity` | React + JSX-a11y rules |
|
|
63
63
|
| `next` | `RuleSeverity` | Next.js rules |
|
|
64
|
+
| `pasika` | `RuleSeverity` | Pasika code-organization rules |
|
|
64
65
|
| `playwright` | `RuleSeverity` | Playwright test rules |
|
|
65
66
|
| `ignores` | `string[]` | Glob patterns to ignore |
|
|
66
67
|
| `additionalConfigs` | `Linter.Config[]` | Extra flat config entries appended last |
|
package/dist/styleguide.cjs
CHANGED
|
@@ -30,7 +30,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// prettier/index.ts
|
|
33
|
+
// prettier-config/index.ts
|
|
34
34
|
function getPrettierConfig(options) {
|
|
35
35
|
if (options === true) {
|
|
36
36
|
return basePrettierConfig;
|
|
@@ -41,8 +41,8 @@ function getPrettierConfig(options) {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
var basePrettierConfig;
|
|
44
|
-
var
|
|
45
|
-
"prettier/index.ts"() {
|
|
44
|
+
var init_prettier_config = __esm({
|
|
45
|
+
"prettier-config/index.ts"() {
|
|
46
46
|
"use strict";
|
|
47
47
|
basePrettierConfig = {
|
|
48
48
|
endOfLine: "lf",
|
|
@@ -463,22 +463,6 @@ var init_import = __esm({
|
|
|
463
463
|
* Source: Vercel Style Guide → https://github.com/vercel/style-guide
|
|
464
464
|
*/
|
|
465
465
|
"import/no-extraneous-dependencies": ["error", { includeTypes: true }],
|
|
466
|
-
/**
|
|
467
|
-
* Disallow relative imports that reach into src when alias imports are available.
|
|
468
|
-
* 🚫 Not fixable - https://eslint.org/docs/latest/rules/no-restricted-imports
|
|
469
|
-
* Source: Added by bredansky → https://github.com/bredansky
|
|
470
|
-
*/
|
|
471
|
-
"no-restricted-imports": [
|
|
472
|
-
"error",
|
|
473
|
-
{
|
|
474
|
-
patterns: [
|
|
475
|
-
{
|
|
476
|
-
group: ["./src/**", "../src/**", "../../src/**", "../../../src/**", "../../../../src/**"],
|
|
477
|
-
message: "Use the @/ alias for imports from src."
|
|
478
|
-
}
|
|
479
|
-
]
|
|
480
|
-
}
|
|
481
|
-
],
|
|
482
466
|
/**
|
|
483
467
|
* Disallow mutable exports.
|
|
484
468
|
* 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
|
|
@@ -530,7 +514,7 @@ var init_import = __esm({
|
|
|
530
514
|
]
|
|
531
515
|
};
|
|
532
516
|
importOverrides = {
|
|
533
|
-
files: ["**/*.config.{js,ts}"],
|
|
517
|
+
files: ["**/*.config.{cjs,cts,js,mjs,mts,ts}"],
|
|
534
518
|
rules: {
|
|
535
519
|
"import/no-default-export": "off"
|
|
536
520
|
}
|
|
@@ -1165,18 +1149,24 @@ var init_imports = __esm({
|
|
|
1165
1149
|
// App Router
|
|
1166
1150
|
"**/app/**/page.{js,jsx,ts,tsx}",
|
|
1167
1151
|
"**/app/**/layout.{js,jsx,ts,tsx}",
|
|
1152
|
+
"**/app/**/template.{js,jsx,ts,tsx}",
|
|
1168
1153
|
"**/app/**/loading.{js,jsx,ts,tsx}",
|
|
1169
1154
|
"**/app/**/error.{js,jsx,ts,tsx}",
|
|
1170
1155
|
"**/app/**/not-found.{js,jsx,ts,tsx}",
|
|
1171
1156
|
"**/app/**/global-error.{js,jsx,ts,tsx}",
|
|
1172
1157
|
"**/app/**/route.{js,ts}",
|
|
1158
|
+
"**/app/**/icon.{js,jsx,ts,tsx}",
|
|
1159
|
+
"**/app/**/apple-icon.{js,jsx,ts,tsx}",
|
|
1173
1160
|
"**/src/app/**/page.{js,jsx,ts,tsx}",
|
|
1174
1161
|
"**/src/app/**/layout.{js,jsx,ts,tsx}",
|
|
1162
|
+
"**/src/app/**/template.{js,jsx,ts,tsx}",
|
|
1175
1163
|
"**/src/app/**/loading.{js,jsx,ts,tsx}",
|
|
1176
1164
|
"**/src/app/**/error.{js,jsx,ts,tsx}",
|
|
1177
1165
|
"**/src/app/**/not-found.{js,jsx,ts,tsx}",
|
|
1178
1166
|
"**/src/app/**/global-error.{js,jsx,ts,tsx}",
|
|
1179
|
-
"**/src/app/**/route.{js,ts}"
|
|
1167
|
+
"**/src/app/**/route.{js,ts}",
|
|
1168
|
+
"**/src/app/**/icon.{js,jsx,ts,tsx}",
|
|
1169
|
+
"**/src/app/**/apple-icon.{js,jsx,ts,tsx}"
|
|
1180
1170
|
];
|
|
1181
1171
|
nextImportRules = {
|
|
1182
1172
|
files: NEXT_JS_FILES,
|
|
@@ -1272,8 +1262,8 @@ __export(styleguide_exports, {
|
|
|
1272
1262
|
});
|
|
1273
1263
|
module.exports = __toCommonJS(styleguide_exports);
|
|
1274
1264
|
function styleguide(options) {
|
|
1275
|
-
const { browser, node, typescript, react: react2, next, playwright, prettier } = options;
|
|
1276
|
-
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? playwright;
|
|
1265
|
+
const { browser, node, typescript, react: react2, next, pasika, playwright, prettier } = options;
|
|
1266
|
+
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? pasika ?? playwright;
|
|
1277
1267
|
const prettierConfig = prettier ? getPrettierConfig(prettier) : void 0;
|
|
1278
1268
|
if (!hasEslintOptions) {
|
|
1279
1269
|
return { prettierConfig };
|
|
@@ -1287,7 +1277,7 @@ function styleguide(options) {
|
|
|
1287
1277
|
var RuleSeverity, applySeverity, loadEslintConfigs;
|
|
1288
1278
|
var init_styleguide = __esm({
|
|
1289
1279
|
"styleguide.ts"() {
|
|
1290
|
-
|
|
1280
|
+
init_prettier_config();
|
|
1291
1281
|
RuleSeverity = /* @__PURE__ */ ((RuleSeverity2) => {
|
|
1292
1282
|
RuleSeverity2["Off"] = "off";
|
|
1293
1283
|
RuleSeverity2["Warn"] = "warn";
|
|
@@ -1302,13 +1292,14 @@ var init_styleguide = __esm({
|
|
|
1302
1292
|
return transformSeverity2(config, severity);
|
|
1303
1293
|
};
|
|
1304
1294
|
loadEslintConfigs = async (options) => {
|
|
1305
|
-
const { browser, node, typescript, react: react2, next, playwright, ignores, additionalConfigs = [] } = options;
|
|
1295
|
+
const { browser, node, typescript, react: react2, next, pasika, playwright, ignores, additionalConfigs = [] } = options;
|
|
1306
1296
|
const configLoaders = [
|
|
1307
1297
|
{ loader: () => Promise.resolve().then(() => (init_browser(), browser_exports)).then((m) => m.browserConfig), severity: browser },
|
|
1308
1298
|
{ loader: () => Promise.resolve().then(() => (init_node(), node_exports)).then((m) => m.nodeConfig), severity: node },
|
|
1309
1299
|
{ loader: () => Promise.resolve().then(() => (init_typescript2(), typescript_exports)).then((m) => m.typescriptConfig), severity: typescript },
|
|
1310
1300
|
{ loader: () => Promise.resolve().then(() => (init_react(), react_exports)).then((m) => m.reactConfig), severity: react2 },
|
|
1311
1301
|
{ loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
|
|
1302
|
+
{ loader: () => import("pasika/eslint").then((m) => [m.pasikaConfig]), severity: pasika },
|
|
1312
1303
|
{ loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
|
|
1313
1304
|
];
|
|
1314
1305
|
const eslintConfigs = [];
|
package/dist/styleguide.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Linter } from 'eslint';
|
|
2
|
-
import {
|
|
2
|
+
import { Options } from 'prettier';
|
|
3
3
|
|
|
4
4
|
declare enum RuleSeverity {
|
|
5
5
|
Off = "off",
|
|
@@ -16,6 +16,7 @@ interface StyleguideOptions {
|
|
|
16
16
|
typescript?: RuleSeverity;
|
|
17
17
|
react?: RuleSeverity;
|
|
18
18
|
next?: RuleSeverity;
|
|
19
|
+
pasika?: RuleSeverity;
|
|
19
20
|
playwright?: RuleSeverity;
|
|
20
21
|
ignores?: string[];
|
|
21
22
|
additionalConfigs?: Linter.Config[];
|
|
@@ -23,7 +24,7 @@ interface StyleguideOptions {
|
|
|
23
24
|
}
|
|
24
25
|
interface StyleguideResult {
|
|
25
26
|
eslintConfig?: Linter.Config[] | Promise<Linter.Config[]>;
|
|
26
|
-
prettierConfig?:
|
|
27
|
+
prettierConfig?: Options;
|
|
27
28
|
}
|
|
28
29
|
declare function styleguide(options: StyleguideOptions): StyleguideResult;
|
|
29
30
|
|
package/dist/styleguide.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Linter } from 'eslint';
|
|
2
|
-
import {
|
|
2
|
+
import { Options } from 'prettier';
|
|
3
3
|
|
|
4
4
|
declare enum RuleSeverity {
|
|
5
5
|
Off = "off",
|
|
@@ -16,6 +16,7 @@ interface StyleguideOptions {
|
|
|
16
16
|
typescript?: RuleSeverity;
|
|
17
17
|
react?: RuleSeverity;
|
|
18
18
|
next?: RuleSeverity;
|
|
19
|
+
pasika?: RuleSeverity;
|
|
19
20
|
playwright?: RuleSeverity;
|
|
20
21
|
ignores?: string[];
|
|
21
22
|
additionalConfigs?: Linter.Config[];
|
|
@@ -23,7 +24,7 @@ interface StyleguideOptions {
|
|
|
23
24
|
}
|
|
24
25
|
interface StyleguideResult {
|
|
25
26
|
eslintConfig?: Linter.Config[] | Promise<Linter.Config[]>;
|
|
26
|
-
prettierConfig?:
|
|
27
|
+
prettierConfig?: Options;
|
|
27
28
|
}
|
|
28
29
|
declare function styleguide(options: StyleguideOptions): StyleguideResult;
|
|
29
30
|
|
package/dist/styleguide.js
CHANGED
|
@@ -14,7 +14,7 @@ var __export = (target, all) => {
|
|
|
14
14
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
// prettier/index.ts
|
|
17
|
+
// prettier-config/index.ts
|
|
18
18
|
function getPrettierConfig(options) {
|
|
19
19
|
if (options === true) {
|
|
20
20
|
return basePrettierConfig;
|
|
@@ -25,8 +25,8 @@ function getPrettierConfig(options) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
var basePrettierConfig;
|
|
28
|
-
var
|
|
29
|
-
"prettier/index.ts"() {
|
|
28
|
+
var init_prettier_config = __esm({
|
|
29
|
+
"prettier-config/index.ts"() {
|
|
30
30
|
"use strict";
|
|
31
31
|
basePrettierConfig = {
|
|
32
32
|
endOfLine: "lf",
|
|
@@ -447,22 +447,6 @@ var init_import = __esm({
|
|
|
447
447
|
* Source: Vercel Style Guide → https://github.com/vercel/style-guide
|
|
448
448
|
*/
|
|
449
449
|
"import/no-extraneous-dependencies": ["error", { includeTypes: true }],
|
|
450
|
-
/**
|
|
451
|
-
* Disallow relative imports that reach into src when alias imports are available.
|
|
452
|
-
* 🚫 Not fixable - https://eslint.org/docs/latest/rules/no-restricted-imports
|
|
453
|
-
* Source: Added by bredansky → https://github.com/bredansky
|
|
454
|
-
*/
|
|
455
|
-
"no-restricted-imports": [
|
|
456
|
-
"error",
|
|
457
|
-
{
|
|
458
|
-
patterns: [
|
|
459
|
-
{
|
|
460
|
-
group: ["./src/**", "../src/**", "../../src/**", "../../../src/**", "../../../../src/**"],
|
|
461
|
-
message: "Use the @/ alias for imports from src."
|
|
462
|
-
}
|
|
463
|
-
]
|
|
464
|
-
}
|
|
465
|
-
],
|
|
466
450
|
/**
|
|
467
451
|
* Disallow mutable exports.
|
|
468
452
|
* 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
|
|
@@ -514,7 +498,7 @@ var init_import = __esm({
|
|
|
514
498
|
]
|
|
515
499
|
};
|
|
516
500
|
importOverrides = {
|
|
517
|
-
files: ["**/*.config.{js,ts}"],
|
|
501
|
+
files: ["**/*.config.{cjs,cts,js,mjs,mts,ts}"],
|
|
518
502
|
rules: {
|
|
519
503
|
"import/no-default-export": "off"
|
|
520
504
|
}
|
|
@@ -1149,18 +1133,24 @@ var init_imports = __esm({
|
|
|
1149
1133
|
// App Router
|
|
1150
1134
|
"**/app/**/page.{js,jsx,ts,tsx}",
|
|
1151
1135
|
"**/app/**/layout.{js,jsx,ts,tsx}",
|
|
1136
|
+
"**/app/**/template.{js,jsx,ts,tsx}",
|
|
1152
1137
|
"**/app/**/loading.{js,jsx,ts,tsx}",
|
|
1153
1138
|
"**/app/**/error.{js,jsx,ts,tsx}",
|
|
1154
1139
|
"**/app/**/not-found.{js,jsx,ts,tsx}",
|
|
1155
1140
|
"**/app/**/global-error.{js,jsx,ts,tsx}",
|
|
1156
1141
|
"**/app/**/route.{js,ts}",
|
|
1142
|
+
"**/app/**/icon.{js,jsx,ts,tsx}",
|
|
1143
|
+
"**/app/**/apple-icon.{js,jsx,ts,tsx}",
|
|
1157
1144
|
"**/src/app/**/page.{js,jsx,ts,tsx}",
|
|
1158
1145
|
"**/src/app/**/layout.{js,jsx,ts,tsx}",
|
|
1146
|
+
"**/src/app/**/template.{js,jsx,ts,tsx}",
|
|
1159
1147
|
"**/src/app/**/loading.{js,jsx,ts,tsx}",
|
|
1160
1148
|
"**/src/app/**/error.{js,jsx,ts,tsx}",
|
|
1161
1149
|
"**/src/app/**/not-found.{js,jsx,ts,tsx}",
|
|
1162
1150
|
"**/src/app/**/global-error.{js,jsx,ts,tsx}",
|
|
1163
|
-
"**/src/app/**/route.{js,ts}"
|
|
1151
|
+
"**/src/app/**/route.{js,ts}",
|
|
1152
|
+
"**/src/app/**/icon.{js,jsx,ts,tsx}",
|
|
1153
|
+
"**/src/app/**/apple-icon.{js,jsx,ts,tsx}"
|
|
1164
1154
|
];
|
|
1165
1155
|
nextImportRules = {
|
|
1166
1156
|
files: NEXT_JS_FILES,
|
|
@@ -1250,8 +1240,8 @@ var init_playwright = __esm({
|
|
|
1250
1240
|
|
|
1251
1241
|
// styleguide.ts
|
|
1252
1242
|
function styleguide(options) {
|
|
1253
|
-
const { browser, node, typescript, react: react2, next, playwright, prettier } = options;
|
|
1254
|
-
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? playwright;
|
|
1243
|
+
const { browser, node, typescript, react: react2, next, pasika, playwright, prettier } = options;
|
|
1244
|
+
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? pasika ?? playwright;
|
|
1255
1245
|
const prettierConfig = prettier ? getPrettierConfig(prettier) : void 0;
|
|
1256
1246
|
if (!hasEslintOptions) {
|
|
1257
1247
|
return { prettierConfig };
|
|
@@ -1265,7 +1255,7 @@ function styleguide(options) {
|
|
|
1265
1255
|
var RuleSeverity, applySeverity, loadEslintConfigs;
|
|
1266
1256
|
var init_styleguide = __esm({
|
|
1267
1257
|
"styleguide.ts"() {
|
|
1268
|
-
|
|
1258
|
+
init_prettier_config();
|
|
1269
1259
|
RuleSeverity = /* @__PURE__ */ ((RuleSeverity2) => {
|
|
1270
1260
|
RuleSeverity2["Off"] = "off";
|
|
1271
1261
|
RuleSeverity2["Warn"] = "warn";
|
|
@@ -1280,13 +1270,14 @@ var init_styleguide = __esm({
|
|
|
1280
1270
|
return transformSeverity2(config, severity);
|
|
1281
1271
|
};
|
|
1282
1272
|
loadEslintConfigs = async (options) => {
|
|
1283
|
-
const { browser, node, typescript, react: react2, next, playwright, ignores, additionalConfigs = [] } = options;
|
|
1273
|
+
const { browser, node, typescript, react: react2, next, pasika, playwright, ignores, additionalConfigs = [] } = options;
|
|
1284
1274
|
const configLoaders = [
|
|
1285
1275
|
{ loader: () => Promise.resolve().then(() => (init_browser(), browser_exports)).then((m) => m.browserConfig), severity: browser },
|
|
1286
1276
|
{ loader: () => Promise.resolve().then(() => (init_node(), node_exports)).then((m) => m.nodeConfig), severity: node },
|
|
1287
1277
|
{ loader: () => Promise.resolve().then(() => (init_typescript2(), typescript_exports)).then((m) => m.typescriptConfig), severity: typescript },
|
|
1288
1278
|
{ loader: () => Promise.resolve().then(() => (init_react(), react_exports)).then((m) => m.reactConfig), severity: react2 },
|
|
1289
1279
|
{ loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
|
|
1280
|
+
{ loader: () => import("pasika/eslint").then((m) => [m.pasikaConfig]), severity: pasika },
|
|
1290
1281
|
{ loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
|
|
1291
1282
|
];
|
|
1292
1283
|
const eslintConfigs = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zirka",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"eslint": "^9.27.0",
|
|
61
61
|
"husky": "^9.1.7",
|
|
62
62
|
"lint-staged": "^16.1.6",
|
|
63
|
+
"pasika": "^0.1.4",
|
|
63
64
|
"prettier": "^3.5.3",
|
|
64
65
|
"tsup": "^8.5.0",
|
|
65
66
|
"typescript": "^5.8.3"
|
|
@@ -69,6 +70,11 @@
|
|
|
69
70
|
"prettier": "^3.5.3",
|
|
70
71
|
"typescript": "^5.8.3"
|
|
71
72
|
},
|
|
73
|
+
"peerDependenciesMeta": {
|
|
74
|
+
"pasika": {
|
|
75
|
+
"optional": true
|
|
76
|
+
}
|
|
77
|
+
},
|
|
72
78
|
"engines": {
|
|
73
79
|
"node": ">=22"
|
|
74
80
|
}
|