-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
208 changed files
with
41,496 additions
and
19,932 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,107 @@ | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
|
||
const prettierConfig = fs.readFileSync(path.resolve(__dirname, "./.prettierrc"), "utf8"); | ||
const prettierOptions = JSON.parse(prettierConfig); | ||
const isProduction = process.env.NODE_ENV === "production"; | ||
|
||
module.exports = { | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["@typescript-eslint"], | ||
root: true, | ||
extends: [ | ||
"eslint:recommended", | ||
"airbnb", | ||
"prettier", | ||
"plugin:import/recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
"plugin:@typescript-eslint/recommended-type-checked", | ||
"plugin:@typescript-eslint/strict", | ||
"plugin:@typescript-eslint/strict-type-checked", | ||
"plugin:@typescript-eslint/stylistic", | ||
"plugin:@typescript-eslint/stylistic-type-checked", | ||
"plugin:import/typescript", | ||
], | ||
plugins: ["json", "prettier", "unused-imports", "import", "@typescript-eslint"], | ||
parser: "@typescript-eslint/parser", | ||
env: { | ||
node: true, | ||
mocha: true, | ||
es2022: true, | ||
}, | ||
settings: { | ||
react: { | ||
version: "999.999.999", | ||
}, | ||
"import/resolver": { | ||
typescript: {}, | ||
node: { | ||
extensions: [".ts", ".js"], | ||
moduleDirectory: ["node_modules", "ts", "src"], | ||
}, | ||
}, | ||
}, | ||
parserOptions: { | ||
project: path.resolve(__dirname, "./tsconfig.json"), | ||
sourceType: "module", | ||
typescript: true, | ||
ecmaVersion: 2022, | ||
experimentalDecorators: true, | ||
requireConfigFile: false, | ||
ecmaFeatures: { | ||
classes: true, | ||
impliedStrict: true, | ||
}, | ||
warnOnUnsupportedTypeScriptVersion: true, | ||
}, | ||
reportUnusedDisableDirectives: isProduction, | ||
rules: { | ||
"no-console": "off", | ||
"no-debugger": "off", | ||
"no-prototype-builtins": "off", | ||
"no-constant-condition": ["error", { checkLoops: false }], | ||
"no-empty": ["error", { allowEmptyCatch: true }], | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"@typescript-eslint/ban-ts-ignore": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/camelcase": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"import/no-cycle": ["error"], | ||
"unused-imports/no-unused-imports": "error", | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
devDependencies: ["**/*.test.ts"], | ||
}, | ||
], | ||
"no-debugger": isProduction ? "error" : "off", | ||
"no-console": "error", | ||
"no-underscore-dangle": "error", | ||
"no-redeclare": ["error", { builtinGlobals: true }], | ||
"import/order": [ | ||
"error", | ||
{ | ||
groups: ["external", "builtin", "internal", "type", "parent", "sibling", "index", "object"], | ||
alphabetize: { | ||
order: "asc", | ||
caseInsensitive: true, | ||
}, | ||
warnOnUnassignedImports: true, | ||
"newlines-between": "always", | ||
}, | ||
], | ||
"prettier/prettier": ["error", prettierOptions], | ||
"import/prefer-default-export": "off", | ||
"import/extensions": ["error", { json: "always" }], | ||
"class-methods-use-this": "off", | ||
"prefer-promise-reject-errors": "off", | ||
"max-classes-per-file": "off", | ||
"no-use-before-define": ["off"], | ||
"no-shadow": "off", | ||
curly: ["error", "all"], | ||
|
||
"@typescript-eslint/explicit-member-accessibility": ["error", { accessibility: "no-public" }], | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/prefer-nullish-coalescing": "off", | ||
"@typescript-eslint/no-floating-promises": "off", | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"@typescript-eslint/explicit-module-boundary-types": "error", | ||
"@typescript-eslint/no-use-before-define": ["error", { functions: false, classes: false }], | ||
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }], | ||
"@typescript-eslint/no-shadow": [ | ||
"error", | ||
{ | ||
builtinGlobals: true, | ||
allow: ["location", "event", "history", "name", "status", "Option", "test", "expect"], | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Lines starting with '#' are comments. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# More details are here: https://help.github.com/articles/about-codeowners/ | ||
|
||
# The '*' pattern is global owners. | ||
|
||
# Order is important. The last matching pattern has the most precedence. | ||
# The folders are ordered as follows: | ||
|
||
# In each subsection folders are ordered first by depth, then alphabetically. | ||
# This should make it easy to add new rules without breaking existing ones. | ||
|
||
# Global: | ||
|
||
* @ctrlc03 @kittybest @0xmad @samajammin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
target-branch: "dev" | ||
schedule: | ||
interval: "weekly" | ||
|
||
- package-ecosystem: "npm" | ||
directory: "/" | ||
versioning-strategy: increase | ||
open-pull-requests-limit: 5 | ||
target-branch: "dev" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,4 +92,5 @@ jobs: | |
run: npm run ${{ matrix.command }} | ||
|
||
- name: Stop Hardhat | ||
if: always() | ||
run: kill $(lsof -t -i:8545) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged | ||
npx lint-staged && npm run types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"**/*.{ts,js}": ["prettier --ignore-unknown --write", "eslint --fix"], | ||
"**/*.sol": ["prettier --ignore-unknown --write", "solhint --fix --noPrompt"], | ||
"*": ["prettier --ignore-unknown --write"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.