Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common-templete
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
汤强勇
common-templete
Commits
208f1301
Commit
208f1301
authored
Nov 10, 2018
by
tangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
引入flow类型检查
parent
bb92fda9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
5 deletions
+40
-5
.babelrc
.babelrc
+9
-1
.eslintrc.js
.eslintrc.js
+6
-1
.flowconfig
.flowconfig
+14
-0
package.json
package.json
+10
-3
main.js
src/main.js
+1
-0
No files found.
.babelrc
View file @
208f1301
...
@@ -8,5 +8,12 @@
...
@@ -8,5 +8,12 @@
}],
}],
"stage-2"
"stage-2"
],
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
"plugins": [
"syntax-flow",
"transform-vue-jsx",
"babel-plugin-transform-class-properties",
"babel-plugin-syntax-flow",
"babel-plugin-transform-flow-strip-types",
"transform-runtime"
]
}
}
\ No newline at end of file
.eslintrc.js
View file @
208f1301
...
@@ -19,9 +19,14 @@ module.exports = {
...
@@ -19,9 +19,14 @@ module.exports = {
$
:
true
$
:
true
},
},
// required to lint *.vue files
// required to lint *.vue files
plugins
:
[
'vue'
],
plugins
:
[
'vue'
,
"html"
,
"flowtype-errors"
],
// add your custom rules here
// add your custom rules here
rules
:
{
rules
:
{
"flowtype-errors/show-errors"
:
2
,
// allow async-await
// allow async-await
'generator-star-spacing'
:
'off'
,
'generator-star-spacing'
:
'off'
,
// allow debugger during development
// allow debugger during development
...
...
.flowconfig
0 → 100644
View file @
208f1301
[ignore]
.*/test/.*
.*/build/.*
.*/config/.*
[include]
[libs]
[options]
module.file_ext=.vue
module.file_ext=.js
module.file_ext=.scss
\ No newline at end of file
package.json
View file @
208f1301
...
@@ -31,10 +31,13 @@
...
@@ -31,10 +31,13 @@
"devDependencies"
:
{
"devDependencies"
:
{
"
autoprefixer
"
:
"^7.1.2"
,
"
autoprefixer
"
:
"^7.1.2"
,
"
babel-core
"
:
"^6.22.1"
,
"
babel-core
"
:
"^6.22.1"
,
"
babel-eslint
"
:
"^8.2.
1
"
,
"
babel-eslint
"
:
"^8.2.
6
"
,
"
babel-helper-vue-jsx-merge-props
"
:
"^2.0.3"
,
"
babel-helper-vue-jsx-merge-props
"
:
"^2.0.3"
,
"
babel-loader
"
:
"^7.1.1"
,
"
babel-loader
"
:
"^7.1.1"
,
"
babel-plugin-syntax-flow
"
:
"^6.18.0"
,
"
babel-plugin-syntax-jsx
"
:
"^6.18.0"
,
"
babel-plugin-syntax-jsx
"
:
"^6.18.0"
,
"
babel-plugin-transform-class-properties
"
:
"^6.24.1"
,
"
babel-plugin-transform-flow-strip-types
"
:
"^6.22.0"
,
"
babel-plugin-transform-runtime
"
:
"^6.22.0"
,
"
babel-plugin-transform-runtime
"
:
"^6.22.0"
,
"
babel-plugin-transform-vue-jsx
"
:
"^3.5.0"
,
"
babel-plugin-transform-vue-jsx
"
:
"^3.5.0"
,
"
babel-preset-env
"
:
"^1.3.2"
,
"
babel-preset-env
"
:
"^1.3.2"
,
...
@@ -42,17 +45,21 @@
...
@@ -42,17 +45,21 @@
"
chalk
"
:
"^2.0.1"
,
"
chalk
"
:
"^2.0.1"
,
"
copy-webpack-plugin
"
:
"^4.0.1"
,
"
copy-webpack-plugin
"
:
"^4.0.1"
,
"
css-loader
"
:
"^0.28.0"
,
"
css-loader
"
:
"^0.28.0"
,
"
eslint
"
:
"^4.1
5.0
"
,
"
eslint
"
:
"^4.1
9.1
"
,
"
eslint-config-standard
"
:
"^10.2.1"
,
"
eslint-config-standard
"
:
"^10.2.1"
,
"
eslint-config-vue
"
:
"^2.0.2"
,
"
eslint-friendly-formatter
"
:
"^3.0.0"
,
"
eslint-friendly-formatter
"
:
"^3.0.0"
,
"
eslint-loader
"
:
"^1.7.1"
,
"
eslint-loader
"
:
"^1.7.1"
,
"
eslint-plugin-flowtype-errors
"
:
"^3.6.0"
,
"
eslint-plugin-html
"
:
"^4.0.6"
,
"
eslint-plugin-import
"
:
"^2.7.0"
,
"
eslint-plugin-import
"
:
"^2.7.0"
,
"
eslint-plugin-node
"
:
"^5.2.0"
,
"
eslint-plugin-node
"
:
"^5.2.0"
,
"
eslint-plugin-promise
"
:
"^3.4.0"
,
"
eslint-plugin-promise
"
:
"^3.4.0"
,
"
eslint-plugin-standard
"
:
"^3.0.1"
,
"
eslint-plugin-standard
"
:
"^3.0.1"
,
"
eslint-plugin-vue
"
:
"^4.
0.0
"
,
"
eslint-plugin-vue
"
:
"^4.
7.1
"
,
"
extract-text-webpack-plugin
"
:
"^3.0.0"
,
"
extract-text-webpack-plugin
"
:
"^3.0.0"
,
"
file-loader
"
:
"^1.1.4"
,
"
file-loader
"
:
"^1.1.4"
,
"
flow-bin
"
:
"^0.86.0"
,
"
friendly-errors-webpack-plugin
"
:
"^1.6.1"
,
"
friendly-errors-webpack-plugin
"
:
"^1.6.1"
,
"
html-webpack-plugin
"
:
"^2.30.1"
,
"
html-webpack-plugin
"
:
"^2.30.1"
,
"
less
"
:
"^3.8.1"
,
"
less
"
:
"^3.8.1"
,
...
...
src/main.js
View file @
208f1301
// The Vue build version to load with the `import` command
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
/* @flow */
import
Vue
from
'vue'
import
Vue
from
'vue'
import
App
from
'./App'
import
App
from
'./App'
import
router
from
'./router'
import
router
from
'./router'
...
...
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