1 Star 0 Fork 2

yuxingming/vite_react_init

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eslintrc.cjs 1.96 KB
一键复制 编辑 原始数据 按行查看 历史
module.exports = {
env: {
browser: true,
node: true,
es2021: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'prettier', 'plugin:prettier/recommended', '@unocss'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', 'react-hooks'],
rules: {
'no-console': [
'error',
{
allow: ['warn', 'error', 'info', 'debug', 'groupCollapsed', 'groupEnd'],
},
],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: 'return', next: '*' },
{ blankLine: 'always', prev: '*', next: 'directive' },
{ blankLine: 'always', prev: 'directive', next: '*' },
{ blankLine: 'any', prev: 'directive', next: 'directive' },
{ blankLine: 'always', prev: 'import', next: '*' },
{ blankLine: 'never', prev: 'import', next: 'import' },
{ blankLine: 'always', prev: '*', next: 'export' },
{ blankLine: 'always', prev: 'export', next: '*' },
{ blankLine: 'any', prev: 'export', next: 'export' },
{ blankLine: 'always', prev: '*', next: 'function' },
{ blankLine: 'always', prev: 'function', next: '*' },
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{ blankLine: 'always', prev: '*', next: ['const', 'let', 'var'] },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
{ blankLine: 'always', prev: ['case', 'default'], next: '*' },
{ blankLine: 'always', prev: '*', next: ['block', 'block-like'] },
{ blankLine: 'always', prev: ['block', 'block-like'], next: '*' },
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'off',
indent: 'off',
'no-undef': ['error', { typeof: true }],
'no-unused-vars': 'error',
'react/prop-types': 'off',
'react/no-unknown-property': 'off',
},
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yuxingming/vite_react_init.git
[email protected]:yuxingming/vite_react_init.git
yuxingming
vite_react_init
vite_react_init
master

搜索帮助