Skip to content

Commit

Permalink
add spellchecker
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Sep 9, 2024
1 parent 4ded5f3 commit 0819eef
Show file tree
Hide file tree
Showing 8 changed files with 959 additions and 24 deletions.
17 changes: 16 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
const iden3Config = require('@iden3/eslint-config');
const { spellcheckerRule, cspellConfig } = require('@iden3/eslint-config/cspell');

module.exports = {
extends: ['@iden3/eslint-config']
...iden3Config,
rules: {
'@cspell/spellchecker': [
1,
{
...spellcheckerRule,
cspell: {
...cspellConfig,
ignoreWords: ['unmarshal', 'UWLEWdAWcosiLkYoL0KWwZpgEOrPPepl6T5gC']
}
}
]
}
};
945 changes: 932 additions & 13 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"test:watch": "jest --watch",
"build:types": "tsc -p tsconfig.build.json && tsc-alias",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"lint": "eslint src test --ext .ts",
"lint:fix": "eslint src test --ext .ts --fix",
"lint:fix": "eslint src test --ext .ts src/** test/*.ts",
"lint:check": "eslint --ext .ts src/** test/*.ts",
"build": "npm run clean && tsc --module commonjs -p tsconfig.build.json && tsc-alias",
"clean": "rimraf ./dist"
},
Expand Down Expand Up @@ -44,7 +44,8 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@iden3/eslint-config": "https://github.com/iden3/eslint-config",
"@cspell/eslint-plugin": "^8.14.2",
"@iden3/eslint-config": "github:iden3/eslint-config",
"@typechain/ethers-v5": "^10.2.0",
"@types/jest": "^29.5.2",
"@types/jsonld": "^1.5.13",
Expand Down
2 changes: 1 addition & 1 deletion test/atomicV3.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ describe('atomicV3', () => {
body: {
callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123',
reason: 'reason',
message: 'mesage',
message: 'message',
did_doc: {},
scope: [
{
Expand Down
2 changes: 1 addition & 1 deletion test/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ describe('auth tests', () => {
expect(instance.challenge.toString()).toEqual(
'6110517768249559238193477435454792024732173865488900270849624328650765691494'
);
// TODO(illia-korotia): why Hash type doesn't implement `toString()` method?
// TODO: why Hash type doesn't implement `toString()` method?
expect(instance.pubSignals.GISTRoot.string()).toEqual(
'1243904711429961858774220647610724273798918457991486031567244100767259239747'
);
Expand Down
4 changes: 2 additions & 2 deletions test/common.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DID } from '@iden3/js-iden3-core';
import { checkUserState } from '@lib/circuits/common';
import { mockResolverWithNoStateInContract, mockResolverWithNotLatesState } from './mocks';
import { mockResolverWithNoStateInContract, mockResolverWithNotLatestState } from './mocks';
import { Hash } from '@iden3/js-merkletree';

describe('Common', () => {
Expand All @@ -15,6 +15,6 @@ describe('Common', () => {
);
});
it('checkUserState', async () => {
await checkUserState(mockResolverWithNotLatesState, issuerID, hash);
await checkUserState(mockResolverWithNotLatestState, issuerID, hash);
});
});
2 changes: 1 addition & 1 deletion test/linked-proofs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Linked proofs verification', () => {
body: {
callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123',
reason: 'reason',
message: 'mesage',
message: 'message',
did_doc: {},
scope: [
{
Expand Down
4 changes: 2 additions & 2 deletions test/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MockResolverWithNoStateInContract implements IStateResolver {
}
}

class MockResolverWithNotLatesState implements IStateResolver {
class MockResolverWithNotLatestState implements IStateResolver {
resolve(): Promise<ResolvedState> {
const t: ResolvedState = {
latest: false,
Expand Down Expand Up @@ -85,7 +85,7 @@ export const testOpts: VerifyOpts = {
const mockStateResolver: MockResolver = new MockResolver();
export const mockResolverWithNoStateInContract: MockResolver =
new MockResolverWithNoStateInContract();
export const mockResolverWithNotLatesState: MockResolver = new MockResolverWithNotLatesState();
export const mockResolverWithNotLatestState: MockResolver = new MockResolverWithNotLatestState();
export const resolvers: Resolvers = {
'polygon:amoy': mockStateResolver,
'polygon:mumbai': mockStateResolver
Expand Down

0 comments on commit 0819eef

Please sign in to comment.