我希望我的eslintrc.js被打印出来,并且拥有所有允许的规则的类型定义。
例如:
module.exports = defineESLint({
rules: {
// intellisence: Enforce the consistent use of either backticks, double, or single quotes
// quotes?: 'off' | 'warn' | 'error'
// | ['warn' | 'error', 'single' | 'double', { avoidEscape?: true }]
quotes: ["warn", 'single', {avoidEscape: true}],
}
})我通常希望它能与我的所有扩展一起工作
目前我所能做的就是
{
"$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/eslintrc.json",
"rules": {
"quotes": [
"warn",
"single",
{
"avoidEscape": true
}
]
}
}在json,但它几乎不起作用
发布于 2022-11-15 13:02:31
用法:
.eslintrc.js
// @ts-check
const { defineConfig } = require('eslint-define-config');
module.exports = defineConfig({
root: true,
rules: {
// rules...
},
});通过以下方法改进您的eslint配置经验
// @ts-check中的第一行使用.eslintrc.js)

https://stackoverflow.com/questions/74316697
复制相似问题