eslint 代码格式验证规则为eslint,主要配置如下:
"rules": {
"indent": [0, 4],
"arrow-parens": 0,
"generator-star-spacing": 0,
"no-debugger": 0,
"eol-last": 0,
"eqeqeq": 2,
"camelcase": 0,
"space-before-function-paren": 0,
"quotes": ["error", "single"],
"@typescript-eslint/explicit-function-return-type": [
"off",
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true
}
],
"@typescript-eslint/no-explicit-any": "off",
"prettier/prettier": "error",
"no-var": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"]
}
|