@lobehub/lint 1.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/LICENSE +21 -0
- package/README.md +240 -0
- package/dist/changelog/index.d.ts +0 -0
- package/dist/changelog/index.js +4 -0
- package/dist/commitlint/index.d.ts +0 -0
- package/dist/commitlint/index.js +4 -0
- package/dist/eslint/index.d.ts +0 -0
- package/dist/eslint/index.js +38 -0
- package/dist/prettier/index.d.ts +0 -0
- package/dist/prettier/index.js +53 -0
- package/dist/remarklint/index.d.ts +0 -0
- package/dist/remarklint/index.js +44 -0
- package/dist/semantic-release/index.d.ts +0 -0
- package/dist/semantic-release/index.js +4 -0
- package/dist/stylelint/index.d.ts +0 -0
- package/dist/stylelint/index.js +55 -0
- package/package.json +72 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 CanisMinor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
<a name="readme-top"></a>
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<img width="160" src="https://raw.githubusercontent.com/lobehub/.github/main/profile/Logo.webp">
|
|
6
|
+
|
|
7
|
+
<h1>Lobe-Lint</h1>
|
|
8
|
+
|
|
9
|
+
ESlint config, Prettier config, Remark config for LobeHub
|
|
10
|
+
|
|
11
|
+
[Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url]
|
|
12
|
+
|
|
13
|
+
<!-- SHIELD GROUP -->
|
|
14
|
+
|
|
15
|
+
[![release][release-shield]][release-url]
|
|
16
|
+
[![releaseDate][release-date-shield]][release-date-url]
|
|
17
|
+
[![ciTest][ci-test-shield]][ci-test-url]
|
|
18
|
+
[![ciRelease][ci-release-shield]][ci-release-url] <br/>
|
|
19
|
+
[![contributors][contributors-shield]][contributors-url]
|
|
20
|
+
[![forks][forks-shield]][forks-url]
|
|
21
|
+
[![stargazers][stargazers-shield]][stargazers-url]
|
|
22
|
+
[![issues][issues-shield]][issues-url]
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
<details>
|
|
29
|
+
<summary><kbd>Table of contents</kbd></summary>
|
|
30
|
+
|
|
31
|
+
#### TOC
|
|
32
|
+
|
|
33
|
+
- [📦 Installation](#-installation)
|
|
34
|
+
|
|
35
|
+
- [🤯 Usage](#-usage)
|
|
36
|
+
|
|
37
|
+
- [Eslint](#eslint)
|
|
38
|
+
- [Stylelint](#stylelint)
|
|
39
|
+
- [Commitlint](#commitlint)
|
|
40
|
+
- [Changelog](#changelog)
|
|
41
|
+
- [Remark](#remark)
|
|
42
|
+
- [Prettier](#prettier)
|
|
43
|
+
- [Semantic Release](#semantic-release)
|
|
44
|
+
|
|
45
|
+
- [⌨️ Local Development](#️-local-development)
|
|
46
|
+
|
|
47
|
+
- [🤝 Contributing](#-contributing)
|
|
48
|
+
|
|
49
|
+
####
|
|
50
|
+
|
|
51
|
+
</details>
|
|
52
|
+
|
|
53
|
+
## 📦 Installation
|
|
54
|
+
|
|
55
|
+
To install Lobe Lint, run the following command:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pnpm add lobehub/lint -D
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
<div align="right">
|
|
62
|
+
|
|
63
|
+
[![][back-to-top]](#readme-top)
|
|
64
|
+
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
## 🤯 Usage
|
|
68
|
+
|
|
69
|
+
### Eslint
|
|
70
|
+
|
|
71
|
+
config can be found at `./src/eslint/index.ts`
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
module.exports = require('lobehub/lint/dist/eslint');
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Stylelint
|
|
78
|
+
|
|
79
|
+
config can be found at `./src/stylelint/index.ts`
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
module.exports = require('lobehub/lint/dist/stylelint');
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Commitlint
|
|
86
|
+
|
|
87
|
+
config can be found at `./src/commitlint/index.ts`
|
|
88
|
+
|
|
89
|
+
```js
|
|
90
|
+
// .commitlintrc.js
|
|
91
|
+
|
|
92
|
+
module.exports = require('lobehub/lint/dist/commitlint');
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Changelog
|
|
96
|
+
|
|
97
|
+
config can be found at `./src/changelog/index.ts`
|
|
98
|
+
|
|
99
|
+
```js
|
|
100
|
+
// .changelogrc.js
|
|
101
|
+
|
|
102
|
+
module.exports = require('lobehub/lint/dist/commitlint');
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Remark
|
|
106
|
+
|
|
107
|
+
config can be found at `./src/remarklint/index.ts`
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
// .remarkrc.js
|
|
111
|
+
|
|
112
|
+
module.exports = require('lobehub/lint/dist/remarklint');
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Prettier
|
|
116
|
+
|
|
117
|
+
config can be found at `./src/prettier/index.ts`
|
|
118
|
+
|
|
119
|
+
```js
|
|
120
|
+
// .prettierrc.js
|
|
121
|
+
|
|
122
|
+
module.exports = require('lobehub/lint/dist/prettier');
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Semantic Release
|
|
126
|
+
|
|
127
|
+
config can be found at `./src/semantic-release/index.ts`
|
|
128
|
+
|
|
129
|
+
```js
|
|
130
|
+
// .releaserc.js
|
|
131
|
+
|
|
132
|
+
module.exports = require('lobehub/lint/dist/semantic-release');
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
<div align="right">
|
|
136
|
+
|
|
137
|
+
[![][back-to-top]](#readme-top)
|
|
138
|
+
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
## ⌨️ Local Development
|
|
142
|
+
|
|
143
|
+
You can use Gitpod for online development:
|
|
144
|
+
|
|
145
|
+
[][gitpod-url]
|
|
146
|
+
|
|
147
|
+
Or clone it for local development:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
$ git clone https://github.com/lobehub/lint.git
|
|
151
|
+
$ cd lobehub/lint
|
|
152
|
+
$ npm install
|
|
153
|
+
$ npm start
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
<div align="right">
|
|
157
|
+
|
|
158
|
+
[![][back-to-top]](#readme-top)
|
|
159
|
+
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
## 🤝 Contributing
|
|
163
|
+
|
|
164
|
+
<!-- CONTRIBUTION GROUP -->
|
|
165
|
+
|
|
166
|
+
> 📊 Total: <kbd>**3**</kbd>
|
|
167
|
+
|
|
168
|
+
<a href="https://github.com/canisminor1990" title="canisminor1990">
|
|
169
|
+
<img src="https://avatars.githubusercontent.com/u/17870709?v=4" width="50" />
|
|
170
|
+
</a>
|
|
171
|
+
<a href="https://github.com/actions-user" title="actions-user">
|
|
172
|
+
<img src="https://avatars.githubusercontent.com/u/65916846?v=4" width="50" />
|
|
173
|
+
</a>
|
|
174
|
+
<a href="https://github.com/apps/dependabot" title="dependabot[bot]">
|
|
175
|
+
<img src="https://avatars.githubusercontent.com/in/29110?v=4" width="50" />
|
|
176
|
+
</a>
|
|
177
|
+
|
|
178
|
+
<!-- CONTRIBUTION END -->
|
|
179
|
+
|
|
180
|
+
<div align="right">
|
|
181
|
+
|
|
182
|
+
[![][back-to-top]](#readme-top)
|
|
183
|
+
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
#### 📝 License
|
|
189
|
+
|
|
190
|
+
Copyright © 2023 [CanisMinor][profile-url]. <br />
|
|
191
|
+
This project is [MIT](./LICENSE) licensed.
|
|
192
|
+
|
|
193
|
+
<!-- LINK GROUP -->
|
|
194
|
+
|
|
195
|
+
[profile-url]: https://github.com/canisminor1990
|
|
196
|
+
[gitpod-url]: https://gitpod.io/#https://github.com/lobehub/lint
|
|
197
|
+
|
|
198
|
+
<!-- SHIELD LINK GROUP -->
|
|
199
|
+
|
|
200
|
+
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
|
|
201
|
+
|
|
202
|
+
<!-- release -->
|
|
203
|
+
|
|
204
|
+
[release-shield]: https://img.shields.io/npm/v/@lobehub/lint?label=%F0%9F%A4%AF%20NPM
|
|
205
|
+
[release-url]: https://www.npmjs.com/package/@lobehub/lint
|
|
206
|
+
|
|
207
|
+
<!-- releaseDate -->
|
|
208
|
+
|
|
209
|
+
[release-date-shield]: https://img.shields.io/github/release-date/lobehub/lint?style=flat
|
|
210
|
+
[release-date-url]: https://github.com/lobehub/lint/releases
|
|
211
|
+
|
|
212
|
+
<!-- ciTest -->
|
|
213
|
+
|
|
214
|
+
[ci-test-shield]: https://github.com/lobehub/lint/workflows/Test%20CI/badge.svg
|
|
215
|
+
[ci-test-url]: https://github.com/lobehub/lint/actions/workflows/test.yml
|
|
216
|
+
|
|
217
|
+
<!-- ciRelease -->
|
|
218
|
+
|
|
219
|
+
[ci-release-shield]: https://github.com/lobehub/lint/workflows/Build%20and%20Release/badge.svg
|
|
220
|
+
[ci-release-url]: https://github.com/lobehub/lint/actions/workflows/release.yml
|
|
221
|
+
|
|
222
|
+
<!-- contributors -->
|
|
223
|
+
|
|
224
|
+
[contributors-shield]: https://img.shields.io/github/contributors/lobehub/lint.svg?style=flat
|
|
225
|
+
[contributors-url]: https://github.com/lobehub/lint/graphs/contributors
|
|
226
|
+
|
|
227
|
+
<!-- forks -->
|
|
228
|
+
|
|
229
|
+
[forks-shield]: https://img.shields.io/github/forks/lobehub/lint.svg?style=flat
|
|
230
|
+
[forks-url]: https://github.com/lobehub/lint/network/members
|
|
231
|
+
|
|
232
|
+
<!-- stargazers -->
|
|
233
|
+
|
|
234
|
+
[stargazers-shield]: https://img.shields.io/github/stars/lobehub/lint.svg?style=flat
|
|
235
|
+
[stargazers-url]: https://github.com/lobehub/lint/stargazers
|
|
236
|
+
|
|
237
|
+
<!-- issues -->
|
|
238
|
+
|
|
239
|
+
[issues-shield]: https://img.shields.io/github/issues/lobehub/lint.svg?style=flat
|
|
240
|
+
[issues-url]: https://github.com/lobehub/lint/issues/new/choose
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from))
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
+
mod
|
|
22
|
+
));
|
|
23
|
+
|
|
24
|
+
// src/eslint/index.ts
|
|
25
|
+
module.exports = {
|
|
26
|
+
extends: [require.resolve("@umijs/lint/dist/config/eslint")],
|
|
27
|
+
plugins: ["simple-import-sort", "import", "typescript-sort-keys"],
|
|
28
|
+
rules: {
|
|
29
|
+
"simple-import-sort/exports": "error",
|
|
30
|
+
"import/first": "error",
|
|
31
|
+
"import/newline-after-import": "error",
|
|
32
|
+
"import/no-duplicates": "error",
|
|
33
|
+
"typescript-sort-keys/interface": "error",
|
|
34
|
+
"typescript-sort-keys/string-enum": "error",
|
|
35
|
+
"react/jsx-sort-props": "error",
|
|
36
|
+
"react/jsx-no-useless-fragment": "error"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from))
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
+
mod
|
|
22
|
+
));
|
|
23
|
+
|
|
24
|
+
// src/prettier/index.ts
|
|
25
|
+
module.exports = {
|
|
26
|
+
plugins: [
|
|
27
|
+
require.resolve("prettier-plugin-organize-imports"),
|
|
28
|
+
require.resolve("prettier-plugin-packagejson"),
|
|
29
|
+
require.resolve("prettier-plugin-sort-json"),
|
|
30
|
+
require.resolve("@trivago/prettier-plugin-sort-imports")
|
|
31
|
+
],
|
|
32
|
+
printWidth: 100,
|
|
33
|
+
proseWrap: "never",
|
|
34
|
+
singleQuote: true,
|
|
35
|
+
trailingComma: "all",
|
|
36
|
+
importOrderSeparation: true,
|
|
37
|
+
importOrderSortSpecifiers: true,
|
|
38
|
+
importOrder: ["<THIRD_PARTY_MODULES>", "^@/(.*)$", "^[./]"],
|
|
39
|
+
overrides: [
|
|
40
|
+
{
|
|
41
|
+
files: "*.md",
|
|
42
|
+
options: {
|
|
43
|
+
proseWrap: "preserve"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
files: ["*.js", "*.jsx", "*.mjs", "*.cjs", "*.ts", "*.tsx"],
|
|
48
|
+
options: {
|
|
49
|
+
parser: require.resolve("prettier-sort-destructure")
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// src/remarklint/index.ts
|
|
2
|
+
module.exports = {
|
|
3
|
+
plugins: [
|
|
4
|
+
"remark-gfm",
|
|
5
|
+
"remark-frontmatter",
|
|
6
|
+
// ----- Presets -----------------------------------------------------------
|
|
7
|
+
"remark-preset-lint-markdown-style-guide",
|
|
8
|
+
"remark-preset-lint-recommended",
|
|
9
|
+
"remark-preset-lint-consistent",
|
|
10
|
+
// ----- Built-In ----------------------------------------------------------
|
|
11
|
+
"remark-lint-checkbox-content-indent",
|
|
12
|
+
"remark-lint-linebreak-style",
|
|
13
|
+
"remark-lint-no-duplicate-headings-in-section",
|
|
14
|
+
"remark-lint-no-empty-url",
|
|
15
|
+
"remark-lint-no-heading-indent",
|
|
16
|
+
"remark-lint-no-heading-like-paragraph",
|
|
17
|
+
"remark-lint-no-paragraph-content-indent",
|
|
18
|
+
"remark-lint-no-reference-like-url",
|
|
19
|
+
"remark-lint-no-tabs",
|
|
20
|
+
"remark-lint-no-unneeded-full-reference-image",
|
|
21
|
+
"remark-lint-no-unneeded-full-reference-link",
|
|
22
|
+
// ----- External ----------------------------------------------------------
|
|
23
|
+
"remark-lint-no-empty-sections",
|
|
24
|
+
"remark-lint-write-good",
|
|
25
|
+
"remark-lint-frontmatter-schema",
|
|
26
|
+
["remark-toc", { heading: "TOC", maxDepth: 3 }],
|
|
27
|
+
// ----- Overrides ---------------------------------------------------------
|
|
28
|
+
["remark-lint-list-item-indent", "space"],
|
|
29
|
+
["remark-lint-list-item-spacing", { checkBlanks: true }],
|
|
30
|
+
["remark-lint-no-duplicate-headings", false],
|
|
31
|
+
["remark-lint-no-file-name-irregular-characters", "\\.a-zA-Z0-9-_"],
|
|
32
|
+
["remark-lint-no-file-name-mixed-case", false],
|
|
33
|
+
["remark-lint-no-literal-urls", false],
|
|
34
|
+
["remark-lint-no-shell-dollars", false],
|
|
35
|
+
["remark-lint-ordered-list-marker-value", false]
|
|
36
|
+
],
|
|
37
|
+
settings: {
|
|
38
|
+
bullet: "-",
|
|
39
|
+
fences: true,
|
|
40
|
+
listItemIndent: 1,
|
|
41
|
+
rule: "-",
|
|
42
|
+
tightDefinitions: true
|
|
43
|
+
}
|
|
44
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from))
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
+
mod
|
|
22
|
+
));
|
|
23
|
+
|
|
24
|
+
// src/stylelint/index.ts
|
|
25
|
+
module.exports = {
|
|
26
|
+
extends: [
|
|
27
|
+
"stylelint-config-recommended",
|
|
28
|
+
require.resolve("@umijs/lint/dist/config/stylelint"),
|
|
29
|
+
"stylelint-config-clean-order"
|
|
30
|
+
],
|
|
31
|
+
plugins: ["stylelint-order"],
|
|
32
|
+
overrides: [
|
|
33
|
+
{
|
|
34
|
+
files: ["*.less", "*.css"],
|
|
35
|
+
plugins: ["stylelint-less"],
|
|
36
|
+
customSyntax: "postcss-less",
|
|
37
|
+
rules: {
|
|
38
|
+
"function-no-unknown": null,
|
|
39
|
+
"at-rule-no-unknown": null,
|
|
40
|
+
"color-no-invalid-hex": true,
|
|
41
|
+
"less/color-no-invalid-hex": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
files: ["*.js", "*.jsx", "*.ts", "*.tsx"],
|
|
46
|
+
customSyntax: "postcss-styled-syntax",
|
|
47
|
+
rules: {
|
|
48
|
+
"value-no-vendor-prefix": true,
|
|
49
|
+
"property-no-vendor-prefix": true,
|
|
50
|
+
"no-empty-source": null,
|
|
51
|
+
"no-missing-end-of-source-newline": null
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lobehub/lint",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"homepage": "https://github.com/lobehub/lint",
|
|
5
|
+
"bugs": {
|
|
6
|
+
"url": "https://github.com/lobehub/lint/issues/new"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/lobehub/lint.git"
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": "canisminor1990 <i@canisminor.cc>",
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"compiled",
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@trivago/prettier-plugin-sort-imports": "latest",
|
|
23
|
+
"@umijs/lint": "latest",
|
|
24
|
+
"commitlint-config-gitmoji": "latest",
|
|
25
|
+
"eslint-import-resolver-alias": "latest",
|
|
26
|
+
"eslint-import-resolver-typescript": "latest",
|
|
27
|
+
"eslint-plugin-import": "latest",
|
|
28
|
+
"eslint-plugin-simple-import-sort": "latest",
|
|
29
|
+
"eslint-plugin-typescript-sort-keys": "latest",
|
|
30
|
+
"postcss-less": "latest",
|
|
31
|
+
"postcss-styled-syntax": "latest",
|
|
32
|
+
"prettier-plugin-organize-imports": "latest",
|
|
33
|
+
"prettier-plugin-packagejson": "latest",
|
|
34
|
+
"prettier-plugin-sort-json": "latest",
|
|
35
|
+
"prettier-sort-destructure": "latest",
|
|
36
|
+
"remark-frontmatter": "latest",
|
|
37
|
+
"remark-gfm": "latest",
|
|
38
|
+
"remark-lint-checkbox-content-indent": "latest",
|
|
39
|
+
"remark-lint-frontmatter-schema": "latest",
|
|
40
|
+
"remark-lint-heading-whitespace": "latest",
|
|
41
|
+
"remark-lint-linebreak-style": "latest",
|
|
42
|
+
"remark-lint-list-item-indent": "latest",
|
|
43
|
+
"remark-lint-list-item-spacing": "latest",
|
|
44
|
+
"remark-lint-no-duplicate-headings-in-section": "latest",
|
|
45
|
+
"remark-lint-no-empty-sections": "latest",
|
|
46
|
+
"remark-lint-no-empty-url": "latest",
|
|
47
|
+
"remark-lint-no-file-name-irregular-characters": "latest",
|
|
48
|
+
"remark-lint-no-heading-indent": "latest",
|
|
49
|
+
"remark-lint-no-heading-like-paragraph": "latest",
|
|
50
|
+
"remark-lint-no-paragraph-content-indent": "latest",
|
|
51
|
+
"remark-lint-no-reference-like-url": "latest",
|
|
52
|
+
"remark-lint-no-shell-dollars": "latest",
|
|
53
|
+
"remark-lint-no-tabs": "latest",
|
|
54
|
+
"remark-lint-no-unneeded-full-reference-image": "latest",
|
|
55
|
+
"remark-lint-no-unneeded-full-reference-link": "latest",
|
|
56
|
+
"remark-lint-ordered-list-marker-value": "latest",
|
|
57
|
+
"remark-lint-write-good": "latest",
|
|
58
|
+
"remark-preset-lint-consistent": "latest",
|
|
59
|
+
"remark-preset-lint-markdown-style-guide": "latest",
|
|
60
|
+
"remark-preset-lint-recommended": "latest",
|
|
61
|
+
"remark-toc": "latest",
|
|
62
|
+
"semantic-release-config-gitmoji": "latest",
|
|
63
|
+
"stylelint-config-clean-order": "latest",
|
|
64
|
+
"stylelint-config-recommended": "latest",
|
|
65
|
+
"stylelint-less": "latest",
|
|
66
|
+
"stylelint-order": "latest"
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public",
|
|
70
|
+
"registry": "https://registry.npmjs.org"
|
|
71
|
+
}
|
|
72
|
+
}
|