Skip to content

Commit

Permalink
♻️ Use eslint Flat Configuration File eslint.config.js
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Marco Caversaccio <[email protected]>
  • Loading branch information
pcaversaccio committed Feb 15, 2024
1 parent 13908a5 commit 4041077
Show file tree
Hide file tree
Showing 7 changed files with 411 additions and 534 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .eslintrc.js

This file was deleted.

38 changes: 38 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const eslintConfigPrettier = require("eslint-config-prettier");
/* eslint-enable @typescript-eslint/no-var-requires */

module.exports = tseslint.config(
{
files: ["**/*.{js,ts}"],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
eslintConfigPrettier,
],
plugins: {
"@typescript-eslint": tseslint.plugin,
},
languageOptions: {
ecmaVersion: "latest",
parser: tseslint.parser,
parserOptions: {
project: true,
},
},
},
{
ignores: [
"node_modules/**",
"cache/**",
"cache-zk/**",
"artifacts/**",
"artifacts-zk/**",
"typechain-types/**",
"coverage/**",
],
},
);
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const config: HardhatUserConfig = {
},
},
zksolc: {
version: "1.3.22",
version: "1.3.23",
compilerSource: "binary",
settings: {
isSystem: false,
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,16 @@
"prettier:fix": "npx prettier -w \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
"solhint:check": "npx solhint \"contracts/**/*.sol\"",
"solhint:fix": "npx solhint \"contracts/**/*.sol\" --fix",
"lint:check": "pnpm run prettier:check && pnpm run solhint:check && npx eslint \"**/*.{js,ts}\"",
"lint:fix": "pnpm run prettier:fix && pnpm run solhint:fix && npx eslint \"**/*.{js,ts}\" --fix"
"lint:check": "pnpm run prettier:check && pnpm run solhint:check && npx eslint .",
"lint:fix": "pnpm run prettier:fix && pnpm run solhint:fix && npx eslint . --fix"
},
"devDependencies": {
"@eslint/js": "^8.56.0",
"@matterlabs/hardhat-zksync-deploy": "^1.1.2",
"@matterlabs/hardhat-zksync-ethers": "1.0.0",
"@matterlabs/hardhat-zksync-solc": "^1.1.2",
"@matterlabs/hardhat-zksync-verify": "^1.3.0",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.4",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.5",
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-network-helpers": "^1.0.10",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
Expand All @@ -118,15 +119,13 @@
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.17",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@types/node": "^20.11.18",
"chai": "^4.4.1",
"dotenv": "^16.4.2",
"dotenv": "^16.4.4",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"ethers": "^6.11.0",
"hardhat": "^2.19.5",
"ethers": "^6.11.1",
"hardhat": "^2.20.0",
"hardhat-abi-exporter": "^2.10.1",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-gas-reporter": "^1.0.10",
Expand All @@ -137,6 +136,7 @@
"ts-node": "^10.9.2",
"typechain": "^8.3.2",
"typescript": "^5.3.3",
"typescript-eslint": "^7.0.1",
"zksync-ethers": "^6.3.0"
}
}
Loading

0 comments on commit 4041077

Please sign in to comment.