Skip to content

Commit

Permalink
Clean slate for open source
Browse files Browse the repository at this point in the history
  • Loading branch information
zencephalon committed Sep 19, 2023
0 parents commit 2872ecb
Show file tree
Hide file tree
Showing 886 changed files with 72,743 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
firefox esr
ios>=11
last 1 safari version
last 2 chrome versions
last 2 edge versions
last 2 firefox versions
last 2 opera versions
21 changes: 21 additions & 0 deletions .codeflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
secure:
required_reviews: 1
requires_mfa: true
requires_verified: true
upstream_repository: base-org/web

build:
engines:
- BaldurECR:
name: web
path: ./apps/web/Dockerfile
- BaldurECR:
name: docs
path: ./apps/base-docs/Dockerfile
- BaldurECR:
name: bridge
path: ./apps/bridge/Dockerfile
- BaldurECR:
name: goerli-bridge
path: ./apps/bridge/Dockerfile
1 change: 1 addition & 0 deletions .copilotignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
19 changes: 19 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
*.d.ts
*.json
*.md
**/persisted_queries.json
dist/
node_modules/
OWNERS

# Nx/Builds
.docusaurus
.next
.nx
**/cjs/
**/dts/
**/esm/
**/lib/
**/mjs/
**/out/
**/templates/
141 changes: 141 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
module.exports = {
root: true,
reportUnusedDisableDirectives: true,
overrides: [
// Docusaurus, Storybook
{
files: [
'apps/*-docs/**/*',
'apps/*-storybook/**/*',
'examples/docusaurus/**/*',
'examples/storybook/**/*',
],
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
],
parserOptions: {
parser: "@typescript-eslint/parser",
project: "./tsconfig.json",
},
plugins: ['react-perf', 'relay', '@typescript-eslint'],
extends: [
'airbnb-typescript/base',
'airbnb/rules/react',
'airbnb/rules/react-a11y',
'plugin:relay/strict',
],
rules: {
'react/destructuring-assignment': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx', '.mdx'] }],

// We utilize prop spreading
'react/jsx-props-no-spreading': 'off',

// We utilize class properties
'react/state-in-constructor': 'off',

// Dont use prop types since were using TypeScript
'react/default-props-match-prop-types': 'off',
'react/forbid-foreign-prop-types': 'off',
'react/forbid-prop-types': 'off',
'react/no-unused-prop-types': 'off',
'react/prefer-read-only-props': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/sort-prop-types': 'off',

// Performance: Avoid unnecessary renders
'react-perf/jsx-no-new-array-as-prop': 'warn',
'react-perf/jsx-no-new-function-as-prop': 'warn',
'react-perf/jsx-no-new-object-as-prop': ['warn', { nativeAllowList: ['style'] }],

// We prefer function declarations
'react/function-component-definition': [
'error',
{ namedComponents: 'function-declaration', unnamedComponents: 'function-expression' },
],

// We prefer on/handle named events
'react/jsx-handler-names': 'error',

// We require named functions for inferred `displayName`
// This is required for memo() and forwardRef() usage
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],

'react/jsx-one-expression-per-line': 'off',

// We dont use flow
'relay/generated-flow-types': 'off',

// Shorthand types
'@typescript-eslint/array-type': ['error', { default: 'array' }],
'@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/method-signature-style': ['error', 'property'],
'@typescript-eslint/no-inferrable-types': 'error',

// Forbid types
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/no-explicit-any': ['error', { fixToUnknown: true }],
'@typescript-eslint/no-invalid-void-type': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-return': 'error',

// Readability
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: false }],
'@typescript-eslint/no-parameter-properties': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',

// Correctness
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-literal-enum-member': 'error',
'@typescript-eslint/restrict-plus-operands': ['error', { checkCompoundAssignments: true }],
'@typescript-eslint/unified-signatures': 'error',

// Assertions
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/prefer-as-const': 'error',

// Comments
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-expect-error': 'allow-with-description' }],
'@typescript-eslint/prefer-ts-expect-error': 'error',
'@typescript-eslint/triple-slash-reference': [
'error',
{ path: 'never', types: 'never', lib: 'never' },
],

// Async
'no-void': 'off',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/promise-function-async': 'error',

// APIs
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',

// Hard to migrate
// Errors for all try/catch blocks and any types from third-parties
'@typescript-eslint/no-unsafe-member-access': 'off',

}
}
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### AUTOGENERATED FILE
### Run `yarn codeowners` to update
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Bug report
description: Create a report to help us improve
title: "Bug: "
labels: ["type: bug"]

body:
- type: input
id: description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
placeholder: Tell us what you see!
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional info
description: If applicable, include links to screenshots or error logs

- type: textarea
id: environment
attributes:
label: Environment
description: Please fill in details for bugs reported in your environment
placeholder: |
- OS: [e.g. Fedora]
- Version [e.g. 37]
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
blank_issues_enabled: false
contact_links:
- name: Base Discord
url: https://base.org/discord
about: The official Base Discord community.

37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Feature request
description: Suggest an idea for this project
title: "Feature Request: "
labels: ["type: enhancement"]

body:
- type: markdown
attributes:
value: |
This issue form is for feature requests only!
If you've found a bug, please use [bug_report](/new?template=bug_report.yml)
- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: Describe any alternative solutions or features you've considered.

- type: textarea
id: other
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.

7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**What changed? Why?**


**Notes to reviewers**


**How has it been tested?**
69 changes: 69 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Node stuff
node_modules
yarn-debug.log*
yarn-error.log*

# OS ignores
.DS_Store

# Xcode
**/ios/build/
**/ios/derived_data/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
*.xcworkspace
Pods/

# Android/IntelliJ
**/android/build/
**/android/app/build/
.idea
.gradle
local.properties
*.iml
*.hprof

# Nx/Builds
.docusaurus
.next
.nx
cjs/
dts/
esm/
lib/
mjs/
out/
*.tsbuildinfo

# Yarn
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*

# Env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# GraphQL
schema.graphql
persisted_queries.json
**/*.graphql.ts
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.16
Loading

0 comments on commit 2872ecb

Please sign in to comment.