zirka 0.0.26 → 0.0.27

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
@@ -1,6 +1,6 @@
1
1
  # zirka ⭐
2
2
 
3
- > зірка — *star* in Ukrainian
3
+ > зірка — _star_ in Ukrainian
4
4
 
5
5
  **zirka** is a shared ESLint, Prettier, and TypeScript config. Configs are loaded lazily — only the plugins you enable are imported. `jiti` is bundled, so TypeScript config files just work.
6
6
 
@@ -58,18 +58,17 @@ export default prettierConfig;
58
58
 
59
59
  ## Options
60
60
 
61
- | Option | Type | Description |
62
- | ------------------- | -------------------------------- | ------------------------------------- |
63
- | `browser` | `RuleSeverity` | Browser globals + base JS rules |
64
- | `node` | `RuleSeverity` | Node.js globals |
65
- | `typescript` | `RuleSeverity` | TypeScript-ESLint strict rules |
66
- | `react` | `RuleSeverity` | React + JSX-a11y rules |
67
- | `next` | `RuleSeverity` | Next.js rules |
68
- | `playwright` | `RuleSeverity` | Playwright test rules |
69
- | `ignores` | `string[]` | Glob patterns to ignore |
70
- | `additionalConfigs` | `Linter.Config[]` | Extra flat config entries |
71
- | `prettier` | `true \| { tailwind?: boolean }` | Enable Prettier config |
72
- | `tsconfigPath` | `string` | Custom tsconfig path for type-checking |
61
+ | Option | Type | Description |
62
+ | ------------------- | -------------------------------- | ------------------------------- |
63
+ | `browser` | `RuleSeverity` | Browser globals + base JS rules |
64
+ | `node` | `RuleSeverity` | Node.js globals |
65
+ | `typescript` | `RuleSeverity` | TypeScript-ESLint strict rules |
66
+ | `react` | `RuleSeverity` | React + JSX-a11y rules |
67
+ | `next` | `RuleSeverity` | Next.js rules |
68
+ | `playwright` | `RuleSeverity` | Playwright test rules |
69
+ | `ignores` | `string[]` | Glob patterns to ignore |
70
+ | `additionalConfigs` | `Linter.Config[]` | Extra flat config entries |
71
+ | `prettier` | `true \| { tailwind?: boolean }` | Enable Prettier config |
73
72
 
74
73
  ### `RuleSeverity`
75
74
 
@@ -82,29 +81,6 @@ export default prettierConfig;
82
81
 
83
82
  ---
84
83
 
85
- ## Custom tsconfig
86
-
87
- If your `eslint.config.ts` lives outside `src/` and you have `rootDir: src` in your tsconfig, point zirka at a separate tsconfig that includes root-level files:
88
-
89
- ```ts
90
- // eslint.config.ts
91
- const { eslintConfig } = styleguide({
92
- typescript: RuleSeverity.Error,
93
- tsconfigPath: "./tsconfig.eslint.json",
94
- });
95
- ```
96
-
97
- ```json
98
- // tsconfig.eslint.json
99
- {
100
- "extends": "./tsconfig.json",
101
- "compilerOptions": { "noEmit": true, "rootDir": "." },
102
- "include": ["src/**/*.ts", "eslint.config.ts"]
103
- }
104
- ```
105
-
106
- ---
107
-
108
84
  ## Requirements
109
85
 
110
86
  - Node ≥ 22
