Skip to content

Commit 2872ecb

Browse files
committed
Clean slate for open source
0 parents  commit 2872ecb

File tree

886 files changed

+72743
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

886 files changed

+72743
-0
lines changed

.browserslistrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
firefox esr
2+
ios>=11
3+
last 1 safari version
4+
last 2 chrome versions
5+
last 2 edge versions
6+
last 2 firefox versions
7+
last 2 opera versions

.codeflow.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
secure:
3+
required_reviews: 1
4+
requires_mfa: true
5+
requires_verified: true
6+
upstream_repository: base-org/web
7+
8+
build:
9+
engines:
10+
- BaldurECR:
11+
name: web
12+
path: ./apps/web/Dockerfile
13+
- BaldurECR:
14+
name: docs
15+
path: ./apps/base-docs/Dockerfile
16+
- BaldurECR:
17+
name: bridge
18+
path: ./apps/bridge/Dockerfile
19+
- BaldurECR:
20+
name: goerli-bridge
21+
path: ./apps/bridge/Dockerfile

.copilotignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[*.{js,json,yml}]
8+
charset = utf-8
9+
indent_style = space
10+
indent_size = 2

.eslintignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
*.d.ts
2+
*.json
3+
*.md
4+
**/persisted_queries.json
5+
dist/
6+
node_modules/
7+
OWNERS
8+
9+
# Nx/Builds
10+
.docusaurus
11+
.next
12+
.nx
13+
**/cjs/
14+
**/dts/
15+
**/esm/
16+
**/lib/
17+
**/mjs/
18+
**/out/
19+
**/templates/

