1 Star 1 Fork 0

星辰编程理财/istock-shell

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eslintrc.cjs 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
枫星辰 提交于 2024-03-03 22:56 +08:00 . feat: iStock Shell v0.1
module.exports = {
env: {
browser: true,
es2021: true,
},
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'standard-with-typescript',
'plugin:svelte/recommended',
'plugin:prettier/recommended',
'plugin:svelte/prettier',
],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
// Parse the `<script>` in `.svelte` as TypeScript by adding the following configuration.
parserOptions: {
parser: '@typescript-eslint/parser',
},
rules: {
'svelte/valid-compile': 'off',
},
},
{
files: ['**/*.model.ts'], // 服务模型文件,pnpm命令抛错,先关闭
rules: {
indent: 'off',
},
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
extraFileExtensions: ['.svelte'],
},
rules: {
// 解决ESLint和Prettier的switch/case缩进冲突
indent: ['error', 2, { SwitchCase: 1 }],
// vite打包时去除console和debugger
'no-console': 'off',
'no-debugger': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
},
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/xcbclc/istock-shell.git
git@gitee.com:xcbclc/istock-shell.git
xcbclc
istock-shell
istock-shell
main

搜索帮助