加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eslintrc.json 2.77 KB
一键复制 编辑 原始数据 按行查看 历史
Will Scullin 提交于 2024-02-29 10:36 . Enable consistent return lint (#432)
{
"extends": ["./node_modules/gts/", "plugin:lit/recommended"],
"ignorePatterns": [
"*.d.ts",
"node_modules/",
"packages/malloy/src/lang/lib/Malloy",
"dist/"
],
"rules": {
"consistent-return": "error",
"no-console": [
"error",
{
"allow": ["debug", "info", "warn", "error"]
}
],
"prettier/prettier": "error",
"sort-keys": "off",
"no-duplicate-imports": "error",
"no-restricted-imports": [
"error",
{
"patterns": ["@malloydata/malloy/src/*"],
"paths": [
{
"name": "lodash",
"message": "Import [module] from lodash/[module] instead"
}
]
}
],
"no-throw-literal": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{"prefer": "no-type-imports"}
],
"@typescript-eslint/no-unused-vars": [
"error",
{"argsIgnorePattern": "^_", "varsIgnorePattern": "^_"}
],
"@typescript-eslint/parameter-properties": [
"error",
{"prefer": "parameter-property"}
]
},
"overrides": [
{
"files": ["**/*.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false,
"project": ["./tsconfig.json"]
},
"rules": {"@typescript-eslint/no-floating-promises": "error"}
},
{
"files": ["src/server/**"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": ["**/extension/**", "vscode"]
}
]
}
},
{
"files": ["src/worker/**"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": ["**/extension/**", "**/server/**", "vscode"]
}
]
}
},
{
"files": ["src/extension/**"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": ["**/worker/**", "**/server/**"]
}
]
}
},
{
"files": ["src/common/**"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": ["vscode"]
}
]
}
},
{
"files": ["**/browser/**"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": ["fs", "path"]
}
]
}
},
{
"files": ["scripts/**", "test/**", "integration/**"],
"rules": {
"node/no-unpublished-import": "off",
"no-console": "off",
"no-process-exit": "off"
}
},
{
"files": ["integration/**"],
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false,
"project": ["./tsconfig.integration.json"]
}
}
]
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化