Merge branch 'issue-126'

This commit is contained in:
Gleb Bahmutov
2017-06-05 15:39:40 -04:00
5 changed files with 157 additions and 2 deletions

15
packages/coffee/README.md Normal file
View File

@@ -0,0 +1,15 @@
## 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.

View File

@@ -6,5 +6,8 @@
},
"scripts": {
"test": "echo 'Nothing to test for the coffee package'"
},
"devDependencies": {
"coffeelint": "^1.16.0"
}
}

135
packages/coffeelint.json Normal file
View File

@@ -0,0 +1,135 @@
{
"arrow_spacing": {
"level": "ignore"
},
"braces_spacing": {
"level": "warn",
"spaces": 0,
"empty_object_spaces": 0
},
"camel_case_classes": {
"level": "error"
},
"coffeescript_error": {
"level": "error"
},
"colon_assignment_spacing": {
"level": "ignore",
"spacing": {
"left": 0,
"right": 1
}
},
"cyclomatic_complexity": {
"level": "ignore",
"value": 10
},
"duplicate_key": {
"level": "error"
},
"empty_constructor_needs_parens": {
"level": "error"
},
"ensure_comprehensions": {
"level": "warn"
},
"eol_last": {
"level": "error"
},
"indentation": {
"value": 2,
"level": "error"
},
"line_endings": {
"level": "ignore",
"value": "unix"
},
"max_line_length": {
"value": 100,
"level": "error",
"limitComments": true
},
"missing_fat_arrows": {
"level": "ignore",
"is_strict": false
},
"newlines_after_classes": {
"value": 3,
"level": "ignore"
},
"no_backticks": {
"level": "error"
},
"no_debugger": {
"level": "warn",
"console": false
},
"no_empty_functions": {
"level": "ignore"
},
"no_empty_param_list": {
"level": "ignore"
},
"no_implicit_braces": {
"level": "warn",
"strict": true
},
"no_implicit_parens": {
"level": "ignore",
"strict": true
},
"no_interpolation_in_single_quotes": {
"level": "error"
},
"no_nested_string_interpolation": {
"level": "warn"
},
"no_plusplus": {
"level": "ignore"
},
"no_private_function_fat_arrows": {
"level": "warn"
},
"no_stand_alone_at": {
"level": "ignore"
},
"no_tabs": {
"level": "error"
},
"no_this": {
"level": "error"
},
"no_throwing_strings": {
"level": "error"
},
"no_trailing_semicolons": {
"level": "error"
},
"no_trailing_whitespace": {
"level": "error",
"allowed_in_comments": false,
"allowed_in_empty_lines": true
},
"no_unnecessary_double_quotes": {
"level": "ignore"
},
"no_unnecessary_fat_arrows": {
"level": "warn"
},
"non_empty_constructor_needs_parens": {
"level": "ignore"
},
"prefer_english_operator": {
"level": "ignore",
"doubleNotLevel": "ignore"
},
"space_operators": {
"level": "warn"
},
"spacing_after_comma": {
"level": "ignore"
},
"transform_messes_up_line_numbers": {
"level": "warn"
}
}

View File

@@ -9,7 +9,9 @@
"test": "mocha",
"clean-deps": "rm -rf node_modules",
"clean": "rm lib/*.js lib/**/*.js || true",
"lint": "tslint --type-check --project . --fix --format stylish lib/*.ts lib/**/*.ts"
"lint": "npm run lint-ts && npm run lint-coffee",
"lint-ts": "tslint --type-check --project . --fix --format stylish lib/*.ts lib/**/*.ts",
"lint-coffee": "../coffee/node_modules/.bin/coffeelint test/*.coffee test/**/*.coffee"
},
"repository": {
"type": "git",

View File

@@ -10,4 +10,4 @@ beforeEach ->
@sandbox = sinon.sandbox.create()
afterEach ->
@sandbox.restore()
@sandbox.restore()