@cleeviox/lint-staged 0.0.0-next-20260120205819

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 ADDED
@@ -0,0 +1,72 @@
1
+ <div align="center">
2
+
3
+ <a href="https://github.com/cleevio/cleeviox-toolkit">
4
+ <img alt="CleevioX Logo" src="../../public/logo.svg" width="308" style="background-color: #151a1d; padding: 15px" />
5
+ </a>
6
+
7
+ # LINT-STAGED
8
+
9
+ ### Lint-staged configurations for CleevioX projects
10
+
11
+ </div>
12
+
13
+ ## 👷 Installation
14
+
15
+ ```bash
16
+ bun add --dev @cleeviox/lint-staged lint-staged
17
+ ```
18
+
19
+ ## 🧠 Usage
20
+
21
+ ### Monorepo Root
22
+
23
+ Install the package with `lint-staged` and create a `lint-staged.config.js` file in the root of your monorepo:
24
+
25
+ ```js
26
+ import { projectRoot } from '@cleeviox/lint-staged';
27
+
28
+ export default {
29
+ ...projectRoot,
30
+ };
31
+ ```
32
+
33
+ ### Monorepo Workspaces
34
+
35
+ Create a `lint-staged.config.js` file in each workspace:
36
+
37
+ ```js
38
+ import { workspace } from '@cleeviox/lint-staged';
39
+
40
+ export default {
41
+ ...workspace,
42
+ };
43
+ ```
44
+
45
+ ### Single-Package Repos
46
+
47
+ For standalone projects, create a `lint-staged.config.js` file in the root:
48
+
49
+ ```js
50
+ import { basicProject } from '@cleeviox/lint-staged';
51
+
52
+ export default {
53
+ ...basicProject,
54
+ };
55
+ ```
56
+
57
+ ## Available Configurations
58
+
59
+ | Export | Description |
60
+ |--------|-------------|
61
+ | `projectRoot` | Configuration for monorepo root with special file handling |
62
+ | `workspace` | Configuration for monorepo workspaces |
63
+ | `basicProject` | Configuration for single-package repositories |
64
+
65
+ ## Integration with Husky
66
+
67
+ Add lint-staged to your pre-commit hook:
68
+
69
+ ```bash
70
+ # .husky/pre-commit
71
+ bun lint-staged
72
+ ```
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Lint-staged configuration for a single package repository.
3
+ */
4
+ export declare const singlePackage: {
5
+ './**/*.{js,json,mdx,ts,tsx}': string[];
6
+ './**/*.{ts,tsx}': (() => string)[];
7
+ };
@@ -0,0 +1,8 @@
1
+ import { workspace } from './workspace.js';
2
+ /**
3
+ * Lint-staged configuration for a single package repository.
4
+ */
5
+ export const singlePackage = {
6
+ ...workspace,
7
+ };
8
+ //# sourceMappingURL=basic-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic-project.js","sourceRoot":"","sources":["../src/basic-project.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,SAAS;CACW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './basic-project.js';
2
+ export * from './project-root.js';
3
+ export * from './workspace.js';
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export * from './basic-project.js';
2
+ export * from './project-root.js';
3
+ export * from './workspace.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const projectRoot: {
2
+ './*.{js,json,ts}': string[];
3
+ './*.ts': (() => string)[];
4
+ };
@@ -0,0 +1,5 @@
1
+ export const projectRoot = {
2
+ './*.{js,json,ts}': ['biome check --write --files-ignore-unknown=true --no-errors-on-unmatched'],
3
+ './*.ts': [() => 'tsc --build'],
4
+ };
5
+ //# sourceMappingURL=project-root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-root.js","sourceRoot":"","sources":["../src/project-root.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,kBAAkB,EAAE,CAAC,0EAA0E,CAAC;IAChG,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC;CACR,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const workspace: {
2
+ './**/*.{js,json,mdx,ts,tsx}': string[];
3
+ './**/*.{ts,tsx}': (() => string)[];
4
+ };
@@ -0,0 +1,5 @@
1
+ export const workspace = {
2
+ './**/*.{js,json,mdx,ts,tsx}': ['biome check --write'],
3
+ './**/*.{ts,tsx}': [() => 'tsc --build'],
4
+ };
5
+ //# sourceMappingURL=workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,6BAA6B,EAAE,CAAC,qBAAqB,CAAC;IACtD,iBAAiB,EAAE,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC;CACjB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "description": "Lint-staged config",
3
+ "devDependencies": {
4
+ "lint-staged": "^16.2.7"
5
+ },
6
+ "exports": {
7
+ ".": {
8
+ "import": "./dist/index.js",
9
+ "types": "./dist/index.d.ts"
10
+ }
11
+ },
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "name": "@cleeviox/lint-staged",
16
+ "peerDependencies": {
17
+ "lint-staged": "^16.2.7"
18
+ },
19
+ "peerDependenciesMeta": {
20
+ "lint-staged": {
21
+ "optional": true
22
+ }
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "repository": {
28
+ "directory": "packages/lint-staged",
29
+ "type": "git",
30
+ "url": "https://github.com/cleevio/cleeviox-toolkit"
31
+ },
32
+ "scripts": {
33
+ "build": "tsc --build tsconfig.build.json",
34
+ "check": "biome check --write .",
35
+ "clean": "del .turbo tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo dist node_modules",
36
+ "fix": "run-s biome:check:fix ts",
37
+ "format": "biome format .",
38
+ "format:fix": "biome format --write .",
39
+ "lint": "biome lint .",
40
+ "lint:fix": "biome lint --write .",
41
+ "prebuild": "del dist tsconfig.build.tsbuildinfo",
42
+ "ts": "tsc --build tsconfig.json"
43
+ },
44
+ "sideEffects": false,
45
+ "type": "module",
46
+ "types": "./dist/index.d.ts",
47
+ "version": "0.0.0-next-20260120205819"
48
+ }