全部规则
本页由配置自动生成,列出每一层启用的全部规则。具体规则的 ❌/✅ 示例见各规则层页面。
- 配置方式:控制该规则的
lintspec()选项;基线层规则只能通过overrides调整。 - 修复 / 建议:✅ 修复 = 可通过
eslint --fix自动修复;✅ 建议 = 在编辑器中提供修复建议。 - 级别:错误 报错并阻断;警告 仅提示。
基线层(87)
| 规则名称 | 规则 | 配置方式 | 级别 | 修复 | 建议 |
|---|---|---|---|---|---|
| 数组回调需返回值 | array-callback-return | overrides | 错误 | — | ✅ |
| 构造函数须调用 super() | constructor-super | overrides | 错误 | — | — |
| default 置于最后 | default-case-last | overrides | 错误 | — | — |
| 严格相等 | eqeqeq | overrides | 错误 | ✅ | ✅ |
| for 计数方向正确 | for-direction | overrides | 错误 | — | — |
| getter 须返回值 | getter-return | overrides | 错误 | — | — |
| 存取器成对相邻 | grouped-accessor-pairs | overrides | 错误 | — | — |
| 文件最大行数 | max-lines | maxLines | 警告 | — | — |
| 禁用 alert | no-alert | overrides | 错误 | — | — |
| 禁止 async Promise executor | no-async-promise-executor | overrides | 错误 | — | — |
| 禁止循环内 await | no-await-in-loop | overrides | 警告 | — | — |
| 禁止 case 内声明 | no-case-declarations | overrides | 错误 | — | ✅ |
| 禁止重写类 | no-class-assign | overrides | 错误 | — | — |
| 禁止与 -0 比较 | no-compare-neg-zero | overrides | 错误 | — | — |
| 禁止条件中赋值 | no-cond-assign | overrides | 错误 | — | — |
| 禁止重写 const | no-const-assign | overrides | 错误 | — | — |
| 禁止无效的常量运算 | no-constant-binary-expression | overrides | 错误 | — | — |
| 禁止常量条件 | no-constant-condition | overrides | 错误 | — | — |
| 禁止构造函数返回值 | no-constructor-return | overrides | 错误 | — | — |
| 禁用 debugger | no-debugger | overrides | 错误 | — | — |
| 禁止 delete 变量 | no-delete-var | overrides | 错误 | — | — |
| 禁止重复函数参数 | no-dupe-args | overrides | 错误 | — | — |
| 禁止重复类成员 | no-dupe-class-members | overrides | 错误 | — | — |
| 禁止重复的 else-if 条件 | no-dupe-else-if | overrides | 错误 | — | — |
| 禁止重复对象键 | no-dupe-keys | overrides | 错误 | — | — |
| 禁止重复 case | no-duplicate-case | overrides | 错误 | — | — |
| 禁止重复导入 | no-duplicate-imports | overrides | 错误 | — | — |
| 禁止空代码块 | no-empty | overrides | 错误 | — | ✅ |
| 禁止空字符类 | no-empty-character-class | overrides | 错误 | — | — |
| 禁止空解构 | no-empty-pattern | overrides | 错误 | — | — |
| 禁止空静态块 | no-empty-static-block | overrides | 错误 | — | ✅ |
| 禁用 eval | no-eval | overrides | 错误 | — | — |
| 禁止重写异常参数 | no-ex-assign | overrides | 错误 | — | — |
| 禁止扩展原生类型 | no-extend-native | overrides | 错误 | — | — |
| 禁止多余的 bind | no-extra-bind | overrides | 错误 | ✅ | — |
| 禁止 case 穿透 | no-fallthrough | overrides | 错误 | — | — |
| 禁止重写函数声明 | no-func-assign | overrides | 错误 | — | — |
| 禁止改写全局对象 | no-global-assign | overrides | 错误 | — | — |
| 禁止隐式 eval | no-implied-eval | overrides | 错误 | — | — |
| 禁止给导入赋值 | no-import-assign | overrides | 错误 | — | — |
| 禁止异常空白字符 | no-irregular-whitespace | overrides | 错误 | — | — |
| 禁止精度丢失的数字 | no-loss-of-precision | overrides | 错误 | — | — |
| 禁止误导性字符类 | no-misleading-character-class | overrides | 错误 | — | ✅ |
| 禁止 Function 构造函数 | no-new-func | overrides | 错误 | — | — |
| 禁止 new 非构造函数 | no-new-native-nonconstructor | overrides | 错误 | — | — |
| 禁止把全局对象当函数调用 | no-obj-calls | overrides | 错误 | — | — |
| 禁止 Promise executor 返回值 | no-promise-executor-return | overrides | 错误 | — | ✅ |
| 禁止直接调用 Object.prototype 方法 | no-prototype-builtins | overrides | 错误 | — | ✅ |
| 禁止重复声明 | no-redeclare | overrides | 错误 | — | — |
| 禁止正则中多个空格 | no-regex-spaces | overrides | 错误 | ✅ | — |
| 禁止自我赋值 | no-self-assign | overrides | 错误 | — | — |
| 禁止自我比较 | no-self-compare | overrides | 错误 | — | — |
| 禁止 setter 返回值 | no-setter-return | overrides | 错误 | — | — |
| 禁止稀疏数组 | no-sparse-arrays | overrides | 错误 | — | — |
| 禁止普通字符串中的模板占位符 | no-template-curly-in-string | overrides | 错误 | — | — |
| 禁止 super() 前用 this | no-this-before-super | overrides | 错误 | — | — |
| 禁止抛出字面量 | no-throw-literal | overrides | 错误 | — | — |
| 禁止未声明变量 | no-undef | overrides | 错误 | — | — |
| 禁止易混淆的多行表达式 | no-unexpected-multiline | overrides | 错误 | — | — |
| 禁止未修改的循环条件 | no-unmodified-loop-condition | overrides | 警告 | — | — |
| 禁止多余的三元 | no-unneeded-ternary | overrides | 错误 | ✅ | — |
| 禁止不可达代码 | no-unreachable | overrides | 错误 | — | — |
| 禁止只执行一次的循环 | no-unreachable-loop | overrides | 错误 | — | — |
| 禁止 finally 中的控制流 | no-unsafe-finally | overrides | 错误 | — | — |
| 禁止关系运算符左侧取反 | no-unsafe-negation | overrides | 错误 | — | ✅ |
| 禁止不安全的可选链 | no-unsafe-optional-chaining | overrides | 错误 | — | — |
| 禁止未使用的私有成员 | no-unused-private-class-members | overrides | 错误 | — | ✅ |
| 禁止未使用变量 | no-unused-vars | overrides | 警告 | — | ✅ |
| 禁止先使用后定义 | no-use-before-define | overrides | 错误 | — | — |
| 禁止无用赋值 | no-useless-assignment | overrides | 错误 | — | — |
| 禁止无用的正则反向引用 | no-useless-backreference | overrides | 错误 | — | — |
| 禁止多余的 call/apply | no-useless-call | overrides | 错误 | — | — |
| 禁止多余的 catch | no-useless-catch | overrides | 错误 | — | — |
| 禁止多余的字符串拼接 | no-useless-concat | overrides | 错误 | — | — |
| 禁止多余的转义 | no-useless-escape | overrides | 错误 | — | ✅ |
| 禁止无意义的重命名 | no-useless-rename | overrides | 错误 | ✅ | — |
| 禁用 var | no-var | overrides | 错误 | ✅ | — |
| 对象简写 | object-shorthand | overrides | 错误 | ✅ | — |
| 优先 const | prefer-const | overrides | 错误 | ✅ | — |
| 优先 Object.hasOwn | prefer-object-has-own | overrides | 错误 | ✅ | — |
| reject 须用 Error | prefer-promise-reject-errors | overrides | 错误 | — | — |
| 优先剩余参数 | prefer-rest-params | overrides | 错误 | — | — |
| 优先展开运算符 | prefer-spread | overrides | 错误 | — | — |
| async 须含 await | require-await | overrides | 警告 | — | ✅ |
| 用 isNaN 判断 NaN | use-isnan | overrides | 错误 | — | ✅ |
| typeof 比较有效字符串 | valid-typeof | overrides | 错误 | — | ✅ |
| 禁止 Yoda 条件 | yoda | overrides | 错误 | ✅ | — |
unicorn(159)
| 规则名称 | 规则 | 配置方式 | 级别 | 修复 | 建议 |
|---|---|---|---|---|---|
| 优先更好的 DOM 遍历 API | unicorn/better-dom-traversing | unicorn | 错误 | — | ✅ |
| catch 参数名约定 | unicorn/catch-error-name | unicorn | 错误 | ✅ | — |
| 一致的断言风格 | unicorn/consistent-assert | unicorn | 错误 | ✅ | — |
| 一致的复合词拼写 | unicorn/consistent-compound-words | unicorn | 错误 | — | ✅ |
| 一致的 Date 克隆 | unicorn/consistent-date-clone | unicorn | 错误 | ✅ | — |
| 一致的空数组展开类型 | unicorn/consistent-empty-array-spread | unicorn | 错误 | ✅ | — |
| 一致的索引存在性检查 | unicorn/consistent-existence-index-check | unicorn | 错误 | ✅ | — |
| 函数提到最高作用域 | unicorn/consistent-function-scoping | unicorn | 错误 | — | — |
| 一致的 JSON 文件读取 | unicorn/consistent-json-file-read | unicorn | 错误 | ✅ | — |
| 一致的模板字面量转义 | unicorn/consistent-template-literal-escape | unicorn | 错误 | ✅ | — |
| 一致的 dataset 访问 | unicorn/dom-node-dataset | unicorn | 错误 | ✅ | — |
| 大括号内无空格 | unicorn/empty-brace-spaces | unicorn | 错误 | ✅ | — |
| 创建错误须带 message | unicorn/error-message | unicorn | 错误 | — | — |
| 转义序列大小写一致 | unicorn/escape-case | unicorn | 错误 | ✅ | — |
| TODO 须带过期条件 | unicorn/expiring-todo-comments | unicorn | 错误 | — | — |
| 显式比较 length/size | unicorn/explicit-length-check | unicorn | 错误 | ✅ | ✅ |
| 模块导入风格约定 | unicorn/import-style | unicorn | 错误 | — | — |
| 隔离函数禁用外部变量 | unicorn/isolated-functions | unicorn | 错误 | — | — |
| 内置对象须用 new | unicorn/new-for-builtins | unicorn | 错误 | ✅ | ✅ |
| 禁止滥用 eslint-disable | unicorn/no-abusive-eslint-disable | unicorn | 错误 | — | — |
| 禁止存取器中递归访问 this | unicorn/no-accessor-recursion | unicorn | 错误 | — | — |
| 禁止匿名默认导出 | unicorn/no-anonymous-default-export | unicorn | 错误 | — | ✅ |
| 禁止直接传函数引用给迭代方法 | unicorn/no-array-callback-reference | unicorn | 错误 | — | ✅ |
| 禁止用引用值作 fill 值 | unicorn/no-array-fill-with-reference-type | unicorn | 错误 | — | — |
| 优先 for…of 替代 forEach | unicorn/no-array-for-each | unicorn | 错误 | ✅ | ✅ |
| 禁止 Array.from 后 fill | unicorn/no-array-from-fill | unicorn | 错误 | — | — |
| 禁止数组方法的 this 参数 | unicorn/no-array-method-this-argument | unicorn | 错误 | ✅ | ✅ |
| 优先 toReversed | unicorn/no-array-reverse | unicorn | 错误 | — | ✅ |
| 优先 toSorted | unicorn/no-array-sort | unicorn | 错误 | — | ✅ |
| 禁止 await 表达式成员访问 | unicorn/no-await-expression-member | unicorn | 错误 | ✅ | — |
| 禁止 Promise 方法参数中 await | unicorn/no-await-in-promise-methods | unicorn | 错误 | — | ✅ |
| 禁止多余的 Blob 转 File | unicorn/no-blob-to-file | unicorn | 错误 | — | ✅ |
| 优先直接绘制 canvas | unicorn/no-canvas-to-image | unicorn | 错误 | — | — |
| 禁止易混淆的 splice 用法 | unicorn/no-confusing-array-splice | unicorn | 错误 | — | ✅ |
| 禁止 console 参数首尾空格 | unicorn/no-console-spaces | unicorn | 错误 | ✅ | — |
| 禁止直接用 document.cookie | unicorn/no-document-cookie | unicorn | 错误 | — | — |
| 禁止 Set 中重复值 | unicorn/no-duplicate-set-values | unicorn | 错误 | — | — |
| 禁止空文件 | unicorn/no-empty-file | unicorn | 错误 | — | — |
| 禁止脚本中 export | unicorn/no-exports-in-scripts | unicorn | 错误 | — | — |
| 禁止可改写为 for-of 的循环 | unicorn/no-for-loop | unicorn | 错误 | ✅ | ✅ |
| 优先 Unicode 转义 | unicorn/no-hex-escape | unicorn | 错误 | ✅ | — |
| 禁止赋值后立即修改 | unicorn/no-immediate-mutation | unicorn | 错误 | ✅ | ✅ |
| 禁止错误的 querySelector | unicorn/no-incorrect-query-selector | unicorn | 错误 | ✅ | — |
| 禁止对内置对象用 instanceof | unicorn/no-instanceof-builtins | unicorn | 错误 | ✅ | ✅ |
| 禁止无效的 fetch 选项 | unicorn/no-invalid-fetch-options | unicorn | 错误 | — | — |
| 禁止无效的 removeEventListener | unicorn/no-invalid-remove-event-listener | unicorn | 错误 | — | — |
| 禁止事件后访问 currentTarget | unicorn/no-late-current-target-access | unicorn | 错误 | — | — |
| 禁止孤立的 if | unicorn/no-lonely-if | unicorn | 错误 | ✅ | — |
| 禁止 flat 的魔法深度值 | unicorn/no-magic-array-flat-depth | unicorn | 错误 | — | — |
| 禁止默认导入具名化 | unicorn/no-named-default | unicorn | 错误 | ✅ | — |
| 禁止否定条件 | unicorn/no-negated-condition | unicorn | 错误 | ✅ | — |
| 禁止相等判断中取反 | unicorn/no-negation-in-equality-check | unicorn | 错误 | — | ✅ |
| 禁止 new Array() | unicorn/no-new-array | unicorn | 错误 | ✅ | ✅ |
| 禁止 new Buffer() | unicorn/no-new-buffer | unicorn | 错误 | ✅ | ✅ |
| 禁止对象作默认参数 | unicorn/no-object-as-default-parameter | unicorn | 错误 | — | — |
| 禁止 process.exit() | unicorn/no-process-exit | unicorn | 错误 | — | — |
| 禁止单元素数组传 Promise 方法 | unicorn/no-single-promise-in-promise-methods | unicorn | 错误 | ✅ | ✅ |
| 禁止纯静态类 | unicorn/no-static-only-class | unicorn | 错误 | ✅ | — |
| 禁止 then 属性 | unicorn/no-thenable | unicorn | 错误 | — | — |
| 禁止把 this 赋给变量 | unicorn/no-this-assignment | unicorn | 错误 | — | — |
| 禁止类外使用 this | unicorn/no-this-outside-of-class | unicorn | 错误 | — | — |
| 禁止 typeof 判断 undefined | unicorn/no-typeof-undefined | unicorn | 错误 | ✅ | ✅ |
| 禁止 flat(1) 多余深度 | unicorn/no-unnecessary-array-flat-depth | unicorn | 错误 | ✅ | — |
| 禁止 splice 多余的删除数 | unicorn/no-unnecessary-array-splice-count | unicorn | 错误 | ✅ | — |
| 禁止 await 非 Promise | unicorn/no-unnecessary-await | unicorn | 错误 | ✅ | — |
| 禁止多余的嵌套三元 | unicorn/no-unnecessary-nested-ternary | unicorn | 错误 | ✅ | — |
| 禁止多余的 polyfill | unicorn/no-unnecessary-polyfills | unicorn | 错误 | — | — |
| 禁止 slice 多余的结束参数 | unicorn/no-unnecessary-slice-end | unicorn | 错误 | ✅ | — |
| 禁止难读的数组解构 | unicorn/no-unreadable-array-destructuring | unicorn | 错误 | ✅ | — |
| 禁止难读的 IIFE | unicorn/no-unreadable-iife | unicorn | 错误 | — | ✅ |
| 禁止忽略数组方法返回值 | unicorn/no-unused-array-method-return | unicorn | 错误 | — | — |
| 禁止集合中无用的值/回退 | unicorn/no-useless-collection-argument | unicorn | 错误 | ✅ | ✅ |
| 禁止多余的 captureStackTrace | unicorn/no-useless-error-capture-stack-trace | unicorn | 错误 | ✅ | — |
| 禁止展开中无用的回退 | unicorn/no-useless-fallback-in-spread | unicorn | 错误 | ✅ | — |
| 禁止多余的迭代器 toArray | unicorn/no-useless-iterator-to-array | unicorn | 错误 | ✅ | ✅ |
| 禁止无用的 length 检查 | unicorn/no-useless-length-check | unicorn | 错误 | ✅ | — |
| 禁止多余的 Promise.resolve/reject | unicorn/no-useless-promise-resolve-reject | unicorn | 错误 | ✅ | — |
| 禁止多余的展开 | unicorn/no-useless-spread | unicorn | 错误 | ✅ | — |
| 禁止无用的 switch case | unicorn/no-useless-switch-case | unicorn | 错误 | — | ✅ |
| 禁止无用的 undefined | unicorn/no-useless-undefined | unicorn | 错误 | ✅ | — |
| 禁止多余的小数零 | unicorn/no-zero-fractions | unicorn | 错误 | ✅ | — |
| 数字字面量大小写 | unicorn/number-literal-case | unicorn | 错误 | ✅ | — |
| 数字分隔符风格 | unicorn/numeric-separators-style | unicorn | 错误 | ✅ | — |
| 优先 addEventListener | unicorn/prefer-add-event-listener | unicorn | 错误 | ✅ | — |
| 优先 find | unicorn/prefer-array-find | unicorn | 错误 | ✅ | ✅ |
| 优先 Array#flat | unicorn/prefer-array-flat | unicorn | 错误 | ✅ | — |
| 优先 flatMap | unicorn/prefer-array-flat-map | unicorn | 错误 | ✅ | — |
| 优先 indexOf | unicorn/prefer-array-index-of | unicorn | 错误 | ✅ | ✅ |
| 优先末尾导向的数组方法 | unicorn/prefer-array-last-methods | unicorn | 错误 | — | ✅ |
| 优先 some | unicorn/prefer-array-some | unicorn | 错误 | ✅ | ✅ |
| 优先 .at() | unicorn/prefer-at | unicorn | 错误 | ✅ | ✅ |
| 优先 BigInt 字面量 | unicorn/prefer-bigint-literals | unicorn | 错误 | ✅ | ✅ |
| 优先 Blob 读取方法 | unicorn/prefer-blob-reading-methods | unicorn | 错误 | — | — |
| 优先类字段声明 | unicorn/prefer-class-fields | unicorn | 错误 | ✅ | ✅ |
| 优先 classList.toggle | unicorn/prefer-classlist-toggle | unicorn | 错误 | ✅ | ✅ |
| 优先 codePointAt | unicorn/prefer-code-point | unicorn | 错误 | — | ✅ |
| 优先 Date.now() | unicorn/prefer-date-now | unicorn | 错误 | ✅ | — |
| 优先默认参数 | unicorn/prefer-default-parameters | unicorn | 错误 | — | ✅ |
| 优先 append | unicorn/prefer-dom-node-append | unicorn | 错误 | ✅ | — |
| 优先 remove | unicorn/prefer-dom-node-remove | unicorn | 错误 | ✅ | ✅ |
| 优先 textContent | unicorn/prefer-dom-node-text-content | unicorn | 错误 | — | ✅ |
| 优先 EventTarget | unicorn/prefer-event-target | unicorn | 错误 | — | — |
| 优先 export…from | unicorn/prefer-export-from | unicorn | 错误 | ✅ | ✅ |
| 优先 getOrInsertComputed | unicorn/prefer-get-or-insert-computed | unicorn | 错误 | ✅ | — |
| 优先 globalThis | unicorn/prefer-global-this | unicorn | 错误 | ✅ | — |
| 优先 HTTPS | unicorn/prefer-https | unicorn | 错误 | ✅ | — |
| 优先 includes | unicorn/prefer-includes | unicorn | 错误 | ✅ | ✅ |
| 优先 includes 替代重复比较 | unicorn/prefer-includes-over-repeated-comparisons | unicorn | 错误 | — | — |
| toArray 置于链尾 | unicorn/prefer-iterator-to-array-at-end | unicorn | 错误 | — | ✅ |
| 优先 KeyboardEvent#key | unicorn/prefer-keyboard-event-key | unicorn | 错误 | ✅ | ✅ |
| 优先逻辑运算符替代三元 | unicorn/prefer-logical-operator-over-ternary | unicorn | 错误 | — | ✅ |
| 优先 Math.abs | unicorn/prefer-math-abs | unicorn | 错误 | ✅ | — |
| 优先 Math.min/max | unicorn/prefer-math-min-max | unicorn | 错误 | ✅ | — |
| 优先 Math.trunc | unicorn/prefer-math-trunc | unicorn | 错误 | ✅ | ✅ |
| 优先现代 DOM API | unicorn/prefer-modern-dom-apis | unicorn | 错误 | ✅ | — |
| 优先现代 Math API | unicorn/prefer-modern-math-apis | unicorn | 错误 | ✅ | — |
| 优先 ESM 模块 | unicorn/prefer-module | unicorn | 错误 | ✅ | ✅ |
| 优先原生强制转换函数 | unicorn/prefer-native-coercion-functions | unicorn | 错误 | ✅ | — |
| 优先负索引 | unicorn/prefer-negative-index | unicorn | 错误 | ✅ | — |
| 优先 node: 协议 | unicorn/prefer-node-protocol | unicorn | 错误 | ✅ | — |
| 优先 Number 静态属性 | unicorn/prefer-number-properties | unicorn | 错误 | ✅ | ✅ |
| 优先 Object.fromEntries | unicorn/prefer-object-from-entries | unicorn | 错误 | ✅ | — |
| 优先省略 catch 参数 | unicorn/prefer-optional-catch-binding | unicorn | 错误 | ✅ | — |
| 优先借用原型方法 | unicorn/prefer-prototype-methods | unicorn | 错误 | ✅ | — |
| 优先 querySelector | unicorn/prefer-query-selector | unicorn | 错误 | ✅ | — |
| 优先 queueMicrotask | unicorn/prefer-queue-microtask | unicorn | 错误 | ✅ | — |
| 优先 Reflect.apply | unicorn/prefer-reflect-apply | unicorn | 错误 | ✅ | — |
| 优先 RegExp#test | unicorn/prefer-regexp-test | unicorn | 错误 | ✅ | ✅ |
| 优先 Response.json | unicorn/prefer-response-static-json | unicorn | 错误 | ✅ | — |
| 优先 Set#has | unicorn/prefer-set-has | unicorn | 错误 | ✅ | ✅ |
| 优先 Set#size | unicorn/prefer-set-size | unicorn | 错误 | ✅ | — |
| 简单条件前置 | unicorn/prefer-simple-condition-first | unicorn | 错误 | ✅ | ✅ |
| 合并多次调用 | unicorn/prefer-single-call | unicorn | 错误 | ✅ | ✅ |
| split 带 limit | unicorn/prefer-split-limit | unicorn | 错误 | ✅ | — |
| 优先展开运算符 | unicorn/prefer-spread | unicorn | 错误 | ✅ | ✅ |
| 优先 matchAll | unicorn/prefer-string-match-all | unicorn | 错误 | ✅ | — |
| 优先 padStart/padEnd | unicorn/prefer-string-pad-start-end | unicorn | 错误 | ✅ | ✅ |
| 优先 String.raw | unicorn/prefer-string-raw | unicorn | 错误 | ✅ | — |
| 优先 repeat | unicorn/prefer-string-repeat | unicorn | 错误 | ✅ | — |
| 优先 replaceAll | unicorn/prefer-string-replace-all | unicorn | 错误 | ✅ | — |
| 优先 slice | unicorn/prefer-string-slice | unicorn | 错误 | ✅ | — |
| 优先 startsWith/endsWith | unicorn/prefer-string-starts-ends-with | unicorn | 错误 | ✅ | ✅ |
| 优先 trimStart/trimEnd | unicorn/prefer-string-trim-start-end | unicorn | 错误 | ✅ | — |
| 优先 structuredClone | unicorn/prefer-structured-clone | unicorn | 错误 | — | ✅ |
| 优先 switch | unicorn/prefer-switch | unicorn | 错误 | ✅ | — |
| 优先三元 | unicorn/prefer-ternary | unicorn | 错误 | ✅ | — |
| 类型检查抛 TypeError | unicorn/prefer-type-error | unicorn | 错误 | ✅ | — |
| 相对 URL 风格 | unicorn/relative-url-style | unicorn | 错误 | ✅ | ✅ |
| join 须带分隔符 | unicorn/require-array-join-separator | unicorn | 错误 | ✅ | — |
| CSS 插值须用 CSS.escape | unicorn/require-css-escape | unicorn | 错误 | ✅ | — |
| 须带模块属性 | unicorn/require-module-attributes | unicorn | 错误 | ✅ | — |
| 导入导出须有具名列表 | unicorn/require-module-specifiers | unicorn | 错误 | ✅ | ✅ |
| toFixed 须带位数 | unicorn/require-number-to-fixed-digits-argument | unicorn | 错误 | ✅ | — |
| 高频事件须被动监听 | unicorn/require-passive-events | unicorn | 错误 | ✅ | — |
| case 大括号风格 | unicorn/switch-case-braces | unicorn | 错误 | ✅ | — |
| case 中 break 位置 | unicorn/switch-case-break-position | unicorn | 错误 | ✅ | — |
| 模板字符串缩进 | unicorn/template-indent | unicorn | 错误 | ✅ | — |
| 文本编码标识大小写 | unicorn/text-encoding-identifier-case | unicorn | 错误 | ✅ | ✅ |
| 创建错误须用 new | unicorn/throw-new-error | unicorn | 错误 | ✅ | — |
TypeScript(27)
| 规则名称 | 规则 | 配置方式 | 级别 | 修复 | 建议 |
|---|---|---|---|---|---|
| 限制 @ts 注释 | @typescript-eslint/ban-ts-comment | typescript | 错误 | — | ✅ |
| 一致的类型导入 | @typescript-eslint/consistent-type-imports | typescript | 错误 | ✅ | — |
| 命名约定 | @typescript-eslint/naming-convention | typescript | 错误 | — | — |
| 禁止 Array 构造函数 | @typescript-eslint/no-array-constructor | typescript | 错误 | ✅ | — |
| 禁止重复枚举值 | @typescript-eslint/no-duplicate-enum-values | typescript | 错误 | — | — |
| 禁止空对象类型 | @typescript-eslint/no-empty-object-type | typescript | 错误 | — | ✅ |
| 禁止显式 any | @typescript-eslint/no-explicit-any | typescript | 错误 | ✅ | ✅ |
| 禁止多余的非空断言 | @typescript-eslint/no-extra-non-null-assertion | typescript | 错误 | ✅ | — |
| 顶层 import type | @typescript-eslint/no-import-type-side-effects | typescript | 错误 | ✅ | — |
| 正确定义 new/constructor | @typescript-eslint/no-misused-new | typescript | 错误 | — | — |
| 禁止 namespace | @typescript-eslint/no-namespace | typescript | 错误 | — | — |
| 禁止可选链后非空断言 | @typescript-eslint/no-non-null-asserted-optional-chain | typescript | 错误 | — | ✅ |
| 禁止 require | @typescript-eslint/no-require-imports | typescript | 警告 | — | — |
| 禁止 this 别名 | @typescript-eslint/no-this-alias | typescript | 错误 | — | — |
| 禁止多余的类型约束 | @typescript-eslint/no-unnecessary-type-constraint | typescript | 错误 | — | ✅ |
| 禁止不安全的声明合并 | @typescript-eslint/no-unsafe-declaration-merging | typescript | 错误 | — | — |
| 禁止不安全的 Function 类型 | @typescript-eslint/no-unsafe-function-type | typescript | 错误 | — | — |
| 禁止未使用的表达式 | @typescript-eslint/no-unused-expressions | typescript | 错误 | — | — |
| 禁止未使用变量 | @typescript-eslint/no-unused-vars | typescript | 错误 | ✅ | ✅ |
| 禁止包装对象类型 | @typescript-eslint/no-wrapper-object-types | typescript | 错误 | ✅ | — |
| 优先 as const | @typescript-eslint/prefer-as-const | typescript | 错误 | ✅ | ✅ |
| 优先 namespace 关键字 | @typescript-eslint/prefer-namespace-keyword | typescript | 错误 | ✅ | — |
| 限制三斜线指令 | @typescript-eslint/triple-slash-reference | typescript | 错误 | — | — |
| 禁用 var | no-var | typescript | 错误 | ✅ | — |
| 优先 const | prefer-const | typescript | 错误 | ✅ | — |
| 优先剩余参数 | prefer-rest-params | typescript | 错误 | — | — |
| 优先展开运算符 | prefer-spread | typescript | 错误 | — | — |
import-x(8)
| 规则名称 | 规则 | 配置方式 | 级别 | 修复 | 建议 |
|---|---|---|---|---|---|
| 校验默认导入存在 | import-x/default | importX | 错误 | — | — |
| 禁止无效导出 | import-x/export | importX | 错误 | — | — |
| 导入后缀一致 | import-x/extensions | importX.extensions | 错误 | ✅ | ✅ |
| 校验命名空间导入 | import-x/namespace | importX | 错误 | — | — |
| 禁止重复导入 | import-x/no-duplicates | importX | 警告 | ✅ | — |
| 禁止具名当默认导入 | import-x/no-named-as-default | importX | 警告 | — | — |
| 禁止具名当默认成员 | import-x/no-named-as-default-member | importX | 警告 | — | — |
| 禁止无法解析的导入 | import-x/no-unresolved | importX | 错误 | — | — |
perfectionist(22)
| 规则名称 | 规则 | 配置方式 | 级别 | 修复 | 建议 |
|---|---|---|---|---|---|
| includes 数组排序 | perfectionist/sort-array-includes | perfectionist | 错误 | ✅ | — |
| 类成员排序 | perfectionist/sort-classes | perfectionist | 错误 | ✅ | — |
| 装饰器排序 | perfectionist/sort-decorators | perfectionist | 错误 | ✅ | — |
| 枚举排序 | perfectionist/sort-enums | perfectionist | 错误 | ✅ | — |
| 导出属性排序 | perfectionist/sort-export-attributes | perfectionist | 错误 | ✅ | — |
| 导出排序 | perfectionist/sort-exports | perfectionist | 错误 | ✅ | — |
| 继承子句排序 | perfectionist/sort-heritage-clauses | perfectionist | 错误 | ✅ | — |
| 导入属性排序 | perfectionist/sort-import-attributes | perfectionist | 错误 | ✅ | — |
| 导入排序 | perfectionist/sort-imports | perfectionist.sort | 错误 | ✅ | — |
| 接口属性排序 | perfectionist/sort-interfaces | perfectionist | 错误 | ✅ | — |
| 交叉类型排序 | perfectionist/sort-intersection-types | perfectionist | 错误 | ✅ | — |
| JSX 属性排序 | perfectionist/sort-jsx-props | perfectionist | 错误 | ✅ | — |
| Map 排序 | perfectionist/sort-maps | perfectionist | 错误 | ✅ | — |
| 模块排序 | perfectionist/sort-modules | perfectionist | 错误 | ✅ | — |
| 具名导出排序 | perfectionist/sort-named-exports | perfectionist | 错误 | ✅ | — |
| 具名导入排序 | perfectionist/sort-named-imports | perfectionist | 错误 | ✅ | — |
| 对象类型排序 | perfectionist/sort-object-types | perfectionist | 错误 | ✅ | — |
| 对象键排序 | perfectionist/sort-objects | perfectionist | 错误 | ✅ | — |
| Set 排序 | perfectionist/sort-sets | perfectionist | 错误 | ✅ | — |
| switch 分支排序 | perfectionist/sort-switch-case | perfectionist | 错误 | ✅ | — |
| 联合类型排序 | perfectionist/sort-union-types | perfectionist | 错误 | ✅ | — |
| 变量声明排序 | perfectionist/sort-variable-declarations | perfectionist | 错误 | ✅ | — |
React(66)
| 规则名称 | 规则 | 配置方式 | 级别 | 修复 | 建议 |
|---|---|---|---|---|---|
| 禁用 dangerouslySetInnerHTML | @eslint-react/dom-no-dangerously-set-innerhtml | react | 警告 | — | — |
| 禁止 innerHTML 与 children 并存 | @eslint-react/dom-no-dangerously-set-innerhtml-with-children | react | 错误 | — | — |
| 禁用 findDOMNode | @eslint-react/dom-no-find-dom-node | react | 错误 | — | — |
| 禁用 flushSync | @eslint-react/dom-no-flush-sync | react | 错误 | — | — |
| 用 hydrateRoot 替代 hydrate | @eslint-react/dom-no-hydrate | react | 错误 | ✅ | — |
| 用 createRoot 替代 render | @eslint-react/dom-no-render | react | 错误 | ✅ | — |
| 禁止使用 render 返回值 | @eslint-react/dom-no-render-return-value | react | 错误 | — | — |
| 禁止 javascript: URL | @eslint-react/dom-no-script-url | react | 警告 | — | — |
| 禁止不安全的 iframe sandbox | @eslint-react/dom-no-unsafe-iframe-sandbox | react | 警告 | — | — |
| 用 useActionState 替代 useFormState | @eslint-react/dom-no-use-form-state | react | 错误 | ✅ | — |
| 禁止空元素带 children | @eslint-react/dom-no-void-elements-with-children | react | 错误 | — | — |
| 用错误边界替代 try/catch | @eslint-react/error-boundaries | react | 错误 | — | — |
| Hook 依赖完整 | @eslint-react/exhaustive-deps | react | 警告 | ✅ | ✅ |
| 禁止 children 作属性 | @eslint-react/jsx-no-children-prop | react | 警告 | ✅ | ✅ |
| 禁止 children 属性与子节点并存 | @eslint-react/jsx-no-children-prop-with-children | react | 错误 | ✅ | ✅ |
| 禁止 JSX 文本中的注释 | @eslint-react/jsx-no-comment-textnodes | react | 警告 | — | — |
| 禁止展开后再写 key | @eslint-react/jsx-no-key-after-spread | react | 错误 | — | — |
| 禁止 JSX 中泄漏的 $ | @eslint-react/jsx-no-leaked-dollar | react | 警告 | ✅ | ✅ |
| 禁止 JSX 中泄漏的分号 | @eslint-react/jsx-no-leaked-semicolon | react | 警告 | — | ✅ |
| 禁止 JSX 命名空间语法 | @eslint-react/jsx-no-namespace | react | 错误 | — | — |
| Context 命名约定 | @eslint-react/naming-convention-context-name | react | 警告 | — | — |
| useId 命名约定 | @eslint-react/naming-convention-id-name | react | 警告 | — | — |
| useRef 命名约定 | @eslint-react/naming-convention-ref-name | react | 警告 | — | — |
| 禁止 setState 中访问 state | @eslint-react/no-access-state-in-setstate | react | 错误 | — | — |
| 禁止用数组下标作 key | @eslint-react/no-array-index-key | react | 警告 | — | — |
| 禁用 Children.count | @eslint-react/no-children-count | react | 警告 | — | — |
| 禁用 Children.forEach | @eslint-react/no-children-for-each | react | 警告 | — | — |
| 禁用 Children.map | @eslint-react/no-children-map | react | 警告 | — | — |
| 禁用 Children.only | @eslint-react/no-children-only | react | 警告 | — | — |
| 禁用 Children.toArray | @eslint-react/no-children-to-array | react | 警告 | — | — |
| 禁用 cloneElement | @eslint-react/no-clone-element | react | 警告 | — | — |
| 禁用 componentWillMount | @eslint-react/no-component-will-mount | react | 错误 | ✅ | — |
| 禁用 componentWillReceiveProps | @eslint-react/no-component-will-receive-props | react | 错误 | ✅ | — |
| 禁用 componentWillUpdate | @eslint-react/no-component-will-update | react | 错误 | ✅ | — |
| 用 <Context> 替代 Provider | @eslint-react/no-context-provider | react | 警告 | ✅ | ✅ |
| 禁用 createRef | @eslint-react/no-create-ref | react | 错误 | — | — |
| 禁止直接修改 state | @eslint-react/no-direct-mutation-state | react | 错误 | — | — |
| 用 ref 属性替代 forwardRef | @eslint-react/no-forward-ref | react | 警告 | ✅ | ✅ |
| 列表须有 key | @eslint-react/no-missing-key | react | 错误 | — | — |
| 禁止嵌套定义组件 | @eslint-react/no-nested-component-definitions | react | 错误 | — | — |
| 禁止嵌套 lazy 组件 | @eslint-react/no-nested-lazy-component-declarations | react | 错误 | — | — |
| 禁止 didMount 中 setState | @eslint-react/no-set-state-in-component-did-mount | react | 警告 | — | — |
| 禁止 didUpdate 中 setState | @eslint-react/no-set-state-in-component-did-update | react | 警告 | — | — |
| 禁止 willUpdate 中 setState | @eslint-react/no-set-state-in-component-will-update | react | 警告 | — | — |
| use 前缀须用 Hook | @eslint-react/no-unnecessary-use-prefix | react | 警告 | — | — |
| 警告 UNSAFE_componentWillMount | @eslint-react/no-unsafe-component-will-mount | react | 警告 | — | — |
| 警告 UNSAFE_componentWillReceiveProps | @eslint-react/no-unsafe-component-will-receive-props | react | 警告 | — | — |
| 警告 UNSAFE_componentWillUpdate | @eslint-react/no-unsafe-component-will-update | react | 警告 | — | — |
| 禁止未使用的类成员 | @eslint-react/no-unused-class-component-members | react | 警告 | — | — |
| 用 use 替代 useContext | @eslint-react/no-use-context | react | 警告 | ✅ | ✅ |
| 组件/Hook 须为纯函数 | @eslint-react/purity | react | 警告 | — | — |
| 校验 RSC 函数定义 | @eslint-react/rsc-function-definition | react | 错误 | ✅ | — |
| Hook 规则 | @eslint-react/rules-of-hooks | react | 错误 | — | — |
| 禁止 effect 中同步 setState | @eslint-react/set-state-in-effect | react | 警告 | — | — |
| 禁止 render 中 setState | @eslint-react/set-state-in-render | react | 错误 | — | — |
| 组件须稳定不重建 | @eslint-react/static-components | react | 错误 | — | — |
| 禁止 Compiler 不支持的语法 | @eslint-react/unsupported-syntax | react | 错误 | — | — |
| useMemo 须返回值 | @eslint-react/use-memo | react | 错误 | — | — |
| 正确使用 useState | @eslint-react/use-state | react | 警告 | — | — |
| 事件监听须清理 | @eslint-react/web-api-no-leaked-event-listener | react | 警告 | — | — |
| fetch 须可中止 | @eslint-react/web-api-no-leaked-fetch | react | 警告 | — | — |
| IntersectionObserver 须断开 | @eslint-react/web-api-no-leaked-intersection-observer | react | 警告 | — | — |
| setInterval 须清理 | @eslint-react/web-api-no-leaked-interval | react | 警告 | — | — |
| ResizeObserver 须断开 | @eslint-react/web-api-no-leaked-resize-observer | react | 警告 | — | — |
| setTimeout 须清理 | @eslint-react/web-api-no-leaked-timeout | react | 警告 | — | — |
| Hook 依赖完整 | react-hooks/exhaustive-deps | react | 警告 | ✅ | ✅ |
Vue(118)
| 规则名称 | 规则 | 配置方式 | 级别 | 修复 | 建议 |
|---|---|---|---|---|---|
| 属性名连字符风格 | vue/attribute-hyphenation | vue | 警告 | ✅ | — |
| 属性顺序 | vue/attributes-order | vue | 警告 | ✅ | — |
| 顶层块顺序 | vue/block-order | vue | 警告 | ✅ | — |
| 支持模板注释指令 | vue/comment-directive | vue | 错误 | — | — |
| 组件定义名大小写 | vue/component-definition-name-casing | vue | 警告 | ✅ | — |
| 首个属性换行位置 | vue/first-attribute-linebreak | vue | 警告 | ✅ | — |
| 闭合括号前换行 | vue/html-closing-bracket-newline | vue | 警告 | ✅ | — |
| 闭合括号前空格 | vue/html-closing-bracket-spacing | vue | 警告 | ✅ | — |
| 结束标签风格 | vue/html-end-tags | vue | 警告 | ✅ | — |
| 模板缩进 | vue/html-indent | vue | 警告 | ✅ | — |
| HTML 属性引号风格 | vue/html-quotes | vue | 警告 | ✅ | — |
| 自闭合风格 | vue/html-self-closing | vue | 警告 | ✅ | — |
| 标记 JSX 中使用的变量 | vue/jsx-uses-vars | vue | 错误 | — | — |
| 每行最大属性数 | vue/max-attributes-per-line | vue | 警告 | ✅ | — |
| 组件名多词 | vue/multi-word-component-names | vue | 错误 | — | — |
| 多行元素内容换行 | vue/multiline-html-element-content-newline | vue | 警告 | ✅ | — |
| 插值空格风格 | vue/mustache-interpolation-spacing | vue | 警告 | ✅ | — |
| 禁止 watch 用箭头函数 | vue/no-arrow-functions-in-watch | vue | 错误 | — | — |
| 禁止 computed 中异步 | vue/no-async-in-computed-properties | vue | 错误 | — | — |
| 禁止被指令覆盖的子内容 | vue/no-child-content | vue | 错误 | — | ✅ |
| 禁止 data 中访问 computed | vue/no-computed-properties-in-data | vue | 错误 | — | — |
| 禁止废弃的 data 对象声明 | vue/no-deprecated-data-object-declaration | vue | 错误 | ✅ | — |
| 禁止废弃的 $delete/$set | vue/no-deprecated-delete-set | vue | 错误 | — | — |
| 禁止废弃的 destroyed 钩子 | vue/no-deprecated-destroyed-lifecycle | vue | 错误 | ✅ | — |
| 禁止废弃的 $listeners | vue/no-deprecated-dollar-listeners-api | vue | 错误 | — | — |
| 禁止废弃的 $scopedSlots | vue/no-deprecated-dollar-scopedslots-api | vue | 错误 | ✅ | — |
| 禁止废弃的事件 API | vue/no-deprecated-events-api | vue | 错误 | — | — |
| 禁止废弃的过滤器语法 | vue/no-deprecated-filter | vue | 错误 | — | — |
| 禁止废弃的 functional 模板 | vue/no-deprecated-functional-template | vue | 错误 | — | — |
| 禁止 HTML 元素上废弃的 is | vue/no-deprecated-html-element-is | vue | 错误 | — | — |
| 禁止废弃的 inline-template | vue/no-deprecated-inline-template | vue | 错误 | — | — |
| 禁止废弃的 model 定义 | vue/no-deprecated-model-definition | vue | 错误 | — | ✅ |
| 禁止 props 默认函数中的 this | vue/no-deprecated-props-default-this | vue | 错误 | — | — |
| 禁止 RouterLink 废弃的 tag | vue/no-deprecated-router-link-tag-prop | vue | 错误 | — | — |
| 禁止废弃的 scope 属性 | vue/no-deprecated-scope-attribute | vue | 错误 | ✅ | — |
| 禁止废弃的 slot 属性 | vue/no-deprecated-slot-attribute | vue | 错误 | ✅ | — |
| 禁止废弃的 slot-scope 属性 | vue/no-deprecated-slot-scope-attribute | vue | 错误 | ✅ | — |
| 禁止废弃的 .sync | vue/no-deprecated-v-bind-sync | vue | 错误 | ✅ | — |
| 禁止废弃的 v-is | vue/no-deprecated-v-is | vue | 错误 | — | — |
| 禁止废弃的 .native | vue/no-deprecated-v-on-native-modifier | vue | 错误 | — | — |
| 禁止废弃的按键码修饰符 | vue/no-deprecated-v-on-number-modifiers | vue | 错误 | ✅ | — |
| 禁止废弃的 Vue.config.keyCodes | vue/no-deprecated-vue-config-keycodes | vue | 错误 | — | — |
| 禁止字段名重复 | vue/no-dupe-keys | vue | 错误 | — | — |
| 禁止 v-if 链重复条件 | vue/no-dupe-v-else-if | vue | 错误 | — | — |
| 禁止重复属性 | vue/no-duplicate-attributes | vue | 错误 | — | — |
| 禁止 script setup 中 export | vue/no-export-in-script-setup | vue | 错误 | — | — |
| 禁止 await 后注册 expose | vue/no-expose-after-await | vue | 错误 | — | — |
| 禁止 await 后注册生命周期 | vue/no-lifecycle-after-await | vue | 错误 | — | — |
| 禁止多余的 template | vue/no-lone-template | vue | 警告 | — | — |
| 禁止多个空格 | vue/no-multi-spaces | vue | 警告 | ✅ | — |
| 禁止作用域插槽多参数 | vue/no-multiple-slot-args | vue | 警告 | — | — |
| 禁止修改 props | vue/no-mutating-props | vue | 错误 | — | — |
| 禁止模板解析错误 | vue/no-parsing-error | vue | 错误 | — | — |
| 禁止 ref 直接作操作数 | vue/no-ref-as-operand | vue | 错误 | ✅ | — |
| 有默认值的 prop 须可选 | vue/no-required-prop-with-default | vue | 警告 | ✅ | ✅ |
| 禁止保留组件名 | vue/no-reserved-component-names | vue | 错误 | — | — |
| 禁止覆盖保留键 | vue/no-reserved-keys | vue | 错误 | — | — |
| 禁止保留的 prop 名 | vue/no-reserved-props | vue | 错误 | — | — |
| data 须为函数 | vue/no-shared-component-data | vue | 错误 | ✅ | — |
| 禁止 computed 中副作用 | vue/no-side-effects-in-computed-properties | vue | 错误 | — | — |
| 禁止属性等号周围空格 | vue/no-spaces-around-equal-signs-in-attribute | vue | 警告 | ✅ | — |
| 禁止 template 上的 key | vue/no-template-key | vue | 错误 | — | — |
| 禁止模板变量遮蔽 | vue/no-template-shadow | vue | 警告 | — | — |
| 禁止 textarea 中插值 | vue/no-textarea-mustache | vue | 错误 | — | — |
| 禁止未使用组件 | vue/no-unused-components | vue | 错误 | — | — |
| 禁止未使用的模板变量 | vue/no-unused-vars | vue | 错误 | — | ✅ |
| 禁止把 computed 当方法 | vue/no-use-computed-property-like-method | vue | 错误 | — | — |
| 禁止 v-if 与 v-for 同元素 | vue/no-use-v-if-with-v-for | vue | 错误 | — | — |
| 禁止 template 上无用属性 | vue/no-useless-template-attributes | vue | 错误 | — | — |
| 禁止 template v-for 的 key 放子元素 | vue/no-v-for-template-key-on-child | vue | 错误 | — | — |
| 禁用 v-html(防 XSS) | vue/no-v-html | vue | 警告 | — | — |
| 禁止组件上用 v-text/v-html | vue/no-v-text-v-html-on-component | vue | 错误 | — | — |
| 禁止 await 后注册 watch | vue/no-watch-after-await | vue | 错误 | — | — |
| 每文件一个组件 | vue/one-component-per-file | vue | 警告 | — | — |
| 组件选项顺序 | vue/order-in-components | vue | 警告 | ✅ | ✅ |
| 优先从 vue 导入 | vue/prefer-import-from-vue | vue | 错误 | ✅ | — |
| prop 名大小写 | vue/prop-name-casing | vue | 警告 | — | — |
| <component> 须有 :is | vue/require-component-is | vue | 错误 | — | — |
| prop 须有默认值 | vue/require-default-prop | vue | 警告 | — | — |
| 须显式声明 emits | vue/require-explicit-emits | vue | 警告 | — | ✅ |
| prop 类型须为构造函数 | vue/require-prop-type-constructor | vue | 错误 | ✅ | — |
| prop 须有类型 | vue/require-prop-types | vue | 警告 | — | — |
| render 须返回值 | vue/require-render-return | vue | 错误 | — | — |
| $slots 须作为函数调用 | vue/require-slots-as-functions | vue | 错误 | — | — |
| transition 内须控制显示 | vue/require-toggle-inside-transition | vue | 错误 | — | — |
| v-for 须有 key | vue/require-v-for-key | vue | 错误 | — | — |
| prop 默认值须有效 | vue/require-valid-default-prop | vue | 错误 | — | — |
| computed 须有 return | vue/return-in-computed-property | vue | 错误 | — | — |
| emits 校验器须有 return | vue/return-in-emits-validator | vue | 错误 | — | — |
| 单行元素内容换行 | vue/singleline-html-element-content-newline | vue | 警告 | ✅ | — |
| 禁止模板中用 this | vue/this-in-template | vue | 警告 | ✅ | — |
| v-on 须用 exact 修饰符 | vue/use-v-on-exact | vue | 错误 | — | — |
| v-bind 写法风格 | vue/v-bind-style | vue | 警告 | ✅ | — |
| v-on 事件名连字符风格 | vue/v-on-event-hyphenation | vue | 警告 | ✅ | — |
| v-on 写法风格 | vue/v-on-style | vue | 警告 | ✅ | — |
| v-slot 写法风格 | vue/v-slot-style | vue | 警告 | ✅ | — |
| 属性名须有效 | vue/valid-attribute-name | vue | 错误 | — | — |
| defineEmits 须有效 | vue/valid-define-emits | vue | 错误 | — | — |
| defineOptions 须有效 | vue/valid-define-options | vue | 错误 | — | — |
| defineProps 须有效 | vue/valid-define-props | vue | 错误 | — | — |
| nextTick 调用须有效 | vue/valid-next-tick | vue | 错误 | ✅ | ✅ |
| 模板根须有效 | vue/valid-template-root | vue | 错误 | — | — |
| v-bind 须有效 | vue/valid-v-bind | vue | 错误 | — | — |
| v-cloak 须有效 | vue/valid-v-cloak | vue | 错误 | — | — |
| v-else 须有效 | vue/valid-v-else | vue | 错误 | — | — |
| v-else-if 须有效 | vue/valid-v-else-if | vue | 错误 | — | — |
| v-for 须有效 | vue/valid-v-for | vue | 错误 | — | — |
| v-html 须有效 | vue/valid-v-html | vue | 错误 | — | — |
| v-if 须有效 | vue/valid-v-if | vue | 错误 | — | — |
| v-is 须有效 | vue/valid-v-is | vue | 错误 | — | — |
| v-memo 须有效 | vue/valid-v-memo | vue | 错误 | — | — |
| v-model 须有效 | vue/valid-v-model | vue | 错误 | — | — |
| v-on 须有效 | vue/valid-v-on | vue | 错误 | — | — |
| v-once 须有效 | vue/valid-v-once | vue | 错误 | — | — |
| v-pre 须有效 | vue/valid-v-pre | vue | 错误 | — | — |
| v-show 须有效 | vue/valid-v-show | vue | 错误 | — | — |
| v-slot 须有效 | vue/valid-v-slot | vue | 错误 | — | — |
| v-text 须有效 | vue/valid-v-text | vue | 错误 | — | — |