1 Star 1 Fork 0

SyncGithub/fe-code

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eslintrc.js 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
xianweics 提交于 2021-08-15 19:19 +08:00 . feat: support eslint & prettier
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
node: true,
},
extends: ['airbnb-base', 'airbnb-typescript', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 12,
project: './tsconfig.eslint.json',
},
rules: {
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-prototype-builtins': 'off',
'no-restricted-syntax': 'off',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
],
'import/no-unresolved': [
2,
{
ignore: [
'vue',
'react',
'@crud',
'react-dom',
'vite-plugin-vue2',
'mockjs',
'umi-request',
],
},
],
'global-require': 'off',
'import/no-dynamic-require': 'off',
'react/react-in-jsx-scope': 'off',
'no-shadow': 'off',
'react/jsx-props-no-spreading': 'off',
'@typescript-eslint/no-shadow': ['error'],
'import/prefer-default-export': 'off',
'react/destructuring-assignment': [0, 'always'],
'import/no-extraneous-dependencies': 0,
'no-param-reassign': 0,
'no-nested-ternary': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.vue', '.tsx', '.ts'],
},
},
},
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/sync-github/fe-code.git
git@gitee.com:sync-github/fe-code.git
sync-github
fe-code
fe-code
main

搜索帮助