diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..4db025d --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @elijaholmos diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..2f7df98 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["elijaholmos/.github:renovate-config"], + "packageRules": [ + { + "matchPackagePatterns": ["nomic"], + "matchUpdateTypes": ["minor", "patch"], + "groupName": "Nomic dependencies" + }, + { + "matchPackagePatterns": ["ethers"], + "matchUpdateTypes": ["minor", "patch"], + "groupName": "Ethers dependencies" + }, + { + "matchPackagePatterns": ["typechain"], + "matchUpdateTypes": ["minor", "patch"], + "groupName": "Typechain dependencies" + } + ] +} diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml new file mode 100644 index 0000000..ded0999 --- /dev/null +++ b/.github/workflows/code-style.yml @@ -0,0 +1,48 @@ +name: Code Style +on: + pull_request: + branches: [master] + paths: ['**.js', '**.ts'] + +env: + # version should be in sync w package.json + ROME_VERSION: 11.0.0 + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Rome + uses: rome/setup-rome@main + with: + version: ${{ env.ROME_VERSION }} + + - name: Check Rome Version + run: rome version + + - name: Run Linter + # specific flag is required per https://github.com/rome/tools/discussions/3925#discussioncomment-4310702 + run: rome ci --formatter-enabled=false . + + format: + name: Format + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Rome + uses: rome/setup-rome@main + with: + version: ${{ env.ROME_VERSION }} + + - name: Check Rome Version + run: rome version + + - name: Run Formatter + # specific flag is required per https://github.com/rome/tools/discussions/3925#discussioncomment-4310702 + run: rome ci --linter-enabled=false . diff --git a/.github/workflows/detect-duplicate-actions.yml b/.github/workflows/detect-duplicate-actions.yml new file mode 100644 index 0000000..aad87f0 --- /dev/null +++ b/.github/workflows/detect-duplicate-actions.yml @@ -0,0 +1,24 @@ +name: detect-duplicate-actions + +on: + workflow_call: + outputs: + should_skip: + description: 'Returns "true" if the current run should be skipped' + value: ${{ jobs.detect-duplicate-actions.outputs.should_skip }} + +jobs: + detect-duplicate-actions: + name: detect-duplicate-actions + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - name: Detect Duplicate + id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]' + do_not_skip: '["workflow_dispatch", "schedule"]' + cancel_others: 'true' + concurrent_skipping: 'same_content' diff --git a/rome.json b/rome.json new file mode 100644 index 0000000..28ce7c8 --- /dev/null +++ b/rome.json @@ -0,0 +1,29 @@ +{ + "$schema": "./node_modules/rome/configuration_schema.json", + "files": { + "ignore": ["./node_modules/**/*", "./dist/**/*", "./public/**/*", "typings.ts"] + }, + "formatter": { + "indentStyle": "tab", + "indentSize": 4, + "lineWidth": 100 + }, + "javascript": { + "formatter": { + "quoteStyle": "single" + } + }, + "linter": { + "rules": { + "complexity": { + "noExtraBooleanCast": "off" + }, + "performance": { + "noDelete": "off" + }, + "suspicious": { + "noExplicitAny": "warn" + } + } + } +}