Skip to content

Commit

Permalink
Switch to Typescript (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Youngjoon Lee authored Sep 21, 2020
1 parent 1b6284f commit 8c1d12e
Show file tree
Hide file tree
Showing 76 changed files with 6,484 additions and 7,564 deletions.
14 changes: 0 additions & 14 deletions .babelrc

This file was deleted.

11 changes: 0 additions & 11 deletions .eslintrc

This file was deleted.

23 changes: 23 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-namespace': 'off',
'no-inner-declarations': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
env: {
node: true,
jest: true,
}
};
5 changes: 2 additions & 3 deletions example/did.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line import/extensions
import panaceajs from '../lib/index.js';
import panaceajs from '../dist/src/index.js';

const txBroadcastMode = 'block';
const chainId = 'testing';
Expand Down Expand Up @@ -136,7 +135,7 @@ async function main() {

const keyId = doc.verificationMethod[0].id;
const newDoc = doc;
newDoc.authentication.push(keyId); // just for testing, push the same keyId again.
newDoc.authentication.push(newDoc.authentication[0]); // just for testing, push the same authentication again
await updateDID(account, keystore, did, keyId, newDoc);
console.log(await getDID(did));

Expand Down
Empty file removed index.js
Empty file.
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
rootDir: 'test',
testRegex: '.ts$'
};
Loading

0 comments on commit 8c1d12e

Please sign in to comment.