Commit af0b211d authored by Daniel Perez's avatar Daniel Perez
Browse files

Merge branch 'slb/dperez50/add-lint-check' into 'master'

ci: add lint check

See merge request !134
parents a0348c1b ccf5fc91
Pipeline #50000 passed with stages
in 8 minutes and 57 seconds
......@@ -48,8 +48,11 @@ include:
file: "build/seismic-store-service.yml"
# scan
#fossa
- project: "osdu/platform/ci-cd-pipelines"
file: "scanners/fossa-node.yml"
#lint
- local: "/devops/osdu/scanners/lint-node.yml"
# containerize
- project: "osdu/platform/ci-cd-pipelines"
......
lint:
image: node
tags: ["osdu-small"]
stage: scan
needs: ['compile-and-unit-test']
script:
- npm install -g typescript
- npm install -g tslint
- npm run lint
\ No newline at end of file
......@@ -8,7 +8,7 @@
"clean": "rm -rf dist coverage test-results.xml .nyc_output",
"clean:npm": "npx rimraf ./node_modules",
"build": "tsc",
"lint": "tslint -c tslint.json 'src/**/*.ts'",
"lint": "tslint -c tslint.json -p tsconfig.json 'src/**/*.ts'",
"start": "node -r dotenv/config ./dist/server/server-start.js",
"start:redis": "nohup redis-server > /tmp/redis.log 2>&1 &",
"setup:dev": "(nohup redis-server > /tmp/redis.log 2>&1 &) && (npm i)",
......
......@@ -104,7 +104,8 @@ export class Cos extends AbstractStorage {
const objectKey = items[i].Key;
logger.info('Object to be deleted. objectKey-');
logger.debug(objectKey);
self.deleteObject(bucketName, objectKey);
// tslint:disable-next-line: no-floating-promises no-console
self.deleteObject(bucketName, objectKey).catch((error)=>{ console.log('error')})
}
});
logger.info('Returning from Cos.deleteFiles.');
......
......@@ -218,7 +218,7 @@ export class SubProjectHandler {
// get the subproject metadata
const subproject = await SubProjectDAO.get(journalClient, tenant.name, req.params.subprojectid);
//Only tenant admins are allowed to delete the subproject
// Only tenant admins are allowed to delete the subproject
if (FeatureFlags.isEnabled(Feature.AUTHORIZATION)) {
await Auth.isUserAuthorized(
req.headers.authorization, [AuthGroups.datalakeUserAdminGroupEmail(tenant.esd)],
......
......@@ -181,7 +181,8 @@ export class UtilityHandler {
private static validateEntitlements(el: IDESEntitlementGroupModel): boolean {
return ((el.name.startsWith(Config.SERVICEGROUPS_PREFIX) || el.name.startsWith(Config.DATAGROUPS_PREFIX)) &&
(el.name.endsWith(AuthRoles.admin) || el.name.endsWith(AuthRoles.editor) || el.name.endsWith(AuthRoles.viewer)));
(el.name.endsWith(AuthRoles.admin) || el.name.endsWith(AuthRoles.editor) ||
el.name.endsWith(AuthRoles.viewer)));
}
// copy datasets (same tenancy required)
private static async cp(req: expRequest) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment