Skip to content

Commit

Permalink
chore: update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
cedoor committed Feb 20, 2024
1 parent 4ccd0c7 commit 99af547
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 82 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"env": {
"es6": true
},
"extends": ["airbnb-base", "airbnb-typescript/base", "prettier"],
"extends": ["airbnb-base", "airbnb-typescript/base", "plugin:jest/recommended", "plugin:jest/style", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"project": ["./tsconfig.json", "./packages/**/tsconfig.json"]
},
"plugins": ["@typescript-eslint"],
"plugins": ["@typescript-eslint", "jest"],
"rules": {
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
"no-restricted-syntax": "off",
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,17 @@
"@types/jest": "^29.5.12",
"@types/node": "^17.0.9",
"@types/rimraf": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"benny": "^3.7.1",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.2.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.2",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
"jest-config": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/poseidon-cipher/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("Poseidon Cipher", () => {
it("Should encrypt a ciphertext given a key and a nonce", () => {
const cipherText = poseidonEncrypt(plainText, encryptionKey, nonce)
expect(cipherText).toBeDefined()
expect(cipherText.length).toBe(4)
expect(cipherText).toHaveLength(4)
})
})

Expand Down
2 changes: 1 addition & 1 deletion packages/poseidon-cipher/tests/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe("utils", () => {
expect(unstringifyBigInts({ a: "1", b: "2" })).toStrictEqual({ a: BigInt(1), b: BigInt(2) })
})
it("should work on a null input", () => {
expect(unstringifyBigInts(null)).toBe(null)
expect(unstringifyBigInts(null)).toBeNull()
})
it("should return the input if it is not a valid value", () => {
expect(unstringifyBigInts("A")).toBe("A")
Expand Down
2 changes: 1 addition & 1 deletion packages/smt/tests/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("Utility functions", () => {
it("Should return -1 if there are not non-zero elements", () => {
const index = getIndexOfLastNonZeroElement(["0", "0", "0", "0"])

expect(index).toEqual(-1)
expect(index).toBe(-1)
})
})

Expand Down
Loading

0 comments on commit 99af547

Please sign in to comment.