@theholocron/lint-staged-config 6.1.1 → 7.1.0

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
@@ -21,25 +21,23 @@ npx husky init
21
21
  Replace the contents of `.husky/pre-commit` with:
22
22
 
23
23
  ```bash
24
- pnpm exec lint-staged --config node_modules/@theholocron/lint-staged-config/lint-staged.config.js
24
+ pnpm exec lint-staged
25
25
  ```
26
26
 
27
- Or add it to `package.json`:
27
+ Then create a `lint-staged.config.js` at your project root:
28
28
 
29
- ```json
30
- {
31
- "lint-staged": "node_modules/@theholocron/lint-staged-config/lint-staged.config.js"
32
- }
29
+ ```js
30
+ export { default } from "@theholocron/lint-staged-config";
33
31
  ```
34
32
 
35
33
  ## What runs on staged files
36
34
 
37
- | File pattern | Commands |
38
- | -------------------------- | -------------------------------------------------- |
39
- | `*.{js,jsx}` | `prettier --write`, `eslint` |
40
- | `*.{ts,tsx}` | `prettier --write`, `eslint`, `tsc-files --noEmit` |
41
- | `*.css` | `stylelint --fix` |
42
- | `*.scss` | `stylelint --syntax=scss --fix` |
43
- | `*.{md,mdx}` | `prettier --write` |
44
- | `*.{png,jpeg,jpg,gif,svg}` | `imagemin-lint-staged` |
45
- | `package.json` | `sort-package-json` |
35
+ | File pattern | Commands |
36
+ | -------------------------- | ------------------------------- |
37
+ | `*.{js,jsx}` | `prettier --write`, `eslint` |
38
+ | `*.{ts,tsx}` | `prettier --write`, `eslint` |
39
+ | `*.css` | `stylelint --fix` |
40
+ | `*.scss` | `stylelint --syntax=scss --fix` |
41
+ | `*.{md,mdx}` | `prettier --write` |
42
+ | `*.{png,jpeg,jpg,gif,svg}` | `imagemin-lint-staged` |
43
+ | `package.json` | `sort-package-json` |
@@ -0,0 +1,16 @@
1
+ //#region index.d.ts
2
+ /**
3
+ * @see https://github.com/lint-staged/lint-staged?tab=readme-ov-file#configuration
4
+ */
5
+ declare const config: {
6
+ "*.css": string;
7
+ "*.{js,jsx}": string[];
8
+ "*.md": string[];
9
+ "*.mdx": string[];
10
+ "*.{png,jpeg,jpg,gif,svg}": string;
11
+ "*.scss": string;
12
+ "*.{ts,tsx}": string[];
13
+ "package.json": string;
14
+ };
15
+ //#endregion
16
+ export { config as default };
@@ -1,7 +1,7 @@
1
+ //#region index.ts
1
2
  /**
2
- * @see https://github.com/lint-staged/lint-staged?tab=readme-ov-file#configuration
3
- * @type {import("lint-staged").Config}
4
- */
3
+ * @see https://github.com/lint-staged/lint-staged?tab=readme-ov-file#configuration
4
+ */
5
5
  const config = {
6
6
  "*.css": "stylelint --fix",
7
7
  "*.{js,jsx}": ["prettier --write", "eslint"],
@@ -10,7 +10,7 @@ const config = {
10
10
  "*.{png,jpeg,jpg,gif,svg}": "imagemin-lint-staged",
11
11
  "*.scss": "stylelint --syntax=scss --fix",
12
12
  "*.{ts,tsx}": ["prettier --write", "eslint"],
13
- "package.json": "sort-package-json",
13
+ "package.json": "sort-package-json"
14
14
  };
15
-
16
- export default config;
15
+ //#endregion
16
+ export { config as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/lint-staged-config",
3
- "version": "6.1.1",
3
+ "version": "7.1.0",
4
4
  "description": "A Lint Staged configuration for linting code that has been staged in Git within the Galaxy.",
5
5
  "homepage": "https://github.com/theholocron/configs/tree/main/packages/lint-staged-config#readme",
6
6
  "bugs": "https://github.com/theholocron/configs/issues",
@@ -10,11 +10,35 @@
10
10
  },
11
11
  "license": "GPL-3.0",
12
12
  "author": "Newton Koumantzelis",
13
+ "keywords": [
14
+ "lint-staged",
15
+ "husky",
16
+ "git-hooks",
17
+ "pre-commit",
18
+ "config",
19
+ "theholocron"
20
+ ],
13
21
  "type": "module",
14
- "main": "lint-staged.config.js",
22
+ "main": "dist/index.js",
15
23
  "devDependencies": {
16
- "husky": "^9.1.7"
24
+ "husky": "^9.1.7",
25
+ "tsdown": "^0.22.8",
26
+ "typescript": "^5.9.3",
27
+ "vitest": "^4.0.0",
28
+ "@theholocron/tsconfig": "7.1.0",
29
+ "@theholocron/vitest-config": "7.1.0"
17
30
  },
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/index.d.ts",
34
+ "import": "./dist/index.js",
35
+ "default": "./dist/index.js"
36
+ },
37
+ "./package.json": "./package.json"
38
+ },
39
+ "files": [
40
+ "dist/"
41
+ ],
18
42
  "peerDependencies": {
19
43
  "husky": "^9",
20
44
  "imagemin-lint-staged": "^0.5",
@@ -29,10 +53,17 @@
29
53
  "optional": true
30
54
  }
31
55
  },
56
+ "engines": {
57
+ "node": ">=22.0.0"
58
+ },
32
59
  "publishConfig": {
33
60
  "access": "public"
34
61
  },
35
62
  "releases": "https://github.com/theholocron/configs/releases",
36
63
  "wiki": "https://github.com/theholocron/configs/wiki",
37
- "scripts": {}
64
+ "scripts": {
65
+ "build": "tsdown",
66
+ "typecheck": "tsc --noEmit",
67
+ "test": "vitest run"
68
+ }
38
69
  }
package/CHANGELOG.md DELETED
@@ -1,75 +0,0 @@
1
- # @theholocron/lint-staged-config
2
-
3
- ## 4.1.0
4
-
5
- ## 4.0.0
6
-
7
- ### Major Changes
8
-
9
- - [`14a6658`](https://github.com/theholocron/configs/commit/14a6658dfccae1206f629783be6f7aed59b28ebf) Thanks [@iamnewton](https://github.com/iamnewton)! - update all dependencies to be latest
10
-
11
- ## 3.5.1
12
-
13
- ### Patch Changes
14
-
15
- - [`63a4c85`](https://github.com/theholocron/configs/commit/63a4c858b9e76566798aeb1dd45e4feddd83fb70) Thanks [@iamnewton](https://github.com/iamnewton)! - Remove registry url
16
-
17
- ## 3.4.4
18
-
19
- ### Patch Changes
20
-
21
- - [`2e3ce74`](https://github.com/theholocron/configs/commit/2e3ce74b54f83e344bcf79cb9e71fca0ed6e058e) Thanks [@iamnewton](https://github.com/iamnewton)! - Add in tsc as dependency
22
-
23
- ## 3.4.3
24
-
25
- ### Patch Changes
26
-
27
- - [`11f27c4`](https://github.com/theholocron/configs/commit/11f27c4c3db883ebb8141b7c4075e74887defc90) Thanks [@iamnewton](https://github.com/iamnewton)! - Add dependency to storybook config
28
-
29
- ## 3.4.2
30
-
31
- ### Patch Changes
32
-
33
- - [`d82832c`](https://github.com/theholocron/configs/commit/d82832c27aa3aa775365628bce98f82a5fe129b6) Thanks [@iamnewton](https://github.com/iamnewton)! - fix issue with deprecated prettier config values
34
-
35
- ## 3.4.1
36
-
37
- ### Patch Changes
38
-
39
- - [`55b8263`](https://github.com/theholocron/configs/commit/55b8263d8ab99d804e6e5a77d677f1ad0637b5e1) Thanks [@iamnewton](https://github.com/iamnewton)! - Fix issue with prettier config main export
40
-
41
- ## 3.4.0
42
-
43
- ### Minor Changes
44
-
45
- - [`6dfd8d4`](https://github.com/theholocron/configs/commit/6dfd8d4b1a58459d35af4253db59402e500f92b0) Thanks [@iamnewton](https://github.com/iamnewton)! - Update prettier to use module
46
-
47
- ## 3.3.0
48
-
49
- ### Minor Changes
50
-
51
- - [`30e50b0`](https://github.com/theholocron/configs/commit/30e50b000dd1f9ac61e3ad1c3abee2ab3a52e7ac) Thanks [@iamnewton](https://github.com/iamnewton)! - Add in stylelint
52
-
53
- ## 3.2.1
54
-
55
- ### Patch Changes
56
-
57
- - [`3d54f12`](https://github.com/theholocron/configs/commit/3d54f12618e8a6cc6ccc4559eb48ef402bb04d77) Thanks [@iamnewton](https://github.com/iamnewton)! - Fix the storybook config; its missing the index file from the export
58
-
59
- ## 3.2.0
60
-
61
- ### Minor Changes
62
-
63
- - [`46d40c1`](https://github.com/theholocron/configs/commit/46d40c17d963b3c81fd6fdf308da4228112f5fe4) Thanks [@iamnewton](https://github.com/iamnewton)! - Add more to eslint-config, add in storybook-config
64
-
65
- ## 3.1.0
66
-
67
- ### Minor Changes
68
-
69
- - [`4f8154a`](https://github.com/theholocron/configs/commit/4f8154a534d5d7668cd2659da322448f39646aed) Thanks [@iamnewton](https://github.com/iamnewton)! - Update to include Alex language linting in lint-staging
70
-
71
- ## 3.0.0
72
-
73
- ### Major Changes
74
-
75
- - [`88d7f99`](https://github.com/theholocron/configs/commit/88d7f995dd02cdbe63817ac0d13905d5aea3777a) Thanks [@iamnewton](https://github.com/iamnewton)! - Initial release