mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-04 14:00:22 -05:00
Lint coffee files using single tool (#208)
* coffee: merge coffeelinting to the root * root: lint coffee files in the scripts folder
This commit is contained in:
+4
-2
@@ -19,7 +19,9 @@
|
||||
"postinstall": "npm run link && npm run all install && npm run build",
|
||||
"clean-deps": "npm run all clean-deps",
|
||||
"docker": "./scripts/run-docker-local.sh",
|
||||
"lint": "eslint --fix scripts/*.js",
|
||||
"lint-js": "eslint --fix scripts/*.js",
|
||||
"lint-coffee": "coffeelint scripts/*.coffee scripts/**/*.coffee",
|
||||
"lint": "npm run lint-js && npm run lint-coffee",
|
||||
"pretest": "npm run lint && npm run all lint",
|
||||
"precommit": "lint-staged",
|
||||
"precommit-lint": "eslint --fix --rule 'no-only-tests/no-only-tests: 2'",
|
||||
@@ -40,8 +42,8 @@
|
||||
"babel-eslint": "^6.0.4",
|
||||
"bluebird": "^3.4.5",
|
||||
"chai": "^4.0.2",
|
||||
"coffeelint": "^1.16.0",
|
||||
"del": "^3.0.0",
|
||||
"electron-osx-sign": "^0.4.6",
|
||||
"deps-ok": "^1.2.0",
|
||||
"electron-osx-sign": "^0.4.6",
|
||||
"eslint": "^3.18.0",
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
## linting
|
||||
|
||||
To lint CoffeeScript files, use `coffeelint` tool in this project.
|
||||
For example, from `packages/launcher/package.json` the command to lint
|
||||
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
"pretest": "npm run lint",
|
||||
"lint": "../coffee/node_modules/.bin/coffeelint test/*.coffee"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The linting settings are in `packages/coffeelint.json` file.
|
||||
@@ -9,6 +9,5 @@
|
||||
"test": "echo 'Nothing to test for the coffee package'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coffeelint": "^1.16.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"lint": "npm run format-ts && npm run lint-ts && npm run lint-coffee && npm run lint-js",
|
||||
"lint-js": "$(bin-up eslint) --fix *.js",
|
||||
"lint-ts": "tslint --type-check --project . --fix --format stylish lib/*.ts lib/**/*.ts",
|
||||
"lint-coffee": "../coffee/node_modules/.bin/coffeelint test/*.coffee test/**/*.coffee",
|
||||
"lint-coffee": "$(bin-up coffeelint) test/*.coffee test/**/*.coffee",
|
||||
"format-ts": "prettier --no-semi --single-quote --write lib/*.ts lib/**/*.ts",
|
||||
"build-js": "tsc",
|
||||
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";"
|
||||
|
||||
@@ -21,13 +21,14 @@
|
||||
"test-debug": "NODE_ENV=test NODE_DEBUG=request CYPRESS_ENV=test BLUEBIRD_DEBUG=1 DEBUG=nock.*,-nock.common,socket.io:* node-debug --hidden='(node_modules|bower_components)' --no-preload _mocha --opts test/support/mocha.opts --watch",
|
||||
"codecov": "codecov",
|
||||
"coveralls": "cat ./coverage/lcov.info | coveralls",
|
||||
"lint": "../coffee/node_modules/.bin/coffeelint test/*.coffee test/unit/*.coffee test/integration/*.coffee"
|
||||
"lint": "$(bin-up coffeelint) test/*.coffee test/unit/*.coffee test/integration/*.coffee"
|
||||
},
|
||||
"files": [
|
||||
"config",
|
||||
"lib"
|
||||
],
|
||||
"devDependencies": {
|
||||
"bin-up": "^1.0.1",
|
||||
"body-parser": "1.12.4",
|
||||
"chokidar-cli": "^1.2.0",
|
||||
"cloudflare-cli": "^1.5.2",
|
||||
|
||||
@@ -30,8 +30,9 @@ pathToPackageJson = (pkg) ->
|
||||
|
||||
class Base
|
||||
constructor: (os, @options = {}) ->
|
||||
_.defaults @options,
|
||||
version: null
|
||||
_.defaults @options, {
|
||||
version: null
|
||||
}
|
||||
|
||||
@zipName = zipName
|
||||
@osName = os
|
||||
|
||||
@@ -56,4 +56,4 @@ class Darwin extends Base
|
||||
@build()
|
||||
.return(@)
|
||||
|
||||
module.exports = Darwin
|
||||
module.exports = Darwin
|
||||
|
||||
@@ -112,4 +112,4 @@ class Linux extends Base
|
||||
.then(@rsyncBack)
|
||||
.return(@)
|
||||
|
||||
module.exports = Linux
|
||||
module.exports = Linux
|
||||
|
||||
@@ -4,4 +4,4 @@ module.exports = {
|
||||
distDir: path.join(process.cwd(), "dist")
|
||||
buildDir: path.join(process.cwd(), "build")
|
||||
cacheDir: path.join(process.cwd(), "cache")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ module.exports = {
|
||||
getPublisher: ->
|
||||
aws = @getAwsObj()
|
||||
|
||||
awspublish.create
|
||||
awspublish.create {
|
||||
httpOptions: {
|
||||
timeout: human("10 minutes")
|
||||
}
|
||||
@@ -28,6 +28,7 @@ module.exports = {
|
||||
}
|
||||
accessKeyId: aws.key
|
||||
secretAccessKey: aws.secret
|
||||
}
|
||||
|
||||
getAwsObj: ->
|
||||
fs.readJsonSync("./support/aws-credentials.json")
|
||||
|
||||
@@ -14,4 +14,4 @@ module.exports = {
|
||||
return reject(err) if err
|
||||
|
||||
resolve(dest)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user