@fast-china/eslint-config 1.0.7 → 1.0.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.
@@ -1,20 +0,0 @@
1
- module.exports = {
2
- // 强制使用 lodash
3
-
4
- // 限制某些模块导入
5
- "no-restricted-imports": [
6
- "error",
7
- {
8
- paths: [
9
- { name: "lodash-es", message: "Use lodash instead." },
10
- { name: "lodash-unified", message: "Use lodash instead." },
11
- ],
12
- patterns: [
13
- {
14
- group: ["lodash-es/*", "lodash-unified/*"],
15
- message: "Use lodash instead.",
16
- },
17
- ],
18
- },
19
- ],
20
- };
package/src/rules/vue.js DELETED
@@ -1,66 +0,0 @@
1
- module.exports = {
2
- // vue (https://eslint.vuejs.org/rules)
3
-
4
- // 允许使用 v-html
5
- "vue/no-v-html": "off",
6
- // 禁用所有 props 必填时,必须提供默认值
7
- "vue/require-default-prop": "off",
8
- // 强制组件中必须使用 emits 选项声明事件
9
- "vue/require-explicit-emits": "error",
10
- // 禁用组件名称必须是多单词
11
- "vue/multi-word-component-names": "off",
12
- // 关闭 - 强制从 vue 中导入 Vue相关 API
13
- "vue/prefer-import-from-vue": "off",
14
- // 强制 HTML 属性使用 camelCase 风格
15
- "vue/attribute-hyphenation": [
16
- "error",
17
- "always",
18
- {
19
- ignore: [
20
- // 忽略 Element-Plus 加载文案"element-loading-text"
21
- ],
22
- },
23
- ],
24
-
25
- // 禁止重复的字段名
26
- "vue/no-dupe-keys": "error",
27
- // 禁止直接修改 props 的值
28
- "vue/no-mutating-props": "error",
29
- // 禁止使用 Vue.js 内置的保留组件名称(如 transition、keep-alive 等)作为自定义组件名称
30
- "vue/no-reserved-component-names": "error",
31
- // 禁止在自定义组件上使用 v-text 或 v-html 指令
32
- "vue/no-v-text-v-html-on-component": "off",
33
- // 防止<script setup>使用的变量<template>被标记为未使用,此规则仅在启用该no-unused-vars规则时有效。
34
- // "vue/script-setup-uses-vars": "error",
35
- // 强制自定义事件名称使用 camelCase 风格命名
36
- "vue/custom-event-name-casing": ["error", "camelCase"],
37
- // 强制每个 Vue 文件中只包含一个 Vue 组件
38
- "vue/one-component-per-file": "off",
39
- // 闭合标签换行风格
40
- "vue/html-closing-bracket-newline": [
41
- "error",
42
- {
43
- // 强制要求当 HTML 元素跨多行时,闭合标签必须出现在新的一行上
44
- multiline: "always",
45
- // 强制要求当 HTML 元素只有一行时,闭合标签应与开始标签在同一行上
46
- singleline: "never",
47
- },
48
- ],
49
- // 强制 Vue 模板中 HTML 元素的属性按照指定的顺序排列
50
- "vue/attributes-order": [
51
- "error",
52
- {
53
- order: [
54
- "DEFINITION",
55
- "LIST_RENDERING",
56
- "CONDITIONALS",
57
- "RENDER_MODIFIERS",
58
- "GLOBAL",
59
- "UNIQUE",
60
- "OTHER_ATTR",
61
- "EVENTS",
62
- "CONTENT",
63
- ],
64
- },
65
- ],
66
- };