Skip to content

Commit c3ef290

Browse files
committed
Add flowjs support
1 parent b620546 commit c3ef290

File tree

5 files changed

+586
-13
lines changed

5 files changed

+586
-13
lines changed

.babelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"@babel/preset-env"
44
],
55
"plugins": [
6-
["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }]
6+
["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }],
7+
"babel-plugin-transform-class-properties",
8+
"babel-plugin-syntax-flow",
9+
"babel-plugin-transform-flow-strip-types"
710
]
811
}

.eslintrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"parser": "babel-eslint",
3+
"plugins": ["html", "flowtype-errors"],
4+
"extends": ["vue"],
5+
"rules": {
6+
"flowtype-errors/show-errors": 2,
7+
"semi": "off",
8+
"indent": ["error", 4],
9+
"comma-dangle": ["error", "always-multiline"]
10+
}
11+
}

.flowconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[ignore]
2+
<PROJECT_ROOT>/vendor/.*
3+
<PROJECT_ROOT>/tests/.*
4+
<PROJECT_ROOT>/storage/.*
5+
<PROJECT_ROOT>/app/.*
6+
7+
[options]
8+
module.name_mapper='^/\(.*\)$' -> '<PROJECT_ROOT>/\1'
9+
module.file_ext=.js
10+
module.file_ext=.vue
11+
module.file_ext=.json
12+
13+
[version]
14+
0.81.0

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,25 @@
2323
"axios": "^0.18.0",
2424
"babel-cli": "6.18.0",
2525
"babel-core": "^6.26.3",
26+
"babel-eslint": "^9.0.0",
2627
"babel-loader": "^8.0.0-beta.3",
28+
"babel-plugin-syntax-flow": "^6.18.0",
29+
"babel-plugin-transform-class-properties": "^6.24.1",
30+
"babel-plugin-transform-flow-strip-types": "^6.22.0",
2731
"babel-plugin-transform-object-assign": "^6.22.0",
2832
"babel-plugin-transform-runtime": "^6.23.0",
2933
"babel-plugin-transform-strict-mode": "^6.18.0",
3034
"babel-register": "^6.26.0",
3135
"camelcase": "^5.0.0",
3236
"clean-webpack-plugin": "^0.1.19",
3337
"css-loader": "^0.28.11",
38+
"eslint": "^5.6.0",
39+
"eslint-config-vue": "^2.0.2",
40+
"eslint-plugin-flowtype-errors": "^3.6.0",
41+
"eslint-plugin-html": "^4.0.6",
42+
"eslint-plugin-vue": "^4.7.1",
3443
"extract-text-webpack-plugin": "^4.0.0-beta.0",
44+
"flow-bin": "^0.81.0",
3545
"glob-all": "^3.1.0",
3646
"html-webpack-plugin": "^3.2.0",
3747
"jquery": "^3.3.1",

0 commit comments

Comments
 (0)