提交 a0a23e9f 编写于 作者: J Javan Makhmali 提交者: David Heinemeier Hansson

Add JavaScript linting (#82)

上级 6262891b
{
"extends": "eslint:recommended",
"rules": {
"semi": ["error", "never"],
"quotes": ["error", "double"],
"no-unused-vars": ["error", { "vars": "all", "args": "none" }]
},
"plugins": [
"import"
],
"env": {
"browser": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
}
}
......@@ -2,14 +2,24 @@ language: ruby
sudo: false
bundler: true
script: bundle exec rake
rvm:
- 2.3
- 2.4
- ruby-head
cache:
bundler: true
yarn: true
matrix:
allow_failures:
- rvm: ruby-head
fast_finish: true
install:
- bundle install
- yarn install
script:
- bundle exec rake
- yarn lint
......@@ -19,7 +19,7 @@ export class BlobUpload {
requestDidLoad(event) {
const { status, response } = this.xhr
if (status >= 200 && status < 300) {
this.callback(null, this.xhr.response)
this.callback(null, response)
} else {
this.requestDidError(event)
}
......
......@@ -10,6 +10,8 @@
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-preset-env": "^1.6.0",
"eslint": "^4.3.0",
"eslint-plugin-import": "^2.7.0",
"spark-md5": "^3.0.0",
"webpack": "^3.4.0"
},
......@@ -17,6 +19,8 @@
"app/assets/javascripts/activestorage.js"
],
"scripts": {
"build": "webpack -p"
"prebuild": "yarn lint",
"build": "webpack -p",
"lint": "eslint app/javascript"
}
}
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册