@lntvow/eslint-config 9.2.8 → 9.2.9
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 +2 -4
- package/package.json +1 -1
- package/README.cn.md +0 -39
package/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# @lntvow/eslint-config
|
|
2
2
|
|
|
3
|
-
English | [中文](./README.cn.md)
|
|
4
|
-
|
|
5
3
|
## Usage
|
|
6
4
|
|
|
7
5
|
install @lntvow/eslint-config
|
|
@@ -10,10 +8,10 @@ install @lntvow/eslint-config
|
|
|
10
8
|
pnpm install -D @lntvow/eslint-config
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
create `eslint.config.
|
|
11
|
+
create `eslint.config.js` in your project root
|
|
14
12
|
|
|
15
13
|
```js
|
|
16
|
-
// eslint.config.
|
|
14
|
+
// eslint.config.js
|
|
17
15
|
import lntvow from '@lntvow/eslint-config'
|
|
18
16
|
|
|
19
17
|
export default lntvow()
|
package/package.json
CHANGED
package/README.cn.md
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# @lntvow/eslint-config
|
|
2
|
-
|
|
3
|
-
[English](./README.md) | 中文
|
|
4
|
-
|
|
5
|
-
## 使用
|
|
6
|
-
|
|
7
|
-
安装 @lntvow/eslint-config
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
pnpm install -D @lntvow/eslint-config
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
创建项目根目录下的 `eslint.config.js`
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
// eslint.config.js
|
|
17
|
-
import lntvow from '@lntvow/eslint-config'
|
|
18
|
-
|
|
19
|
-
export default lntvow()
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 插件
|
|
23
|
-
|
|
24
|
-
由于平面配置要求我们显式提供插件名称(而不是 npm 包名称的强制约定),因此我们重命名了一些插件,以使整体范围更加一致且更易于编写。
|
|
25
|
-
|
|
26
|
-
| 新前缀 | 旧前缀 | 插件厂库 |
|
|
27
|
-
| -------------- | ---------------------- | ------------------------------------------------------------------------------------------ |
|
|
28
|
-
| `typescript/*` | `@typescript-eslint/*` | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) |
|
|
29
|
-
| `vue/*` | `@vue/*` | [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) |
|
|
30
|
-
| `import/*` | `import-x/*` | [eslint-plugin-import-x](https://github.com/un-es/eslint-plugin-import-x) |
|
|
31
|
-
| `style/*` | `@stylistic/*` | [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic) |
|
|
32
|
-
|
|
33
|
-
## 温馨提示
|
|
34
|
-
|
|
35
|
-
- 如果项目是通过 `npm` 或者 `yarn` 安装的,可以跳过本提示。
|
|
36
|
-
- 如果你不想手动安装 `eslint` 及其他依赖包,选择使用 `pnpm` 进行安装需要注意以下几点:
|
|
37
|
-
- 由于 `pnpm` 的软链和 `eslint` 的功能存在冲突,所以部分包必须平铺在 `node_modules` 的根目录下。
|
|
38
|
-
- 在项目的根目录下新建 `.npmrc` 文件,并写入 `shamefully-hoist=true`。这个指令的作用是将依赖平铺到 `node_modules` 的根目录,然后重新安装依赖即可。
|
|
39
|
-
- 另外,你也可以选择手动安装 `eslint` 及其他依赖包至 `node_modules` 的根目录。
|