@@ -1286,7 +1286,7 @@ var init_styleguide = __esm({
1286
1286
  return transformSeverity2(config, severity);
1287
1287
  };
1288
1288
  loadEslintConfigs = async (options) => {
1289
- const { browser, node, typescript, react: react2, next, playwright, ignores, additionalConfigs = [], tsconfigPath } = options;
1289
+ const { browser, node, typescript, react: react2, next, playwright, ignores, additionalConfigs = [] } = options;
1290
1290
  const configLoaders = [
1291
1291
  { loader: () => Promise.resolve().then(() => (init_browser(), browser_exports)).then((m) => m.browserConfig), severity: browser },
1292
1292
  { loader: () => Promise.resolve().then(() => (init_node(), node_exports)).then((m) => m.nodeConfig), severity: node },
@@ -1303,13 +1303,6 @@ var init_styleguide = __esm({
1303
1303
  eslintConfigs.push(...processedConfig);
1304
1304
  }
1305
1305
  }
1306
- if (tsconfigPath) {
1307
- eslintConfigs.push({
1308
- languageOptions: {
1309
- parserOptions: { project: tsconfigPath }
1310
- }
1311
- });
1312
- }
1313
1306
  if (ignores && ignores.length > 0) {
1314
1307
  eslintConfigs.push({ ignores });
1315
1308
  }
@@ -20,7 +20,6 @@ interface StyleguideOptions {
20
20
  ignores?: string[];
21
21
  additionalConfigs?: Linter.Config[];
22
22
  prettier?: PrettierOptions | true;
23
- tsconfigPath?: string;
24
23
  }
25
24
  interface StyleguideResult {
26
25
  eslintConfig?: Linter.Config[] | Promise<Linter.Config[]>;
@@ -20,7 +20,6 @@ interface StyleguideOptions {
20
20
  ignores?: string[];
21
21
  additionalConfigs?: Linter.Config[];
22
22
  prettier?: PrettierOptions | true;
23
- tsconfigPath?: string;
24
23
  }
25
24
  interface StyleguideResult {
26
25
  eslintConfig?: Linter.Config[] | Promise<Linter.Config[]>;
@@ -1264,7 +1264,7 @@ var init_styleguide = __esm({
1264
1264
  return transformSeverity2(config, severity);
1265
1265
  };
1266
1266
  loadEslintConfigs = async (options) => {
1267
- const { browser, node, typescript, react: react2, next, playwright, ignores, additionalConfigs = [], tsconfigPath } = options;
1267
+ const { browser, node, typescript, react: react2, next, playwright, ignores, additionalConfigs = [] } = options;
1268
1268
  const configLoaders = [
1269
1269
  { loader: () => Promise.resolve().then(() => (init_browser(), browser_exports)).then((m) => m.browserConfig), severity: browser },
1270
1270
  { loader: () => Promise.resolve().then(() => (init_node(), node_exports)).then((m) => m.nodeConfig), severity: node },
@@ -1281,13 +1281,6 @@ var init_styleguide = __esm({
1281
1281
  eslintConfigs.push(...processedConfig);
1282
1282
  }
1283
1283
  }
1284
- if (tsconfigPath) {
1285
- eslintConfigs.push({
1286
- languageOptions: {
1287
- parserOptions: { project: tsconfigPath }
1288
- }
1289
- });
1290
- }
1291
1284
  if (ignores && ignores.length > 0) {
1292
1285
  eslintConfigs.push({ ignores });
1293
1286
  }
package/package.json CHANGED
@@ -1,70 +1,70 @@
1
- {
2
- "name": "zirka",
3
- "version": "0.0.26",
4
- "description": "",
5
- "license": "ISC",
6
- "author": "",
7
- "type": "module",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/styleguide.js",
11
- "require": "./dist/styleguide.cjs"
12
- },
13
- "./typescript": "./typescript/base.json"
14
- },
15
- "types": "dist/styleguide.d.ts",
16
- "files": [
17
- "dist",
18
- "typescript",
19
- "types"
20
- ],
21
- "scripts": {
22
- "build": "tsup",
23
- "check": "npm run fix && npm run typecheck",
24
- "fix": "eslint . --fix",
25
- "prepare": "husky"
26
- },
27
- "lint-staged": {
28
- "!(*.ts|*.mts|*.cts|*.tsx|*.js|*.cjs|*.mjs|*.jsx)": "prettier --write --ignore-unknown",
29
- "*.ts|*.mts|*.cts|*.tsx|*.js|*.cjs|*.mjs|*.jsx": "eslint --fix"
30
- },
31
- "dependencies": {
32
- "@babel/eslint-parser": "^7.27.1",
33
- "@babel/preset-env": "^7.27.2",
34
- "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
35
- "@eslint-react/eslint-plugin": "^1.53.0",
36
- "@eslint/js": "^9.27.0",
37
- "@next/eslint-plugin-next": "^15.3.3",
38
- "@types/eslint-plugin-jsx-a11y": "^6.10.0",
39
- "@types/node": "^22.15.29",
40
- "eslint-config-prettier": "^10.1.5",
41
- "eslint-import-resolver-typescript": "^4.4.4",
42
- "eslint-plugin-import": "^2.31.0",
43
- "eslint-plugin-jsx-a11y": "^6.10.2",
44
- "eslint-plugin-playwright": "^2.3.0",
45
- "eslint-plugin-prettier": "^5.4.0",
46
- "eslint-plugin-react-hooks": "^5.2.0",
47
- "eslint-plugin-unicorn": "^59.0.1",
48
- "globals": "^16.2.0",
49
- "prettier-plugin-packagejson": "^2.5.14",
50
- "jiti": "^2.6.1",
51
- "prettier-plugin-tailwindcss": "^0.6.14",
52
- "typescript-eslint": "^8.33.1"
53
- },
54
- "devDependencies": {
55
- "eslint": "^9.27.0",
56
- "husky": "^9.1.7",
57
- "lint-staged": "^16.1.6",
58
- "prettier": "^3.5.3",
59
- "tsup": "^8.5.0",
60
- "typescript": "^5.8.3"
61
- },
62
- "peerDependencies": {
63
- "eslint": "^9.27.0",
64
- "prettier": "^3.5.3",
65
- "typescript": "^5.8.3"
66
- },
67
- "engines": {
68
- "node": ">=22.16"
69
- }
70
- }
1
+ {
2
+ "name": "zirka",
3
+ "version": "0.0.27",
4
+ "description": "",
5
+ "license": "ISC",
6
+ "author": "",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/styleguide.js",
11
+ "require": "./dist/styleguide.cjs"
12
+ },
13
+ "./typescript": "./typescript/base.json"
14
+ },
15
+ "types": "dist/styleguide.d.ts",
16
+ "files": [
17
+ "dist",
18
+ "typescript",
19
+ "types"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsup",
23
+ "check": "npm run fix && npm run typecheck",
24
+ "fix": "eslint . --fix",
25
+ "prepare": "husky"
26
+ },
27
+ "lint-staged": {
28
+ "!(*.ts|*.mts|*.cts|*.tsx|*.js|*.cjs|*.mjs|*.jsx)": "prettier --write --ignore-unknown",
29
+ "*.ts|*.mts|*.cts|*.tsx|*.js|*.cjs|*.mjs|*.jsx": "npx eslint --fix"
30
+ },
31
+ "dependencies": {
32
+ "@babel/eslint-parser": "^7.27.1",
33
+ "@babel/preset-env": "^7.27.2",
34
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
35
+ "@eslint-react/eslint-plugin": "^1.53.0",
36
+ "@eslint/js": "^9.27.0",
37
+ "@next/eslint-plugin-next": "^15.3.3",
38
+ "@types/eslint-plugin-jsx-a11y": "^6.10.0",
39
+ "@types/node": "^22.15.29",
40
+ "eslint-config-prettier": "^10.1.5",
41
+ "eslint-import-resolver-typescript": "^4.4.4",
42
+ "eslint-plugin-import": "^2.31.0",
43
+ "eslint-plugin-jsx-a11y": "^6.10.2",
44
+ "eslint-plugin-playwright": "^2.3.0",
45
+ "eslint-plugin-prettier": "^5.4.0",
46
+ "eslint-plugin-react-hooks": "^5.2.0",
47
+ "eslint-plugin-unicorn": "^59.0.1",
48
+ "globals": "^16.2.0",
49
+ "jiti": "^2.6.1",
50
+ "prettier-plugin-packagejson": "^2.5.14",
51
+ "prettier-plugin-tailwindcss": "^0.6.14",
52
+ "typescript-eslint": "^8.33.1"
53
+ },
54
+ "devDependencies": {
55
+ "eslint": "^9.27.0",
56
+ "husky": "^9.1.7",
57
+ "lint-staged": "^16.1.6",
58
+ "prettier": "^3.5.3",
59
+ "tsup": "^8.5.0",
60
+ "typescript": "^5.8.3"
61
+ },
62
+ "peerDependencies": {
63
+ "eslint": "^9.27.0",
64
+ "prettier": "^3.5.3",
65
+ "typescript": "^5.8.3"
66
+ },
67
+ "engines": {
68
+ "node": ">=22.16"
69
+ }
70
+ }
@@ -1,18 +1,12 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- "esModuleInterop": true,
5
- "forceConsistentCasingInFileNames": true,
6
- "noFallthroughCasesInSwitch": true,
7
- "noUncheckedIndexedAccess": true,
8
- "skipLibCheck": true,
9
- "strict": true,
10
- "lib": ["ESNext"],
11
- "module": "es2022",
12
- "target": "esnext",
13
- "moduleResolution": "bundler",
14
- "noEmit": true,
15
- "typeRoots": ["../types", "../node_modules/@types"],
16
- "resolveJsonModule": true
17
- }
18
- }
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "strict": true,
5
+ "esModuleInterop": true,
6
+ "skipLibCheck": true,
7
+ "forceConsistentCasingInFileNames": true,
8
+ "noFallthroughCasesInSwitch": true,
9
+ "noUncheckedIndexedAccess": true,
10
+ "resolveJsonModule": true
11
+ }
12
+ }