Skip to content

Commit

Permalink
lint: Add eqeqeq smart validation and fix ==
Browse files Browse the repository at this point in the history
This adds a linter for smart validation of === vs ==.  The linter was
verified to fail the comparison in this commit and then verified it
passes after the change from == to ===.
  • Loading branch information
nddeluca committed Sep 6, 2024
1 parent 82308d2 commit fee179b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tests/e2e-evm/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
{
rules: {
eqeqeq: ["error", "smart"],
},
},
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e-evm/test/extensions/viem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const kavalocalnet: Chain = defineChain({

// getChainConfig returns the kvtoollocalnet Chain if the hardhat environment kvtool network is set, else undefined
function getChainConfig(hre: HardhatRuntimeEnvironment): { chain?: Chain } {
if (hre.network.name == "kvtool") {
if (hre.network.name === "kvtool") {
return { chain: kavalocalnet };
}

Expand Down

0 comments on commit fee179b

Please sign in to comment.