Skip to content

Commit

Permalink
Add some files: eslint/postcss/babelrc
Browse files Browse the repository at this point in the history
  • Loading branch information
Micahel Wang committed May 23, 2018
1 parent 9003767 commit 3c9be50
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime","syntax-dynamic-import","dynamic-import-node"],
"env": {
"test": {
"presets": ["env", "stage-2","es2015"],
"plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "syntax-dynamic-import"]
}
}
}
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/build/
/config/
/dist/
/*.js
/test/unit/coverage/
45 changes: 45 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// https://eslint.org/docs/user-guide/configuring
// eslint-disable-next-line
/* eslint-disable */
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 2017,
sourceType: 'module'
},
extends: [
'eslint-config-alloy/vue',
],
globals: {
// 这里填入你的项目需要的全局变量
// 这里值为 false 表示这个全局变量不允许被重新赋值,比如:
//
// Vue: false
},
rules: {
// 这里填入你的项目需要的个性化配置,比如:
//
// // @fixable 一个缩进必须用两个空格替代
'indent': [
'error',
2,
{
SwitchCase: 1,
flatTernaryExpressions: true
}
],
'no-undef-init': 1,
'no-trailing-spaces': 0,
'no-undefined': 0,
'no-void': 0,
'no-unused-vars': 0,
'no-param-reassign': 0,
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "always",
"asyncArrow": "always"
}],
},

};
10 changes: 10 additions & 0 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// https://github.com/michael-ciniawsky/postcss-load-config

module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}

0 comments on commit 3c9be50

Please sign in to comment.