Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-operation-4
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
达摩4.0重构
haoban-operation-4
Commits
642d533f
Commit
642d533f
authored
Aug 21, 2020
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 添加vue组件相关的代码规范
parent
fbda73ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
.eslintrc.js
.eslintrc.js
+12
-2
No files found.
.eslintrc.js
View file @
642d533f
...
...
@@ -201,12 +201,22 @@ module.exports = {
"object-curly-spacing"
:
[
2
,
"always"
],
//{后 }前必须有一个空格
"space-before-function-paren"
:
[
2
,
"never"
],
//函数圆括号之前无空格
"space-infix-ops"
:
2
,
"semi"
:
[
2
,
"always"
],
//
语句强制
分号结尾
"semi"
:
[
2
,
"always"
],
//
代码使用
分号结尾
"valid-jsdoc"
:
[
"error"
,
{
"requireReturn"
:
false
,
"requireParamDescription"
:
false
,
"requireReturnDescription"
:
false
}],
//强制JSDoc注释
}],
//使用JSDoc注释
"vue/attribute-hyphenation"
:
[
"error"
,
"always"
],
// 自定义组件的属性使用连字符,不可使用小驼峰命名法
"vue/component-name-in-template-casing"
:
[
"error"
,
"kebab-case"
],
// 自定义组件在template中的标签使用连字符
"vue/html-closing-bracket-newline"
:
[
"error"
,
{
// vue组件template中不能以 > 开头
"singleline"
:
"never"
,
"multiline"
:
"never"
}],
"vue/html-quotes"
:
[
"error"
,
"double"
],
// vue组件template中使用双引号
"vue/name-property-casing"
:
[
"error"
,
"PascalCase"
],
// vue组件name属性使用大驼峰命名法
"vue/prop-name-casing"
:
[
"error"
,
"camelCase"
],
// vue组件props的key使用小驼峰命名法
"vue/this-in-template"
:
[
"error"
,
"never"
],
// vue组件template中不能使用this
"vue/order-in-components"
:
[
"error"
,
{
"order"
:
[
"el"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment