Integrate coffeelint into the project.

Known issues:

- Currently a dummy transform is needed to apply a different syntax parser (iced-coffee-script-3 in our case) which is situated in `util/dummy-transform`. It's installed as a devDependency.
develop
Icedream 2017-05-18 01:25:36 +02:00
parent 9708f3d7c1
commit ef52493a55
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
5 changed files with 167 additions and 0 deletions

8
.coffeelintignore Normal file
View File

@ -0,0 +1,8 @@
.git*
.docker*
etc
node_modules
dist
src.js

141
coffeelint.json Normal file
View File

@ -0,0 +1,141 @@
{
"arrow_spacing": {
"level": "ignore"
},
"braces_spacing": {
"level": "ignore",
"spaces": 0,
"empty_object_spaces": 0
},
"camel_case_classes": {
"level": "error"
},
"coffeelint": {
"coffeescript": "iced-coffee-script-3",
"transforms": [
"dummy-transform"
]
},
"coffeescript_error": {
"level": "error"
},
"colon_assignment_spacing": {
"level": "ignore",
"spacing": {
"left": 0,
"right": 0
}
},
"cyclomatic_complexity": {
"level": "ignore",
"value": 10
},
"duplicate_key": {
"level": "error"
},
"empty_constructor_needs_parens": {
"level": "ignore"
},
"ensure_comprehensions": {
"level": "warn"
},
"eol_last": {
"level": "ignore"
},
"indentation": {
"value": 1,
"level": "warn"
},
"line_endings": {
"level": "ignore",
"value": "unix"
},
"max_line_length": {
"value": 80,
"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": "ignore",
"strict": true
},
"no_implicit_parens": {
"level": "ignore",
"strict": true
},
"no_interpolation_in_single_quotes": {
"level": "ignore"
},
"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": "ignore"
},
"no_this": {
"level": "ignore"
},
"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": "ignore"
},
"spacing_after_comma": {
"level": "ignore"
},
"transform_messes_up_line_numbers": {
"level": "warn"
}
}

View File

@ -63,6 +63,13 @@
"devDependencies": { "devDependencies": {
"babel-cli": "^6.24.1", "babel-cli": "^6.24.1",
"babel-preset-es2017-node7": "^0.5.2", "babel-preset-es2017-node7": "^0.5.2",
"coffeelint": "^1.16.0",
"coffeelint-config-groupon": "^4.1.0",
"coffeelint-forbidden-keywords": "~0.1.1",
"coffeelint-no-mocha-only": "^1.0.0",
"coffeelint-use-strict": "^1.0.0",
"coffeescope2": "~0.4.2",
"dummy-transform": "file:./util/dummy-transform",
"eslint": "^3.19.0", "eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1", "eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.2.0", "eslint-plugin-import": "^2.2.0",

View File

@ -0,0 +1,5 @@
function transform(code) {
return code;
}
module.exports = { transform };

View File

@ -0,0 +1,6 @@
{
"name": "dummy-transform",
"version": "1.0.0",
"main": "index.js",
"license": "MIT"
}