1 Star 0 Fork 0

狂@野_男@孩 / zhihu-applet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc.js 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
MoonCheung 提交于 2019-08-17 23:59 . add dva
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true
},
sourceType: 'module'
},
extends: [
'eslint:recommended',
'plugin:taro/all',
'plugin:react/recommended',
'plugin:prettier/recommended'
],
settings: {
react: {
version: 'latest'
}
},
plugins: ['react', 'prettier'],
rules: {
// 关闭冲突规则
'prettier/prettier': [
'error',
{
printWidth: 100, // 一行的字符数,如果超过会进行换行,默认为80
tabWidth: 2, // 一个tab代表几个空格数,默认为80
useTabs: false, // 是否使用tab进行缩进,默认为false,表示用空格进行缩减
singleQuote: true, // 默认为false,如需使用单引号设置true
semi: true, // 行尾是否使用分号,默认为true
trailingComma: 'none', // 是否使用尾逗号,有三个可选值"<none|es5|all>"
bracketSpacing: true, // 对象大括号直接是否有空格,默认为true,效果:{ foo: bar }
jsxBracketSameLine: true
}
],
// 相关Taro 规则
'no-unused-vars': [
'error',
{
varsIgnorePattern: 'Taro'
}
],
// 相关react 规则
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx', '.tsx']
}
]
}
};
1
https://gitee.com/loock/zhihu-applet.git
git@gitee.com:loock/zhihu-applet.git
loock
zhihu-applet
zhihu-applet
master

搜索帮助