Skip to content

Commit

Permalink
style: eslint stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
awlayton committed May 10, 2024
1 parent f12a6f7 commit 061ad1c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
22 changes: 12 additions & 10 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ extends:
- plugin:github/recommended
- plugin:promise/recommended
- plugin:regexp/recommended
- plugin:array-func/recommended
#- plugin:array-func/recommended
- plugin:optimize-regex/recommended
- plugin:import/recommended
- plugin:unicorn/recommended
- plugin:security/recommended
- plugin:sonarjs/recommended
#- plugin:security/recommended
#- plugin:sonarjs/recommended
- plugin:ava/recommended
- xo
- prettier
#- prettier

plugins:
- '@typescript-eslint'
- node
- github
- promise
- regexp
- array-func
#- array-func
- optimize-regex
- no-constructor-bind
- import
Expand All @@ -45,7 +45,7 @@ overrides:
- plugin:github/typescript
- plugin:import/typescript
- xo-typescript
- prettier
#- prettier
parserOptions:
ecmaVersion: 2020
project: './**/tsconfig*.json'
Expand Down Expand Up @@ -78,7 +78,7 @@ overrides:

{ selector: typeLike, format: [PascalCase] },
]
'@typescript-eslint/restrict-template-expressions': off
'@typescript-eslint/restrict-template-expressions': 0
'@typescript-eslint/no-shadow': warn
'@typescript-eslint/no-unused-vars':
[
Expand Down Expand Up @@ -114,7 +114,7 @@ rules:
*/
onNonMatchingHeader: append
nonMatchingTolerance: 0.7
sonarjs/no-duplicate-string: [warn, 5]
sonarjs/no-duplicate-string: [warn, { threshold: 5 }]
sonarjs/cognitive-complexity: warn
eslint-comments/no-unused-disable: off
import/extensions: off
Expand All @@ -125,8 +125,8 @@ rules:
i18n-text/no-en: off
eslint-comments/no-use: off
no-secrets/no-secrets: [error, { tolerance: 5 }]
no-empty-label: off
no-warning-comments: off
no-empty-label: 0
no-warning-comments: 0
node/no-missing-import: off
import/no-unresolved: off
unicorn/prefer-spread: off
Expand All @@ -137,3 +137,5 @@ rules:
ava/no-import-test-files: off
ava/no-skip-test: warn
ava/no-skip-assert: warn
# broken
prettier/prettier: off
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,25 +117,25 @@ async function ensureAllPathsExist(conn: OADAClient) {
if (cError.status !== 404) {
error(
{ error: cError },
`ensureAllPathsExist: Tried to get ${path}, but result was something other than 200 or 404`
`ensureAllPathsExist: Tried to get ${path}, but result was something other than 200 or 404`,
);
return;
}

info(
'ensureAllPathsExist: Path %s did not exist, doing tree put to create it',
path
path,
);
await conn.put({ path, data: {}, tree });
return;
}

info(
'ensureAllPathsExist: Path %s exists already, leaving as-is',
path
path,
);
}
)
},
),
);
}

Expand All @@ -147,7 +147,7 @@ await Promise.race(
fatal({ error: cError }, `Error running unfisk for token ${token}`);
throw cError as Error;
}
})
}),
);

/**
Expand Down
2 changes: 1 addition & 1 deletion test/external.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import testasn from './testasn.js';
// DO NOT include ../ because we are testing externally.

const domain = config.get('oada.domain');
const token = config.get('oada.token')[0]!;
const token = config.get('oada.token')[0];

const asnKey = 'UNFISK_TEST_ASN1';
const asnID = `resources/${asnKey}`;
Expand Down

0 comments on commit 061ad1c

Please sign in to comment.