Skip to content

Commit

Permalink
linter config updated (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
peersky authored Nov 19, 2024
1 parent a890c2c commit 8e4ec30
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-bulldogs-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@peeramid-labs/eds": patch
---

updated linter config
11 changes: 8 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import prettier from "eslint-plugin-prettier";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -16,16 +17,18 @@ const compat = new FlatCompat({

export default [
{
ignores: ["docs/templates/", "**/node_modules/"],
ignores: ["deployments/", "coverage/**", "docs/templates/", "**/node_modules/"],
},
...compat.extends(
"eslint:recommended",
"plugin:promise/recommended",
"prettier"
"plugin:prettier/recommended", // Add Prettier recommended config
"prettier",
),
{
plugins: {
promise,
prettier, // Add Prettier plugin
},
languageOptions: {
globals: {
Expand All @@ -40,7 +43,9 @@ export default [
parser: tsParser,
},
rules: {
"no-unused-vars": "off",
"no-unused-vars": "warn",
"prettier/prettier": "error", // Add Prettier as an ESLint rule
},
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
},
];
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
],
"description": "Generalized factory implementation for reproducible ethereum smart contract instantiation",
"scripts": {
"lint:fix": "eslint --fix --no-ignore && pnpm run lint:sol:fix",
"lint:fix": "eslint --fix && pnpm run lint:sol:fix",
"lint": "eslint && pnpm run lint:sol",
"test": "export NODE_ENV=TEST && pnpm hardhat test",
"test:parallel": "export NODE_ENV=TEST && pnpm hardhat test --parallel",
"build": "pnpm hardhat compile",
"lint:sol": "prettier --loglevel warn --ignore-path .prettierignore '{src,test}/**/*.sol' --check && solhint '{contracts,test}/**/*.sol'",
"lint:sol:fix": "prettier --loglevel warn --ignore-path .prettierignore '{src,test}/**/*.sol' --write",
"version": "pnpm build && changeset version",
"release": "pnpm build && changeset publish"
"release": "pnpm lint:fix && pnpm build && changeset publish"
},
"keywords": [],
"author": "Tim Pechersky (@Peersky)",
Expand All @@ -46,7 +46,9 @@
"chai": "^4.3.6",
"crypto-js": "^4.1.1",
"eslint": "^9.9.1",
"prettier": "^3.3.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-promise": "^7.1.0",
"eth-create2-calculator": "^1.1.5",
"ethers": "^5.6.6",
Expand Down
70 changes: 67 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8e4ec30

Please sign in to comment.