@alexlit/lint-kit 106.2.0 → 107.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.
Files changed (2) hide show
  1. package/README.md +11 -151
  2. package/package.json +1 -1
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.0.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": [