.eslintrc.js

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
module.exports = {
2+
root: true,
3+
reportUnusedDisableDirectives: true,
4+
overrides: [
5+
// Docusaurus, Storybook
6+
{
7+
files: [
8+
'apps/*-docs/**/*',
9+
'apps/*-storybook/**/*',
10+
'examples/docusaurus/**/*',
11+
'examples/storybook/**/*',
12+
],
13+
rules: {
14+
'import/no-extraneous-dependencies': 'off',
15+
},
16+
},
17+
],
18+
parserOptions: {
19+
parser: "@typescript-eslint/parser",
20+
project: "./tsconfig.json",
21+
},
22+
plugins: ['react-perf', 'relay', '@typescript-eslint'],
23+
extends: [
24+
'airbnb-typescript/base',
25+
'airbnb/rules/react',
26+
'airbnb/rules/react-a11y',
27+
'plugin:relay/strict',
28+
],
29+
rules: {
30+
'react/destructuring-assignment': 'off',
31+
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx', '.mdx'] }],
32+
33+
// We utilize prop spreading
34+
'react/jsx-props-no-spreading': 'off',
35+
36+
// We utilize class properties
37+
'react/state-in-constructor': 'off',
38+
39+
// Dont use prop types since were using TypeScript
40+
'react/default-props-match-prop-types': 'off',
41+
'react/forbid-foreign-prop-types': 'off',
42+
'react/forbid-prop-types': 'off',
43+
'react/no-unused-prop-types': 'off',
44+
'react/prefer-read-only-props': 'off',
45+
'react/prop-types': 'off',
46+
'react/require-default-props': 'off',
47+
'react/sort-prop-types': 'off',
48+
49+
// Performance: Avoid unnecessary renders
50+
'react-perf/jsx-no-new-array-as-prop': 'warn',
51+
'react-perf/jsx-no-new-function-as-prop': 'warn',
52+
'react-perf/jsx-no-new-object-as-prop': ['warn', { nativeAllowList: ['style'] }],
53+
54+
// We prefer function declarations
55+
'react/function-component-definition': [
56+
'error',
57+
{ namedComponents: 'function-declaration', unnamedComponents: 'function-expression' },
58+
],
59+
60+
// We prefer on/handle named events
61+
'react/jsx-handler-names': 'error',
62+
63+
// We require named functions for inferred `displayName`
64+
// This is required for memo() and forwardRef() usage
65+
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
66+
67+
'react/jsx-one-expression-per-line': 'off',
68+
69+
// We dont use flow
70+
'relay/generated-flow-types': 'off',
71+
72+
// Shorthand types
73+
'@typescript-eslint/array-type': ['error', { default: 'array' }],
74+
'@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
75+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
76+
'@typescript-eslint/method-signature-style': ['error', 'property'],
77+
'@typescript-eslint/no-inferrable-types': 'error',
78+
79+
// Forbid types
80+
'@typescript-eslint/ban-types': 'error',
81+
'@typescript-eslint/no-explicit-any': ['error', { fixToUnknown: true }],
82+
'@typescript-eslint/no-invalid-void-type': 'error',
83+
'@typescript-eslint/no-unsafe-argument': 'error',
84+
'@typescript-eslint/no-unsafe-assignment': 'error',
85+
'@typescript-eslint/no-unsafe-call': 'error',
86+
'@typescript-eslint/no-unsafe-return': 'error',
87+
88+
// Readability
89+
'@typescript-eslint/adjacent-overload-signatures': 'error',
90+
'@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: false }],
91+
'@typescript-eslint/no-parameter-properties': 'error',
92+
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
93+
94+
// Correctness
95+
'@typescript-eslint/switch-exhaustiveness-check': 'error',
96+
'@typescript-eslint/no-for-in-array': 'error',
97+
'@typescript-eslint/no-misused-new': 'error',
98+
'@typescript-eslint/no-this-alias': 'error',
99+
'@typescript-eslint/no-unnecessary-qualifier': 'error',
100+
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
101+
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
102+
'@typescript-eslint/prefer-for-of': 'error',
103+
'@typescript-eslint/prefer-literal-enum-member': 'error',
104+
'@typescript-eslint/restrict-plus-operands': ['error', { checkCompoundAssignments: true }],
105+
'@typescript-eslint/unified-signatures': 'error',
106+
107+
// Assertions
108+
'@typescript-eslint/consistent-type-assertions': 'error',
109+
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
110+
'@typescript-eslint/no-extra-non-null-assertion': 'error',
111+
'@typescript-eslint/no-non-null-assertion': 'error',
112+
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
113+
'@typescript-eslint/prefer-as-const': 'error',
114+
115+
// Comments
116+
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-expect-error': 'allow-with-description' }],
117+
'@typescript-eslint/prefer-ts-expect-error': 'error',
118+
'@typescript-eslint/triple-slash-reference': [
119+
'error',
120+
{ path: 'never', types: 'never', lib: 'never' },
121+
],
122+
123+
// Async
124+
'no-void': 'off',
125+
'@typescript-eslint/await-thenable': 'error',
126+
'@typescript-eslint/no-floating-promises': 'error',
127+
'@typescript-eslint/no-misused-promises': 'error',
128+
'@typescript-eslint/promise-function-async': 'error',
129+
130+
// APIs
131+
'@typescript-eslint/prefer-includes': 'error',
132+
'@typescript-eslint/prefer-nullish-coalescing': 'error',
133+
'@typescript-eslint/prefer-optional-chain': 'error',
134+
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
135+
136+
// Hard to migrate
137+
// Errors for all try/catch blocks and any types from third-parties
138+
'@typescript-eslint/no-unsafe-member-access': 'off',
139+
140+
}
141+
}

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### AUTOGENERATED FILE
2+
### Run `yarn codeowners` to update

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Bug report
2+
description: Create a report to help us improve
3+
title: "Bug: "
4+
labels: ["type: bug"]
5+
6+
body:
7+
- type: input
8+
id: description
9+
attributes:
10+
label: Describe the bug
11+
description: A clear and concise description of what the bug is.
12+
placeholder: Tell us what you see!
13+
validations:
14+
required: true
15+
16+
- type: textarea
17+
id: steps
18+
attributes:
19+
label: Steps
20+
description: Steps to reproduce the behavior.
21+
placeholder: |
22+
1. Go to '...'
23+
2. Click on '....'
24+
3. Scroll down to '....'
25+
4. See error
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: expected
31+
attributes:
32+
label: Expected behavior
33+
description: A clear and concise description of what you expected to happen.
34+
validations:
35+
required: true
36+
37+
- type: textarea
38+
id: additional
39+
attributes:
40+
label: Additional info
41+
description: If applicable, include links to screenshots or error logs
42+
43+
- type: textarea
44+
id: environment
45+
attributes:
46+
label: Environment
47+
description: Please fill in details for bugs reported in your environment
48+
placeholder: |
49+
- OS: [e.g. Fedora]
50+
- Version [e.g. 37]
51+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Base Discord
4+
url: https://base.org/discord
5+
about: The official Base Discord community.
6+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Feature request
2+
description: Suggest an idea for this project
3+
title: "Feature Request: "
4+
labels: ["type: enhancement"]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
This issue form is for feature requests only!
11+
If you've found a bug, please use [bug_report](/new?template=bug_report.yml)
12+
- type: textarea
13+
id: problem
14+
attributes:
15+
label: Is your feature request related to a problem? Please describe.
16+
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
17+
18+
- type: textarea
19+
id: solution
20+
attributes:
21+
label: Describe the solution you'd like
22+
description: A clear and concise description of what you want to happen.
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: alternatives
28+
attributes:
29+
label: Describe alternatives you've considered
30+
description: Describe any alternative solutions or features you've considered.
31+
32+
- type: textarea
33+
id: other
34+
attributes:
35+
label: Additional context
36+
description: Add any other context or screenshots about the feature request here.
37+

0 commit comments

Comments
 (0)