Clean logs on start - and eslint/mocha with code coverage (#1945)
* Clean logs on startup; install server-side testing/linting * Add eslint config, make all of app/ conform to its demands * Add Node.js testing and linting to CI * Lock project to Node.js 7.9.0, used by Electron 1.7.10 * New eslint error: trailing commas in function argumensts Node 7.9.0 doesn't like trailing commas, but Electron does * Move electron to devDependency, tell eslint it's built-in
This commit is contained in:
parent
6464d0a5fa
commit
64fe9dbfb2
21 changed files with 1782 additions and 316 deletions
41
.eslintrc.js
Normal file
41
.eslintrc.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
// For reference: https://github.com/airbnb/javascript
|
||||
|
||||
module.exports = {
|
||||
settings: {
|
||||
'import/core-modules': [
|
||||
'electron'
|
||||
]
|
||||
},
|
||||
|
||||
extends: [
|
||||
'airbnb-base',
|
||||
],
|
||||
|
||||
rules: {
|
||||
'comma-dangle': ['error', {
|
||||
arrays: 'always-multiline',
|
||||
objects: 'always-multiline',
|
||||
imports: 'always-multiline',
|
||||
exports: 'always-multiline',
|
||||
functions: 'never',
|
||||
}],
|
||||
|
||||
// putting params on their own line helps stay within line length limit
|
||||
'function-paren-newline': ['error', 'consistent'],
|
||||
|
||||
// 90 characters allows three+ side-by-side screens on a standard-size monitor
|
||||
'max-len': ['error', {
|
||||
code: 90,
|
||||
ignoreUrls: true,
|
||||
}],
|
||||
|
||||
// it helps readability to put public API at top,
|
||||
'no-use-before-define': 'off',
|
||||
|
||||
// useful for unused or internal fields
|
||||
'no-underscore-dangle': 'off',
|
||||
|
||||
// though we have a logger, we still remap console to log to disk
|
||||
'no-console': 'off',
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue