Merge pull request #362 from sharelatex/as-linting

Linting new ES code
This commit is contained in:
Alasdair Smith 2018-02-27 11:06:11 +00:00 committed by GitHub
commit 864bf771a4
8 changed files with 752 additions and 15 deletions

View file

@ -0,0 +1,8 @@
app/js
modules
public/js
public/minjs
test/**/js
app.js
webpack.config.*
karma.conf.js

3
services/web/.eslintrc Normal file
View file

@ -0,0 +1,3 @@
{
"extends": ["standard"]
}

View file

@ -55,6 +55,18 @@ pipeline {
}
}
stage('Lint') {
agent {
docker {
image 'node:6.9.5'
reuseNode true
}
}
steps {
sh 'make --no-print-directory lint'
}
}
stage('Unit Test') {
agent {
docker {

View file

@ -222,6 +222,9 @@ ci:
MOCHA_ARGS="--reporter tap" \
$(MAKE) test
lint:
npm -q run lint
.PHONY:
all add install update test test_unit test_frontend test_acceptance \
test_acceptance_start_service test_acceptance_stop_service \

View file

@ -48,6 +48,12 @@
}
}
},
"acorn-jsx": {
"version": "3.0.1",
"from": "acorn-jsx@>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz",
"dev": true
},
"acorn-node": {
"version": "1.3.0",
"from": "acorn-node@>=1.2.0 <2.0.0",
@ -163,6 +169,12 @@
}
}
},
"ansi-escapes": {
"version": "3.0.0",
"from": "ansi-escapes@>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz",
"dev": true
},
"ansi-html": {
"version": "0.0.7",
"from": "ansi-html@0.0.7",
@ -325,6 +337,12 @@
"resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
"dev": true
},
"arrify": {
"version": "1.0.1",
"from": "arrify@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"dev": true
},
"asap": {
"version": "2.0.6",
"from": "asap@>=2.0.3 <2.1.0",
@ -1373,12 +1391,24 @@
"resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz",
"dev": true
},
"caller-path": {
"version": "0.1.0",
"from": "caller-path@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz",
"dev": true
},
"callsite": {
"version": "1.0.0",
"from": "callsite@1.0.0",
"resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
"dev": true
},
"callsites": {
"version": "0.2.0",
"from": "callsites@>=0.2.0 <0.3.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz",
"dev": true
},
"camelcase": {
"version": "1.2.1",
"from": "camelcase@>=1.0.2 <2.0.0",
@ -1461,6 +1491,12 @@
"from": "character-parser@1.2.0",
"resolved": "https://registry.npmjs.org/character-parser/-/character-parser-1.2.0.tgz"
},
"chardet": {
"version": "0.4.2",
"from": "chardet@>=0.4.0 <0.5.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz",
"dev": true
},
"check-error": {
"version": "1.0.2",
"from": "check-error@>=1.0.1 <2.0.0",
@ -1593,6 +1629,18 @@
"resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz",
"dev": true
},
"cli-cursor": {
"version": "2.1.0",
"from": "cli-cursor@>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
"dev": true
},
"cli-width": {
"version": "2.2.0",
"from": "cli-width@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
"dev": true
},
"cliff": {
"version": "0.1.10",
"from": "cliff@>=0.1.9 <0.2.0",
@ -1872,6 +1920,12 @@
"resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
"dev": true
},
"contains-path": {
"version": "0.1.0",
"from": "contains-path@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz",
"dev": true
},
"content-disposition": {
"version": "0.5.0",
"from": "content-disposition@0.5.0",
@ -2168,8 +2222,7 @@
"version": "0.1.3",
"from": "deep-is@>=0.1.3 <0.2.0",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
"dev": true,
"optional": true
"dev": true
},
"define-properties": {
"version": "1.1.2",
@ -2362,6 +2415,12 @@
"resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz",
"dev": true
},
"doctrine": {
"version": "2.1.0",
"from": "doctrine@>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
"dev": true
},
"doctypes": {
"version": "1.1.0",
"from": "doctypes@>=1.1.0 <2.0.0",
@ -2723,11 +2782,301 @@
"resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
"dev": true
},
"eslint": {
"version": "4.18.1",
"from": "eslint@>=4.18.1 <5.0.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-4.18.1.tgz",
"dev": true,
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
"from": "ansi-regex@^3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"dev": true
},
"ansi-styles": {
"version": "3.2.0",
"from": "ansi-styles@>=3.2.0 <4.0.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
"dev": true
},
"argparse": {
"version": "1.0.10",
"from": "argparse@>=1.0.7 <2.0.0",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"dev": true
},
"chalk": {
"version": "2.3.1",
"from": "chalk@>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz",
"dev": true
},
"concat-stream": {
"version": "1.6.0",
"from": "concat-stream@>=1.6.0 <2.0.0",
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
"dev": true
},
"debug": {
"version": "3.1.0",
"from": "debug@>=3.1.0 <4.0.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"dev": true
},
"esprima": {
"version": "4.0.0",
"from": "esprima@>=4.0.0 <5.0.0",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",
"dev": true
},
"glob": {
"version": "7.1.2",
"from": "glob@>=7.1.2 <8.0.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"dev": true
},
"globals": {
"version": "11.3.0",
"from": "globals@>=11.0.1 <12.0.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"from": "has-flag@>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"dev": true
},
"isarray": {
"version": "1.0.0",
"from": "isarray@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"dev": true
},
"js-yaml": {
"version": "3.10.0",
"from": "js-yaml@>=3.9.1 <4.0.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz",
"dev": true
},
"minimatch": {
"version": "3.0.4",
"from": "minimatch@>=3.0.2 <4.0.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"dev": true
},
"process-nextick-args": {
"version": "2.0.0",
"from": "process-nextick-args@>=2.0.0 <2.1.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
"dev": true
},
"readable-stream": {
"version": "2.3.4",
"from": "readable-stream@>=2.2.2 <3.0.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz",
"dev": true
},
"string_decoder": {
"version": "1.0.3",
"from": "string_decoder@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"dev": true
},
"strip-ansi": {
"version": "4.0.0",
"from": "strip-ansi@>=4.0.0 <5.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"dev": true
},
"supports-color": {
"version": "5.2.0",
"from": "supports-color@>=5.2.0 <6.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz",
"dev": true
}
}
},
"eslint-config-standard": {
"version": "11.0.0",
"from": "eslint-config-standard@>=11.0.0 <12.0.0",
"resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-11.0.0.tgz",
"dev": true
},
"eslint-import-resolver-node": {
"version": "0.3.2",
"from": "eslint-import-resolver-node@>=0.3.1 <0.4.0",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz",
"dev": true,
"dependencies": {
"debug": {
"version": "2.6.9",
"from": "debug@>=2.6.9 <3.0.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"dev": true
}
}
},
"eslint-loader": {
"version": "1.9.0",
"from": "eslint-loader@>=1.9.0 <2.0.0",
"resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-1.9.0.tgz",
"dev": true,
"dependencies": {
"glob": {
"version": "7.1.2",
"from": "glob@^7.0.5",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"dev": true
},
"minimatch": {
"version": "3.0.4",
"from": "minimatch@^3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"dev": true
},
"rimraf": {
"version": "2.6.2",
"from": "rimraf@^2.6.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
"dev": true
}
}
},
"eslint-module-utils": {
"version": "2.1.1",
"from": "eslint-module-utils@>=2.1.1 <3.0.0",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz",
"dev": true,
"dependencies": {
"debug": {
"version": "2.6.9",
"from": "debug@>=2.6.8 <3.0.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"dev": true
},
"find-up": {
"version": "1.1.2",
"from": "find-up@^1.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"dev": true
},
"path-exists": {
"version": "2.1.0",
"from": "path-exists@^2.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"dev": true
},
"pkg-dir": {
"version": "1.0.0",
"from": "pkg-dir@^1.0.0",
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz",
"dev": true
}
}
},
"eslint-plugin-import": {
"version": "2.9.0",
"from": "eslint-plugin-import@>=2.9.0 <3.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.9.0.tgz",
"dev": true,
"dependencies": {
"debug": {
"version": "2.6.9",
"from": "debug@>=2.6.8 <3.0.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"dev": true
},
"doctrine": {
"version": "1.5.0",
"from": "doctrine@1.5.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
"dev": true
},
"isarray": {
"version": "1.0.0",
"from": "isarray@^1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"dev": true
},
"minimatch": {
"version": "3.0.4",
"from": "minimatch@^3.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"dev": true
}
}
},
"eslint-plugin-node": {
"version": "6.0.1",
"from": "eslint-plugin-node@>=6.0.0 <7.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz",
"dev": true,
"dependencies": {
"minimatch": {
"version": "3.0.4",
"from": "minimatch@^3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"dev": true
},
"semver": {
"version": "5.5.0",
"from": "semver@>=5.4.1 <6.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
"dev": true
}
}
},
"eslint-plugin-promise": {
"version": "3.6.0",
"from": "eslint-plugin-promise@>=3.6.0 <4.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.6.0.tgz",
"dev": true
},
"eslint-plugin-standard": {
"version": "3.0.1",
"from": "eslint-plugin-standard@>=3.0.1 <4.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz",
"dev": true
},
"eslint-scope": {
"version": "3.7.1",
"from": "eslint-scope@>=3.7.1 <4.0.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
"dev": true
},
"eslint-visitor-keys": {
"version": "1.0.0",
"from": "eslint-visitor-keys@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
"dev": true
},
"espree": {
"version": "3.5.3",
"from": "espree@>=3.5.2 <4.0.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-3.5.3.tgz",
"dev": true,
"dependencies": {
"acorn": {
"version": "5.4.1",
"from": "acorn@>=5.4.0 <6.0.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz",
"dev": true
}
}
},
"esprima": {
"version": "1.0.4",
"from": "esprima@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz"
},
"esquery": {
"version": "1.0.0",
"from": "esquery@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz",
"dev": true
},
"esrecurse": {
"version": "4.2.0",
"from": "esrecurse@>=4.1.0 <5.0.0",
@ -3031,6 +3380,20 @@
"from": "extendible@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/extendible/-/extendible-0.1.1.tgz"
},
"external-editor": {
"version": "2.1.0",
"from": "external-editor@>=2.0.4 <3.0.0",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz",
"dev": true,
"dependencies": {
"iconv-lite": {
"version": "0.4.19",
"from": "iconv-lite@>=0.4.17 <0.5.0",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
"dev": true
}
}
},
"extglob": {
"version": "2.0.4",
"from": "extglob@>=2.0.2 <3.0.0",
@ -3067,8 +3430,7 @@
"version": "2.0.6",
"from": "fast-levenshtein@>=2.0.4 <2.1.0",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"dev": true,
"optional": true
"dev": true
},
"faye-websocket": {
"version": "0.10.0",
@ -3081,6 +3443,18 @@
"from": "fd-slicer@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz"
},
"figures": {
"version": "2.0.0",
"from": "figures@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
"dev": true
},
"file-entry-cache": {
"version": "2.0.0",
"from": "file-entry-cache@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz",
"dev": true
},
"file-uri-to-path": {
"version": "1.0.0",
"from": "file-uri-to-path@>=1.0.0 <2.0.0",
@ -3153,6 +3527,56 @@
}
}
},
"flat-cache": {
"version": "1.3.0",
"from": "flat-cache@>=1.2.1 <2.0.0",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz",
"dev": true,
"dependencies": {
"circular-json": {
"version": "0.3.3",
"from": "circular-json@>=0.3.1 <0.4.0",
"resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz",
"dev": true
},
"del": {
"version": "2.2.2",
"from": "del@>=2.0.2 <3.0.0",
"resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
"dev": true
},
"glob": {
"version": "7.1.2",
"from": "glob@^7.0.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"dev": true
},
"globby": {
"version": "5.0.0",
"from": "globby@>=5.0.0 <6.0.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
"dev": true
},
"minimatch": {
"version": "3.0.4",
"from": "minimatch@^3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"dev": true
},
"pify": {
"version": "2.3.0",
"from": "pify@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"dev": true
},
"rimraf": {
"version": "2.6.2",
"from": "rimraf@>=2.2.8 <3.0.0",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
"dev": true
}
}
},
"flatiron": {
"version": "0.4.3",
"from": "flatiron@>=0.4.2 <0.5.0",
@ -4097,6 +4521,12 @@
"from": "function-bind@>=1.0.2 <2.0.0",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
},
"functional-red-black-tree": {
"version": "1.0.1",
"from": "functional-red-black-tree@>=1.0.1 <2.0.0",
"resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
"dev": true
},
"gauge": {
"version": "2.7.4",
"from": "gauge@>=2.7.3 <2.8.0",
@ -5152,6 +5582,12 @@
"from": "ienoopen@1.0.0",
"resolved": "https://registry.npmjs.org/ienoopen/-/ienoopen-1.0.0.tgz"
},
"ignore": {
"version": "3.3.7",
"from": "ignore@>=3.3.3 <4.0.0",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz",
"dev": true
},
"ignore-by-default": {
"version": "1.0.1",
"from": "ignore-by-default@>=1.0.1 <2.0.0",
@ -5229,6 +5665,62 @@
}
}
},
"inquirer": {
"version": "3.3.0",
"from": "inquirer@>=3.0.6 <4.0.0",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz",
"dev": true,
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
"from": "ansi-regex@>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"dev": true
},
"ansi-styles": {
"version": "3.2.0",
"from": "ansi-styles@^3.2.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
"dev": true
},
"chalk": {
"version": "2.3.1",
"from": "chalk@^2.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"from": "has-flag@^3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"dev": true
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"from": "is-fullwidth-code-point@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"dev": true
},
"string-width": {
"version": "2.1.1",
"from": "string-width@>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"dev": true
},
"strip-ansi": {
"version": "4.0.0",
"from": "strip-ansi@^4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"dev": true
},
"supports-color": {
"version": "5.2.0",
"from": "supports-color@^5.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz",
"dev": true
}
}
},
"insert-module-globals": {
"version": "7.0.1",
"from": "insert-module-globals@>=7.0.0 <8.0.0",
@ -5526,6 +6018,12 @@
"from": "is-regex@>=1.0.3 <2.0.0",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz"
},
"is-resolvable": {
"version": "1.1.0",
"from": "is-resolvable@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
"dev": true
},
"is-retry-allowed": {
"version": "1.1.0",
"from": "is-retry-allowed@>=1.0.0 <2.0.0",
@ -5660,6 +6158,12 @@
"from": "json-stable-stringify@>=1.0.1 <2.0.0",
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz"
},
"json-stable-stringify-without-jsonify": {
"version": "1.0.1",
"from": "json-stable-stringify-without-jsonify@>=1.0.1 <2.0.0",
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
"dev": true
},
"json-stringify-safe": {
"version": "5.0.1",
"from": "json-stringify-safe@>=5.0.1 <5.1.0",
@ -6322,8 +6826,7 @@
"version": "0.3.0",
"from": "levn@>=0.3.0 <0.4.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
"dev": true,
"optional": true
"dev": true
},
"lexical-scope": {
"version": "1.2.0",
@ -6373,6 +6876,38 @@
}
}
},
"loader-fs-cache": {
"version": "1.0.1",
"from": "loader-fs-cache@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/loader-fs-cache/-/loader-fs-cache-1.0.1.tgz",
"dev": true,
"dependencies": {
"find-cache-dir": {
"version": "0.1.1",
"from": "find-cache-dir@>=0.1.1 <0.2.0",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz",
"dev": true
},
"find-up": {
"version": "1.1.2",
"from": "find-up@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"dev": true
},
"path-exists": {
"version": "2.1.0",
"from": "path-exists@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"dev": true
},
"pkg-dir": {
"version": "1.0.0",
"from": "pkg-dir@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz",
"dev": true
}
}
},
"loader-runner": {
"version": "2.3.0",
"from": "loader-runner@>=2.3.0 <3.0.0",
@ -7769,6 +8304,12 @@
}
}
},
"natural-compare": {
"version": "1.4.0",
"from": "natural-compare@>=1.4.0 <2.0.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
"dev": true
},
"nconf": {
"version": "0.6.9",
"from": "nconf@>=0.6.9 <0.7.0",
@ -8127,6 +8668,12 @@
}
}
},
"object-hash": {
"version": "1.2.0",
"from": "object-hash@>=1.1.4 <2.0.0",
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.2.0.tgz",
"dev": true
},
"object-keys": {
"version": "1.0.11",
"from": "object-keys@>=1.0.8 <2.0.0",
@ -8325,6 +8872,12 @@
}
}
},
"onetime": {
"version": "2.0.1",
"from": "onetime@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
"dev": true
},
"opn": {
"version": "5.2.0",
"from": "opn@>=5.1.0 <6.0.0",
@ -8341,14 +8894,12 @@
"from": "optionator@>=0.8.1 <0.9.0",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
"dev": true,
"optional": true,
"dependencies": {
"wordwrap": {
"version": "1.0.0",
"from": "wordwrap@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
"dev": true,
"optional": true
"dev": true
}
}
},
@ -8747,6 +9298,12 @@
"from": "platform@1.3.5",
"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.5.tgz"
},
"pluralize": {
"version": "7.0.0",
"from": "pluralize@>=7.0.0 <8.0.0",
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz",
"dev": true
},
"pooling": {
"version": "0.4.6",
"from": "pooling@0.4.6",
@ -8850,6 +9407,12 @@
"from": "process-nextick-args@>=1.0.6 <1.1.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz"
},
"progress": {
"version": "2.0.0",
"from": "progress@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz",
"dev": true
},
"promise": {
"version": "2.0.0",
"from": "promise@>=2.0.0 <2.1.0",
@ -9454,6 +10017,20 @@
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
"dev": true
},
"require-uncached": {
"version": "1.0.3",
"from": "require-uncached@>=1.0.3 <2.0.0",
"resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz",
"dev": true,
"dependencies": {
"resolve-from": {
"version": "1.0.1",
"from": "resolve-from@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz",
"dev": true
}
}
},
"requirejs": {
"version": "2.1.22",
"from": "https://registry.npmjs.org/requirejs/-/requirejs-2.1.22.tgz",
@ -9495,6 +10072,12 @@
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
"dev": true
},
"restore-cursor": {
"version": "2.0.0",
"from": "restore-cursor@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
"dev": true
},
"retry-as-promised": {
"version": "2.3.2",
"from": "retry-as-promised@>=2.0.0 <3.0.0",
@ -9544,6 +10127,32 @@
"from": "git+https://github.com/ShaneKilkelly/rolling-rate-limiter.git#master",
"resolved": "git+https://github.com/ShaneKilkelly/rolling-rate-limiter.git#8a1a2cd8aaf9cd1a75cc81317b7f261157be2149"
},
"run-async": {
"version": "2.3.0",
"from": "run-async@>=2.2.0 <3.0.0",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
"dev": true,
"dependencies": {
"is-promise": {
"version": "2.1.0",
"from": "is-promise@>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
"dev": true
}
}
},
"rx-lite": {
"version": "4.0.8",
"from": "rx-lite@>=4.0.8 <5.0.0",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
"dev": true
},
"rx-lite-aggregates": {
"version": "4.0.8",
"from": "rx-lite-aggregates@>=4.0.8 <5.0.0",
"resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz",
"dev": true
},
"safe-buffer": {
"version": "5.1.1",
"from": "safe-buffer@>=5.1.1 <5.2.0",
@ -9931,6 +10540,20 @@
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
"dev": true
},
"slice-ansi": {
"version": "1.0.0",
"from": "slice-ansi@1.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz",
"dev": true,
"dependencies": {
"is-fullwidth-code-point": {
"version": "2.0.0",
"from": "is-fullwidth-code-point@^2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"dev": true
}
}
},
"sliced": {
"version": "1.0.1",
"from": "sliced@1.0.1",
@ -10254,6 +10877,12 @@
}
}
},
"sprintf-js": {
"version": "1.0.3",
"from": "sprintf-js@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"dev": true
},
"srcset": {
"version": "1.0.0",
"from": "srcset@>=1.0.0 <2.0.0",
@ -10568,6 +11197,62 @@
"resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz",
"dev": true
},
"table": {
"version": "4.0.2",
"from": "table@>=4.0.1 <5.0.0",
"resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz",
"dev": true,
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
"from": "ansi-regex@^3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"dev": true
},
"ansi-styles": {
"version": "3.2.0",
"from": "ansi-styles@^3.2.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
"dev": true
},
"chalk": {
"version": "2.3.1",
"from": "chalk@^2.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"from": "has-flag@^3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"dev": true
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"from": "is-fullwidth-code-point@^2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"dev": true
},
"string-width": {
"version": "2.1.1",
"from": "string-width@^2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"dev": true
},
"strip-ansi": {
"version": "4.0.0",
"from": "strip-ansi@^4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"dev": true
},
"supports-color": {
"version": "5.2.0",
"from": "supports-color@^5.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz",
"dev": true
}
}
},
"tapable": {
"version": "0.2.8",
"from": "tapable@>=0.2.7 <0.3.0",
@ -10652,6 +11337,12 @@
"from": "text-encoding@>=0.6.4 <0.7.0",
"resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz"
},
"text-table": {
"version": "0.2.0",
"from": "text-table@>=0.2.0 <0.3.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
"dev": true
},
"through": {
"version": "2.3.8",
"from": "through@>=2.3.1 <2.4.0",
@ -12224,6 +12915,12 @@
"from": "wrappy@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
},
"write": {
"version": "0.2.1",
"from": "write@>=0.2.1 <0.3.0",
"resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz",
"dev": true
},
"write-file-atomic": {
"version": "2.3.0",
"from": "write-file-atomic@>=2.0.0 <3.0.0",

View file

@ -20,7 +20,8 @@
"start": "npm -q run compile && node $NODE_APP_OPTIONS app.js",
"nodemon": "nodemon --config nodemon.json",
"nodemon:frontend": "nodemon --config nodemon.frontend.json",
"webpack": "webpack-dev-server --config webpack.config.dev.js"
"webpack": "webpack-dev-server --config webpack.config.dev.js",
"lint": "eslint -f unix ."
},
"dependencies": {
"archiver": "0.9.0",
@ -98,6 +99,13 @@
"clean-css": "^3.4.18",
"coffee-script": "^1.7.1",
"es6-promise": "^4.0.5",
"eslint": "^4.18.1",
"eslint-config-standard": "^11.0.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-node": "^6.0.0",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"grunt": "0.4.5",
"grunt-available-tasks": "0.4.1",
"grunt-bunyan": "0.5.0",

View file

@ -1,10 +1,10 @@
import CodeMirror, { Doc } from 'codemirror'
export function init(rootEl) {
export function init (rootEl) {
return CodeMirror(rootEl)
}
export function openDoc(cm, content) {
export function openDoc (cm, content) {
const newDoc = Doc(content)
cm.swapDoc(newDoc)
return newDoc

View file

@ -31,10 +31,16 @@ module.exports = {
// Define how file types are handled by webpack
module: {
rules: [{
// Pass application JS files through babel-loader, compiling to ES5
test: /\.js$/, // Only compile .js files
// Ensure eslint is run before compilation with babel
enforce: 'pre',
test: /\.js$/,
// Only compile application files (dependencies are in ES5 already)
exclude: /node_modules/,
loader: 'eslint-loader'
}, {
// Pass application JS files through babel-loader, compiling to ES5
test: /\.js$/,
// Only compile application files (dependencies are in ES5 already)
// include: [path.join(__dirname, './public/frontend')],
exclude: /node_modules/,
use: [{
loader: 'babel-loader',