Skip to content

Commit

Permalink
feat: added standardjs custom tweaks standardx and fix no-unused-expr…
Browse files Browse the repository at this point in the history
…ession problem
  • Loading branch information
kdhttps committed Sep 16, 2020
1 parent 126a500 commit 7fe58c2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 48 deletions.
39 changes: 7 additions & 32 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,10 @@
{
"env": {
"node": true,
"commonjs": true,
"mocha" : true,
"es6" : true

},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 11
},
"env": { "mocha": true },
"plugins": [
"chai-friendly"
],
"rules": {
"indent": [
"error",
"tab"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
],
"max-len": [
"warn",
{ "code" : 80 }
]
"no-unused-expressions": 0,
"chai-friendly/no-unused-expressions": 2
}
}
}
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 3 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"start": "NODE_ENV=production node server/app.js",
"test": "NODE_ENV=test cucumber-js --exit test/features && NODE_ENV=test nyc mocha --exit --no-warnings test/*.test.js",
"dev": "NODE_ENV=development node server/app.js",
"lint": "standard",
"lint": "standardx",
"generate-coverage": "NODE_ENV=test nyc report --reporter=text-lcov > coverage.lcov",
"report-2": "NODE_ENV=test nyc mocha --report lcovonly -R spec && codecov"
},
Expand Down Expand Up @@ -70,14 +70,15 @@
"chai-http": "^4.3.0",
"codecov": "^3.7.1",
"cucumber": "^6.0.5",
"eslint-plugin-chai-friendly": "^0.6.0",
"got": "^11.6.0",
"husky": "^4.3.0",
"mocha": "^8.1.1",
"nock": "^13.0.2",
"nyc": "^15.1.0",
"rewire": "^5.0.0",
"sinon": "^9.0.2",
"standard": "^14.3.4",
"standardx": "^5.0.0",
"supertest": "^4.0.2"
},
"repository": {
Expand All @@ -90,18 +91,6 @@
"url": "https://github.com/GluuFederation/gluu-passport/issues"
},
"homepage": "https://github.com/GluuFederation/gluu-passport#readme",
"standard": {
"globals": [
"describe",
"context",
"before",
"beforeEach",
"after",
"afterEach",
"it",
"expect"
]
},
"husky": {
"hooks": {
"pre-commit": "npm run lint"
Expand Down
2 changes: 0 additions & 2 deletions test/app.init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,10 @@ describe('app.init() - Initialization', () => {
})

it('expect spTLSCert file to exist', () => {
// eslint-disable-next-line no-unused-expressions
expect(file(response.body.conf.spTLSCert)).to.exist
})

it('expect spTLSKey file to exist', () => {
// eslint-disable-next-line no-unused-expressions
expect(file(response.body.conf.spTLSKey)).to.exist
})
})
Expand Down

0 comments on commit 7fe58c2

Please sign in to comment.