Skip to content

Commit b3ff7df

Browse files
committed
style(eslint): minor eslint fixes throughout
Signed-off-by: Jayne Doe <[email protected]>
1 parent 7ffa488 commit b3ff7df

34 files changed

+275
-164
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
bin/
2+
config/local*
3+
data/
14
public/
25
src/gql
36
src/js/

.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
const baseConfig = require('@j4numbers/eslint-base-config');
2+
13
module.exports = {
2-
...require('@j4numbers/eslint-base-config'),
4+
...baseConfig,
35

46
env: {
57
'es6': true,

.nycrc

Lines changed: 0 additions & 22 deletions
This file was deleted.
File renamed without changes.

config/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ module.exports = {
2828
port: '8080',
2929
},
3030
jwt: {
31-
public_cert: 'test/spec/helpers/certs/localhost-cert.pem',
32-
private_key: 'test/spec/helpers/certs/localhost-privkey.pem',
31+
public_cert: 'certs/localhost-cert.pem',
32+
private_key: 'certs/localhost-privkey.pem',
3333
},
3434
nunjucks: {
3535
options: {

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ gulp.task('clean', () => gulp.src(
1818
{
1919
read: false,
2020
allowEmpty: true,
21-
}
21+
},
2222
).pipe(clean()));
2323

2424
/* --------------------------------------------------------------------- INFO */

nyc.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module.exports = {
2+
'lines': 80,
3+
'statements': 80,
4+
'functions': 80,
5+
'branches': 80,
6+
7+
'exclude': [
8+
'.stryker-tmp/',
9+
'config/**',
10+
'coverage/**',
11+
'data/**',
12+
'node_modules/**',
13+
'public/**',
14+
'reports/**',
15+
'src/javascript/**',
16+
'test/**',
17+
'**/.eslintrc.js',
18+
'gulpfile.js',
19+
'nyc.config.js',
20+
'nyc.js.config.js',
21+
'stryker.conf.js',
22+
],
23+
24+
'reporter': [
25+
'lcov',
26+
'cobertura',
27+
'text',
28+
'text-summary',
29+
],
30+
};

nyc.js.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const baseConfig = require('./nyc.config.js');
2+
3+
module.exports = {
4+
...baseConfig,
5+
_reportDir: './coverage/js',
6+
all: true,
7+
include: [
8+
'src/',
9+
],
10+
};

package-lock.json

Lines changed: 59 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"start": "node ./src/app",
1111
"start:dev": "node bin/mongo_runner.js",
1212
"build": "gulp build",
13-
"generate-certs": "openssl req -x509 -newkey rsa:2048 -days 365 -nodes -sha256 -subj '/CN=localhost' -keyout test/spec/helpers/certs/localhost-privkey.pem -out test/spec/helpers/certs/localhost-cert.pem",
13+
"generate-certs": "openssl req -x509 -newkey rsa:2048 -days 365 -nodes -sha256 -subj '/CN=localhost' -keyout certs/localhost-privkey.pem -out certs/localhost-cert.pem",
1414
"quality:eslint": "./node_modules/.bin/eslint -c .eslintrc.js .",
15-
"test": "npm run quality:eslint && npm run test:mocha",
16-
"test:mocha": "nyc --all mocha"
15+
"test": "npm run quality:eslint && npm run test:unit",
16+
"test:unit": "nyc --nycrc-path nyc.js.config.js mocha --config test/.mocharc.js --check-leaks"
1717
},
1818
"dependencies": {
1919
"bootstrap": "^5.1.3",
@@ -40,17 +40,20 @@
4040
"devDependencies": {
4141
"@babel/core": "^7.15.8",
4242
"@babel/preset-env": "^7.15.8",
43-
"@j4numbers/eslint-base-config": "^1.2.5",
43+
"@j4numbers/eslint-base-config": "^1.2.6",
4444
"chai": "^4.3.4",
4545
"chai-as-promised": "^7.1.1",
4646
"chai-http": "^4.3.0",
47-
"clear-require": "^3.0.0",
47+
"clear-module": "^4.1.1",
4848
"eslint": "^8.1.0",
49+
"eslint-plugin-mocha": "^9.0.0",
4950
"gulp": "^4.0.2",
5051
"gulp-babel": "^8.0.0",
5152
"gulp-clean": "^0.4.0",
5253
"gulp-sass": "^5.0.0",
54+
"import-fresh": "^3.3.0",
5355
"mocha": "^9.1.3",
56+
"mock-require": "^3.0.3",
5457
"mongodb-memory-server": "^7.5.1",
5558
"node-sass-tilde-importer": "^1.0.2",
5659
"nyc": "^15.1.0",

0 commit comments

Comments
 (0)