@alexlit/lint-kit 106.2.0 → 107.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
@@ -1,162 +1,22 @@
1
1
  # Lint Kit
2
2
 
3
- Preset of configuration files and dependencies for linting web applications
3
+ Presets of configuration files and dependencies for linting web applications
4
4
  (designed for [Vue.js](https://vuejs.org) with
5
5
  [TypeScript](https://www.typescriptlang.org/))
6
6
 
7
7
  ## Installation
8
8
 
9
9
  ```sh
10
- npm i @alexlit/lint-kit -D
10
+ npm i @alexlit/config-commitlint @alexlit/config-eslint @alexlit/config-hooks @alexlit/config-htmllint @alexlit/config-markdownlint @alexlit/config-npmlint @alexlit/config-prettier @alexlit/config-stylelint --legacy-peer-deps -D
11
11
  ```
12
12
 
13
- ## Connection
13
+ ## Configuration
14
14
 
15
- ### [Prettier](https://github.com/alex-lit/config-prettier)
16
-
17
- `.prettierrc.js`:
18
-
19
- ```js
20
- module.exports = {
21
- ...require('@alexlit/lint-kit/.prettierrc'),
22
- };
23
- ```
24
-
25
- ### [ESLint](https://github.com/alex-lit/config-eslint)
26
-
27
- `.eslintrc.js`:
28
-
29
- ```js
30
- module.exports = {
31
- extends: ['./node_modules/@alexlit/lint-kit/.eslintrc.js'],
32
- };
33
- ```
34
-
35
- ### [StyleLint](https://github.com/alex-lit/config-stylelint)
36
-
37
- `.stylelintrc.js`:
38
-
39
- ```js
40
- module.exports = {
41
- extends: ['@alexlit/lint-kit/.stylelintrc.js'],
42
-
43
- ignoreFiles: [...require('@alexlit/lint-kit/.stylelintrc').ignoreFiles],
44
- };
45
- ```
46
-
47
- ### [HTMLLint](https://github.com/alex-lit/config-htmllint)
48
-
49
- `.linthtmlrc.js`:
50
-
51
- ```js
52
- module.exports = {
53
- ...require('@alexlit/lint-kit/.linthtmlrc'),
54
- };
55
- ```
56
-
57
- ### [MarkdownLint](https://github.com/alex-lit/config-markdownlint)
58
-
59
- `.markdownlintrc.js`:
60
-
61
- ```js
62
- module.exports = {
63
- ...require('@alexlit/lint-kit/.markdownlintrc'),
64
- };
65
- ```
66
-
67
- ### [NPMLint](https://github.com/tclindner/npm-package-json-lint)
68
-
69
- `.npmpackagejsonlintrc.json`:
70
-
71
- ```json
72
- {
73
- "extends": "@alexlit/lint-kit/.npmpackagejsonlintrc.json"
74
- }
75
- ```
76
-
77
- ### [CommitLint](https://github.com/alex-lit/config-commitlint)
78
-
79
- `.commitlintrc.js`:
80
-
81
- ```js
82
- module.exports = {
83
- extends: ['@alexlit/lint-kit/.commitlintrc.js'],
84
- };
85
- ```
86
-
87
- `.huskyrc.js`:
88
-
89
- ```js
90
- module.exports = {
91
- hooks: {
92
- 'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
93
- },
94
- };
95
- ```
96
-
97
- ## Recipes
98
-
99
- ### Automatic launch linters and code fixes on commit
100
-
101
- `.lintstagedrc.js`:
102
-
103
- ```js
104
- module.exports = {
105
- ...require('@alexlit/lint-kit/.lintstagedrc'),
106
- };
107
- ```
108
-
109
- `.huskyrc.js`:
110
-
111
- ```js
112
- module.exports = {
113
- ...require('@alexlit/lint-kit/.huskyrc'),
114
- };
115
- ```
116
-
117
- ### Launching linters manually
118
-
119
- `package.json`:
120
-
121
- ```json
122
- "scripts": {
123
- "lint": "./node_modules/@alexlit/lint-kit/scripts/lint.sh",
124
- "lint:eslint": "./node_modules/@alexlit/lint-kit/scripts/lint.eslint.sh",
125
- "lint:htmllint": "./node_modules/@alexlit/lint-kit/scripts/lint.htmllint.sh",
126
- "lint:markdownlint": "./node_modules/@alexlit/lint-kit/scripts/lint.markdownlint.sh",
127
- "lint:npmlint": "./node_modules/@alexlit/lint-kit/scripts/lint.npmlint.sh",
128
- "lint:stylelint": "./node_modules/@alexlit/lint-kit/scripts/lint.stylelint.sh",
129
- },
130
- ```
131
-
132
- ```sh
133
- # lint
134
- npm run lint
135
- # autofix errors
136
- npm run lint fix
137
- ```
138
-
139
- ### Publishing a package
140
-
141
- `.npmrc`:
142
-
143
- ```ini
144
- globalconfig="./node_modules/@alexlit/lint-kit/.npmrc"
145
- ```
146
-
147
- `package.json`:
148
-
149
- ```json
150
- "scripts": {
151
- "publish": "./node_modules/@alexlit/lint-kit/scripts/publish.sh",
152
- "semver": "./node_modules/@alexlit/lint-kit/scripts/semver.sh",
153
- "up": "./node_modules/@alexlit/lint-kit/scripts/up.sh",
154
- "version": "./node_modules/@alexlit/lint-kit/scripts/version.sh"
155
- },
156
- ```
157
-
158
- ```sh
159
- npm run up # Updates dependencies
160
- npm run semver <patch | minor | major> # Updates package version
161
- npm publish # Publishes a package to npm repository
162
- ```
15
+ - [commitlint](https://github.com/alex-lit/lint-kit/blob/master/packages/config-commitlint/README.md)
16
+ - [eslint](https://github.com/alex-lit/lint-kit/blob/master/packages/config-eslint/README.md)
17
+ - [hooks](https://github.com/alex-lit/lint-kit/blob/master/packages/config-hooks/README.md)
18
+ - [htmllint](https://github.com/alex-lit/lint-kit/blob/master/packages/config-htmllint/README.md)
19
+ - [markdownlint](https://github.com/alex-lit/lint-kit/blob/master/packages/config-markdownlint/README.md)
20
+ - [npmlint](https://github.com/alex-lit/lint-kit/blob/master/packages/config-npmlint/README.md)
21
+ - [prettier](https://github.com/alex-lit/lint-kit/blob/master/packages/config-prettier/README.md)
22
+ - [stylelint](https://github.com/alex-lit/lint-kit/blob/master/packages/config-stylelint/README.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/lint-kit",
3
- "version": "106.2.0",
3
+ "version": "107.1.0",
4
4
  "private": false,
5
5
  "description": "Preset of configuration files and dependencies for linting web applications (designed for Vue.js with TypeScript)",
6
6
  "keywords": [
@@ -63,16 +63,6 @@
63
63
  "semver": "./scripts/semver.sh",
64
64
  "up": "./scripts/up.sh"
65
65
  },
66
- "dependencies": {
67
- "@alexlit/config-commitlint": "^10.1.0",
68
- "@alexlit/config-eslint": "^70.1.2",
69
- "@alexlit/config-hooks": "^0.0.2",
70
- "@alexlit/config-htmllint": "^1.0.1",
71
- "@alexlit/config-markdownlint": "^2.0.2",
72
- "@alexlit/config-npmlint": "^5.0.1",
73
- "@alexlit/config-prettier": "^14.0.2",
74
- "@alexlit/config-stylelint": "^38.5.0"
75
- },
76
66
  "devDependencies": {
77
67
  "changelogen": "latest",
78
68
  "typescript": "^5.2.2"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-commitlint",
3
- "version": "10.2.0",
3
+ "version": "10.2.1",
4
4
  "private": false,
5
5
  "description": "Commitlint config",
6
6
  "keywords": [
@@ -31,7 +31,7 @@
31
31
  "up": "../../scripts/up.sh"
32
32
  },
33
33
  "dependencies": {
34
- "@commitlint/cli": "^18.4.0",
34
+ "@commitlint/cli": "^18.4.1",
35
35
  "@commitlint/config-conventional": "^18.4.0",
36
36
  "conventional-changelog-cli": "^4.1.0"
37
37
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-hooks",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "private": false,
5
5
  "description": "Hooks config",
6
6
  "keywords": [
@@ -33,6 +33,6 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "husky": "^4.3.8",
36
- "lint-staged": "^15.0.2"
36
+ "lint-staged": "^15.1.0"
37
37
  }
38
- }
38
+ }
@@ -0,0 +1,16 @@
1
+ # Prettier Configuration
2
+
3
+ ## Installation
4
+
5
+ ```sh
6
+ npm i @alexlit/config-prettier -D
7
+ ```
8
+
9
+ ## Connection
10
+
11
+ ```js
12
+ // .prettierrc.js
13
+ module.exports = {
14
+ ...require('@alexlit/config-prettier'),
15
+ };
16
+ ```
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-prettier",
3
- "version": "15.3.0",
3
+ "version": "15.4.0",
4
4
  "private": false,
5
5
  "description": "prettier config",
6
6
  "keywords": [
@@ -36,14 +36,14 @@
36
36
  "@prettier/plugin-pug": "^3.0.0",
37
37
  "@prettier/plugin-ruby": "^4.0.2",
38
38
  "@prettier/plugin-xml": "^3.2.2",
39
- "prettier": "^3.0.3",
39
+ "prettier": "^3.1.0",
40
40
  "prettier-plugin-jsdoc": "^1.1.1",
41
41
  "prettier-plugin-packagejson": "^2.4.6",
42
42
  "prettier-plugin-sh": "^0.13.1",
43
43
  "prettier-plugin-solidity": "^1.2.0",
44
44
  "prettier-plugin-sort-json": "^3.1.0",
45
- "prettier-plugin-sql": "^0.15.3",
46
- "prettier-plugin-svelte": "^3.0.3",
45
+ "prettier-plugin-sql": "^0.16.0",
46
+ "prettier-plugin-svelte": "^3.1.0",
47
47
  "prettier-plugin-tailwindcss": "^0.5.7"
48
48
  }
49
49
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-stylelint",
3
- "version": "38.5.1",
3
+ "version": "38.6.0",
4
4
  "private": false,
5
5
  "description": "Stylelint config",
6
6
  "keywords": [
@@ -35,7 +35,7 @@
35
35
  "@double-great/stylelint-a11y": "^2.0.2",
36
36
  "postcss": "^8.4.31",
37
37
  "postcss-html": "^1.5.0",
38
- "prettier": "^3.0.3",
38
+ "prettier": "^3.1.0",
39
39
  "stylelint": "^15.11.0",
40
40
  "stylelint-at-rule-no-children": "^0.3.1",
41
41
  "stylelint-color-format": "^1.1.0",
package/scripts/semver.sh CHANGED
@@ -6,17 +6,18 @@ DEFAULT='\e[39m'
6
6
  GREEN='\e[32m'
7
7
  YELLOW='\e[33m'
8
8
 
9
- CURRENT_DIR=${PWD##*/}
9
+ MAIN_PACKAGE="@alexlit/lint-kit"
10
+ CURRENT_PACKAGE=$(node -p "require('./package.json').name")
10
11
 
11
12
  clear
12
13
 
13
- echo -e "${YELLOW}Поднимаю ${GREEN}${VERSION}${YELLOW} версию пакета ${GREEN}${CURRENT_DIR}${YELLOW}...${DEFAULT}"
14
+ echo -e "${YELLOW}Поднимаю ${GREEN}${VERSION}${YELLOW} версию пакета ${GREEN}${CURRENT_PACKAGE}${YELLOW}...${DEFAULT}"
14
15
 
15
- changelogen --bump --${VERSION}
16
+ changelogen --release --no-commit --${VERSION}
16
17
 
17
- if [ $CURRENT_DIR != 'lint-kit' ]; then
18
+ if [ $CURRENT_PACKAGE != $MAIN_PACKAGE ]; then
18
19
  rm CHANGELOG.md
19
20
  fi
20
21
 
21
22
  git add .
22
- git commit -m "chore(${CURRENT_DIR}): bump version"
23
+ git commit -m "chore(${CURRENT_PACKAGE}): bump version"