zirka 0.0.30 → 0.0.32
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 +8 -23
- package/dist/styleguide.d.cts +3 -2
- package/dist/styleguide.d.ts +3 -2
- package/dist/styleguide.js +8 -23
- 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
|
|
@@ -1272,8 +1256,8 @@ __export(styleguide_exports, {
|
|
|
1272
1256
|
});
|
|
1273
1257
|
module.exports = __toCommonJS(styleguide_exports);
|
|
1274
1258
|
function styleguide(options) {
|
|
1275
|
-
const { browser, node, typescript, react: react2, next, playwright, prettier } = options;
|
|
1276
|
-
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? playwright;
|
|
1259
|
+
const { browser, node, typescript, react: react2, next, pasika, playwright, prettier } = options;
|
|
1260
|
+
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? pasika ?? playwright;
|
|
1277
1261
|
const prettierConfig = prettier ? getPrettierConfig(prettier) : void 0;
|
|
1278
1262
|
if (!hasEslintOptions) {
|
|
1279
1263
|
return { prettierConfig };
|
|
@@ -1287,7 +1271,7 @@ function styleguide(options) {
|
|
|
1287
1271
|
var RuleSeverity, applySeverity, loadEslintConfigs;
|
|
1288
1272
|
var init_styleguide = __esm({
|
|
1289
1273
|
"styleguide.ts"() {
|
|
1290
|
-
|
|
1274
|
+
init_prettier_config();
|
|
1291
1275
|
RuleSeverity = /* @__PURE__ */ ((RuleSeverity2) => {
|
|
1292
1276
|
RuleSeverity2["Off"] = "off";
|
|
1293
1277
|
RuleSeverity2["Warn"] = "warn";
|
|
@@ -1302,13 +1286,14 @@ var init_styleguide = __esm({
|
|
|
1302
1286
|
return transformSeverity2(config, severity);
|
|
1303
1287
|
};
|
|
1304
1288
|
loadEslintConfigs = async (options) => {
|
|
1305
|
-
const { browser, node, typescript, react: react2, next, playwright, ignores, additionalConfigs = [] } = options;
|
|
1289
|
+
const { browser, node, typescript, react: react2, next, pasika, playwright, ignores, additionalConfigs = [] } = options;
|
|
1306
1290
|
const configLoaders = [
|
|
1307
1291
|
{ loader: () => Promise.resolve().then(() => (init_browser(), browser_exports)).then((m) => m.browserConfig), severity: browser },
|
|
1308
1292
|
{ loader: () => Promise.resolve().then(() => (init_node(), node_exports)).then((m) => m.nodeConfig), severity: node },
|
|
1309
1293
|
{ loader: () => Promise.resolve().then(() => (init_typescript2(), typescript_exports)).then((m) => m.typescriptConfig), severity: typescript },
|
|
1310
1294
|
{ loader: () => Promise.resolve().then(() => (init_react(), react_exports)).then((m) => m.reactConfig), severity: react2 },
|
|
1311
1295
|
{ loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
|
|
1296
|
+
{ loader: () => import("pasika/eslint").then((m) => [m.pasikaConfig]), severity: pasika },
|
|
1312
1297
|
{ loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
|
|
1313
1298
|
];
|
|
1314
1299
|
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
|
|
@@ -1250,8 +1234,8 @@ var init_playwright = __esm({
|
|
|
1250
1234
|
|
|
1251
1235
|
// styleguide.ts
|
|
1252
1236
|
function styleguide(options) {
|
|
1253
|
-
const { browser, node, typescript, react: react2, next, playwright, prettier } = options;
|
|
1254
|
-
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? playwright;
|
|
1237
|
+
const { browser, node, typescript, react: react2, next, pasika, playwright, prettier } = options;
|
|
1238
|
+
const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? pasika ?? playwright;
|
|
1255
1239
|
const prettierConfig = prettier ? getPrettierConfig(prettier) : void 0;
|
|
1256
1240
|
if (!hasEslintOptions) {
|
|
1257
1241
|
return { prettierConfig };
|
|
@@ -1265,7 +1249,7 @@ function styleguide(options) {
|
|
|
1265
1249
|
var RuleSeverity, applySeverity, loadEslintConfigs;
|
|
1266
1250
|
var init_styleguide = __esm({
|
|
1267
1251
|
"styleguide.ts"() {
|
|
1268
|
-
|
|
1252
|
+
init_prettier_config();
|
|
1269
1253
|
RuleSeverity = /* @__PURE__ */ ((RuleSeverity2) => {
|
|
1270
1254
|
RuleSeverity2["Off"] = "off";
|
|
1271
1255
|
RuleSeverity2["Warn"] = "warn";
|
|
@@ -1280,13 +1264,14 @@ var init_styleguide = __esm({
|
|
|
1280
1264
|
return transformSeverity2(config, severity);
|
|
1281
1265
|
};
|
|
1282
1266
|
loadEslintConfigs = async (options) => {
|
|
1283
|
-
const { browser, node, typescript, react: react2, next, playwright, ignores, additionalConfigs = [] } = options;
|
|
1267
|
+
const { browser, node, typescript, react: react2, next, pasika, playwright, ignores, additionalConfigs = [] } = options;
|
|
1284
1268
|
const configLoaders = [
|
|
1285
1269
|
{ loader: () => Promise.resolve().then(() => (init_browser(), browser_exports)).then((m) => m.browserConfig), severity: browser },
|
|
1286
1270
|
{ loader: () => Promise.resolve().then(() => (init_node(), node_exports)).then((m) => m.nodeConfig), severity: node },
|
|
1287
1271
|
{ loader: () => Promise.resolve().then(() => (init_typescript2(), typescript_exports)).then((m) => m.typescriptConfig), severity: typescript },
|
|
1288
1272
|
{ loader: () => Promise.resolve().then(() => (init_react(), react_exports)).then((m) => m.reactConfig), severity: react2 },
|
|
1289
1273
|
{ loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
|
|
1274
|
+
{ loader: () => import("pasika/eslint").then((m) => [m.pasikaConfig]), severity: pasika },
|
|
1290
1275
|
{ loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
|
|
1291
1276
|
];
|
|
1292
1277
|
const eslintConfigs = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zirka",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
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
|
}
|