@alexlit/lint-kit 202.0.0 → 203.0.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/package.json +1 -1
- package/packages/config-eslint/CHANGELOG.md +13 -0
- package/packages/config-eslint/package.json +3 -3
- package/packages/config-eslint/plugins/perfectionist.js +1 -1
- package/packages/config-hooks/CHANGELOG.md +7 -0
- package/packages/config-hooks/README.md +47 -3
- package/packages/config-hooks/package.json +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v153.4.0
|
|
5
|
+
|
|
6
|
+
[compare changes](https://github.com/alex-lit/lint-kit/compare/@alexlit/config-eslint@153.3.0...v153.4.0)
|
|
7
|
+
|
|
8
|
+
### 🏡 Chore
|
|
9
|
+
|
|
10
|
+
- **@alexlit/lint-kit:** Bump version ([85b0b3a2](https://github.com/alex-lit/lint-kit/commit/85b0b3a2))
|
|
11
|
+
- **@alexlit/config-hooks:** Bump version ([d1e01056](https://github.com/alex-lit/lint-kit/commit/d1e01056))
|
|
12
|
+
|
|
13
|
+
### ❤️ Contributors
|
|
14
|
+
|
|
15
|
+
- Alexey Litovchenko ([@alex-lit](https://github.com/alex-lit))
|
|
16
|
+
|
|
4
17
|
## v153.3.0
|
|
5
18
|
|
|
6
19
|
[compare changes](https://github.com/alex-lit/lint-kit/compare/@alexlit/config-eslint@153.2.1...v153.3.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "153.
|
|
3
|
+
"version": "153.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Sharable ESLint configuration",
|
|
6
6
|
"keywords": [
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"@vitest/eslint-plugin": "^1.6.27",
|
|
50
50
|
"eslint": "^10.8.1",
|
|
51
51
|
"eslint-config-prettier": "^10.1.8",
|
|
52
|
-
"eslint-plugin-jsdoc": "^64.2.
|
|
52
|
+
"eslint-plugin-jsdoc": "^64.2.1",
|
|
53
53
|
"eslint-plugin-perfectionist": "^5.10.1",
|
|
54
54
|
"eslint-plugin-pinia": "^0.4.2",
|
|
55
55
|
"eslint-plugin-prettier": "^5.5.6",
|
|
56
56
|
"eslint-plugin-regexp": "^3.2.0",
|
|
57
57
|
"eslint-plugin-sonarjs": "^4.2.0",
|
|
58
|
-
"eslint-plugin-tailwindcss": "^4.
|
|
58
|
+
"eslint-plugin-tailwindcss": "^4.3.0",
|
|
59
59
|
"eslint-plugin-unicorn": "^73.0.0",
|
|
60
60
|
"eslint-plugin-vue": "^10.10.0",
|
|
61
61
|
"eslint-plugin-vuejs-accessibility": "^2.6.0",
|
|
@@ -5,7 +5,7 @@ import { FILES } from '../presets/base.js';
|
|
|
5
5
|
|
|
6
6
|
/** @see [eslint-plugin-perfectionist](https://perfectionist.dev) */
|
|
7
7
|
export const perfectionist = defineConfig([
|
|
8
|
-
{
|
|
8
|
+
{ ...plugin.configs['recommended-natural'], files: FILES },
|
|
9
9
|
{
|
|
10
10
|
files: FILES,
|
|
11
11
|
rules: {
|
|
@@ -16,9 +16,7 @@ npm i @alexlit/config-hooks -D
|
|
|
16
16
|
|
|
17
17
|
export default createLintStagedConfig(
|
|
18
18
|
// optional plugins list
|
|
19
|
-
{
|
|
20
|
-
stylelint: false,
|
|
21
|
-
},
|
|
19
|
+
{ stylelint: false },
|
|
22
20
|
|
|
23
21
|
// optional config
|
|
24
22
|
{
|
|
@@ -28,11 +26,57 @@ npm i @alexlit/config-hooks -D
|
|
|
28
26
|
);
|
|
29
27
|
```
|
|
30
28
|
|
|
29
|
+
# Runner examples
|
|
30
|
+
|
|
31
|
+
- simple-git-hooks
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
// package.json
|
|
35
|
+
{
|
|
36
|
+
"scripts": { "prepare": "simple-git-hooks" },
|
|
37
|
+
"simple-git-hooks": {
|
|
38
|
+
"commit-msg": "npx commitlint --edit",
|
|
39
|
+
"pre-commit": "npx lint-staged"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
npx simple-git-hooks
|
|
46
|
+
```
|
|
47
|
+
|
|
31
48
|
- husky
|
|
32
49
|
|
|
50
|
+
```json
|
|
51
|
+
// package.json
|
|
52
|
+
{ "scripts": { "prepare": "husky" } }
|
|
53
|
+
```
|
|
54
|
+
|
|
33
55
|
```sh
|
|
34
56
|
npx husky init
|
|
35
57
|
|
|
36
58
|
echo 'npx --no -- commitlint --edit "$1"' > .husky/commit-msg
|
|
37
59
|
echo 'npx --no lint-staged' > .husky/pre-commit
|
|
38
60
|
```
|
|
61
|
+
|
|
62
|
+
- git (native)
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{ "scripts": { "prepare": "git config core.hooksPath .githooks" } }
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
# 1. Создаем нативную папку и привязываем её к Git
|
|
70
|
+
mkdir -p .githooks && git config core.hooksPath .githooks
|
|
71
|
+
|
|
72
|
+
# 2. Создаем хук pre-commit
|
|
73
|
+
echo '#!/bin/sh' > .githooks/pre-commit
|
|
74
|
+
echo 'npx --no -- lint-staged' >> .githooks/pre-commit
|
|
75
|
+
|
|
76
|
+
# 3. Создаем хук commit-msg
|
|
77
|
+
echo '#!/bin/sh' > .githooks/commit-msg
|
|
78
|
+
echo 'npx --no -- commitlint --edit "$1"' >> .githooks/commit-msg
|
|
79
|
+
|
|
80
|
+
# 4. Делаем файлы исполняемыми
|
|
81
|
+
chmod +x .githooks/pre-commit .githooks/commit-msg
|
|
82
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-hooks",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Hooks config",
|
|
6
6
|
"keywords": [
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"husky": "^9.1.7",
|
|
40
|
-
"lint-staged": "^17.3.0"
|
|
40
|
+
"lint-staged": "^17.3.0",
|
|
41
|
+
"simple-git-hooks": "^2.13.1"
|
|
41
42
|
},
|
|
42
43
|
"publishConfig": {
|
|
43
44
|
"access": "public",
|