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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
45 deletions
+81
-45
.babelrc
.babelrc
+19
-11
.eslintrc.js
.eslintrc.js
+37
-31
.flowconfig
.flowconfig
+14
-0
package.json
package.json
+10
-3
main.js
src/main.js
+1
-0
No files found.
.babelrc
View file @
208f1301
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"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
// https://eslint.org/docs/user-guide/configuring
module
.
exports
=
{
root
:
true
,
parserOptions
:
{
parser
:
'babel-eslint'
,
},
env
:
{
browser
:
true
,
},
extends
:
[
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential'
,
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
,
],
globals
:
{
$
:
true
},
// required to lint *.vue files
plugins
:
[
'vue'
],
// add your custom rules here
rules
:
{
// allow async-await
'generator-star-spacing'
:
'off'
,
// allow debugger during development
'no-debugger'
:
process
.
env
.
NODE_ENV
===
'production'
?
'error'
:
'off'
,
'no-useless-escape'
:
'off'
,
'no-tabs'
:
'off'
,
'comma-dangle'
:
0
,
'space-before-function-paren'
:
[
0
,
'always'
],
},
}
root
:
true
,
parserOptions
:
{
parser
:
'babel-eslint'
,
},
env
:
{
browser
:
true
,
},
extends
:
[
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential'
,
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
,
],
globals
:
{
$
:
true
},
// required to lint *.vue files
plugins
:
[
'vue'
,
"html"
,
"flowtype-errors"
],
// add your custom rules here
rules
:
{
"flowtype-errors/show-errors"
:
2
,
// allow async-await
'generator-star-spacing'
:
'off'
,
// allow debugger during development
'no-debugger'
:
process
.
env
.
NODE_ENV
===
'production'
?
'error'
:
'off'
,
'no-useless-escape'
:
'off'
,
'no-tabs'
:
'off'
,
'comma-dangle'
:
0
,
'space-before-function-paren'
:
[
0
,
'always'
],
},
}
\ No newline at end of file
.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 @@
"devDependencies"
:
{
"
autoprefixer
"
:
"^7.1.2"
,
"
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-loader
"
:
"^7.1.1"
,
"
babel-plugin-syntax-flow
"
:
"^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-vue-jsx
"
:
"^3.5.0"
,
"
babel-preset-env
"
:
"^1.3.2"
,
...
...
@@ -42,17 +45,21 @@
"
chalk
"
:
"^2.0.1"
,
"
copy-webpack-plugin
"
:
"^4.0.1"
,
"
css-loader
"
:
"^0.28.0"
,
"
eslint
"
:
"^4.1
5.0
"
,
"
eslint
"
:
"^4.1
9.1
"
,
"
eslint-config-standard
"
:
"^10.2.1"
,
"
eslint-config-vue
"
:
"^2.0.2"
,
"
eslint-friendly-formatter
"
:
"^3.0.0"
,
"
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-node
"
:
"^5.2.0"
,
"
eslint-plugin-promise
"
:
"^3.4.0"
,
"
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"
,
"
file-loader
"
:
"^1.1.4"
,
"
flow-bin
"
:
"^0.86.0"
,
"
friendly-errors-webpack-plugin
"
:
"^1.6.1"
,
"
html-webpack-plugin
"
:
"^2.30.1"
,
"
less
"
:
"^3.8.1"
,
...
...
src/main.js
View file @
208f1301
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
/* @flow */
import
Vue
from
'vue'
import
App
from
'./App'
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