Skip to content

Commit

Permalink
Merge commit '11303a767df67e67e8007ca20e07894b268e3269' into fix/show…
Browse files Browse the repository at this point in the history
…-token-prices
  • Loading branch information
adamgall committed Mar 7, 2024
2 parents 2f85687 + 11303a7 commit 7720d94
Show file tree
Hide file tree
Showing 205 changed files with 2,260 additions and 2,254 deletions.
146 changes: 62 additions & 84 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,89 +1,67 @@
{
"env": {
"browser": true,
"es2021": true
"env": {
"browser": true,
"es2021": true
},
"extends": [
"next/core-web-vitals",
"plugin:import/recommended",
"airbnb-typescript/base",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
// required for "type-aware linting"
"project": ["./tsconfig.json"],
"ecmaFeatures": {
"jsx": true
},
"extends": [
"next/core-web-vitals",
"plugin:import/recommended",
"airbnb-typescript/base"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
// required for "type-aware linting"
"project": [
"./tsconfig.json"
],
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["import", "@typescript-eslint"],
"settings": {
// resolves imports without file extensions for listed extensions
"import/resolver": {
"node": {
"extensions": [".ts", ".tsx"]
}
},
"plugins": [
"import",
"@typescript-eslint",
"prettier"
"react": {
"version": "detect"
}
},
"rules": {
// ignores need for "react" import
"react/react-in-jsx-scope": "off",
// rule for function component to be framed as function
"react/function-component-definition": [
2,
{
"namedComponents": "function-declaration"
}
],
"settings": {
// resolves imports without file extensions for listed extensions
"import/resolver": {
"node": {
"extensions": [
".ts",
".tsx"
]
}
},
"react": {
"version": "detect"
"comma-dangle": "off",
"@typescript-eslint/comma-dangle": "off",
"indent": "off",
"@typescript-eslint/indent": "off",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": false
}
},
"rules": {
// ignores need for "react" import
"react/react-in-jsx-scope": "off",
// rule for function component to be framed as function
"react/function-component-definition": [
2,
{
"namedComponents": "function-declaration"
}
],
"comma-dangle": "off",
"@typescript-eslint/comma-dangle": "off",
"indent": "off",
"@typescript-eslint/indent": "off",
// prettier config
"prettier/prettier": [
1,
{
"printWidth": 100,
"endOfLine": "auto",
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"semi": true,
"arrowParens": "avoid",
"singleAttributePerLine": true
}
],
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": false
}
}
],
// react hook rules
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
// var rules
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-unused-vars": "warn",
// class rules
"@typescript-eslint/lines-between-class-members": "off"
}
}
}
],
// react hook rules
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
// var rules
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-unused-vars": "warn",
// class rules
"@typescript-eslint/lines-between-class-members": "off"
}
}
22 changes: 11 additions & 11 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
2 changes: 0 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@

- If possible, please provide unit or integration tests for your changes. You can see example
automation tests in the [test directory](https://github.com/decent-dao/fractal-interface/tree/HEAD/tests).

- All of your components should be composed of [Chakra UI](https://chakra-ui.com/) base components, using our custom theme.

- A member of the Fractal engineering team will respond with any further discussion or requested changes and once approved
you are free to merge.

- We appreciate the collaboration!

### Submitting Language Translations
Expand Down
2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ Please include the following information in your email:

If you prefer secure communication, please use the following GPG key:

https://keys.openpgp.org/search?q=security%40decent-dao.org
https://keys.openpgp.org/search?q=security%40decent-dao.org
37 changes: 37 additions & 0 deletions .github/workflows/code-syntax.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Code Syntax
on:
push:
branches:
- develop
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Build GraphQL client
run: npm run graphql:build
- name: Run tests
run: npm run lint
pretty:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Build GraphQL client
run: npm run graphql:build
- name: Run tests
run: npm run pretty:check
1 change: 0 additions & 1 deletion .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,3 @@ jobs:
docker rm webapp
docker stop blockchain
docker rm blockchain
2 changes: 1 addition & 1 deletion .graphclientrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ sources:
endpoint: https://api.studio.thegraph.com/query/43215/fractal-{context.chainName:sepolia}/version/latest

documents:
- ./src/graphql/DAO.graphql
- ./src/graphql/DAO.graphql
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/assets/typechain-types/
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 100,
"endOfLine": "auto",
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"semi": true,
"arrowParens": "avoid",
"singleAttributePerLine": true
}
10 changes: 0 additions & 10 deletions .prettierrc.json

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ $ npm run graphql:build # For UNIX
```

Running development environment

```shell
$ npm run dev
```
Expand Down Expand Up @@ -81,8 +82,8 @@ The "dev" environment tracks the `develop` branch, "staging" tracks `staging`, a
So at any given time, there are effectively three builds out there, and they are publicly accessible and privately configurable within Github:

1. dev site
- url: https://app.dev.fractalframework.xyz
- url: https://app.dev.fractalframework.xyz
2. staging site
- url: https://app.staging.fractalframework.xyz
- url: https://app.staging.fractalframework.xyz
3. prod site
- url: https://app.fractalframework.xyz
- url: https://app.fractalframework.xyz
4 changes: 2 additions & 2 deletions app/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function DaoCreatePage() {
const { getAddress } = ethers.utils;
const daoFound = await requestWithRetries(
() => safeAPI.getSafeCreationInfo(getAddress(daoAddress)),
8
8,
);
toggleFavorite(daoAddress);
if (daoFound) {
Expand All @@ -45,7 +45,7 @@ export default function DaoCreatePage() {
push(BASE_ROUTES.landing);
}
},
[safeAPI, requestWithRetries, toggleFavorite, push, t]
[safeAPI, requestWithRetries, toggleFavorite, push, t],
);

const [deploy, pending] = useDeployDAO();
Expand Down
2 changes: 1 addition & 1 deletion app/daos/[daoAddress]/edit/governance/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function ModifyGovernancePage() {
deployAzorius(
daoData as AzoriusERC20DAO | AzoriusERC721DAO,
!daoName || createAccountSubstring(daoAddress!) === daoName,
!daoSnapshotURL && !!daoData.snapshotURL
!daoSnapshotURL && !!daoData.snapshotURL,
);
};

Expand Down
6 changes: 3 additions & 3 deletions app/daos/[daoAddress]/proposal-templates/new/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ export default function CreateProposalTemplatePage() {
const searchParams = useSearchParams();
const defaultProposalTemplatesHash = useMemo(
() => searchParams?.get('templatesHash'),
[searchParams]
[searchParams],
);
const defaultProposalTemplateIndex = useMemo(
() => searchParams?.get('templateIndex'),
[searchParams]
[searchParams],
);

const {
Expand Down Expand Up @@ -141,7 +141,7 @@ export default function CreateProposalTemplatePage() {
push(
daoAddress
? DAO_ROUTES.proposalTemplates.relative(daoAddress)
: BASE_ROUTES.landing
: BASE_ROUTES.landing,
)
}
isButtonDisabled={pendingCreateTx}
Expand Down
2 changes: 1 addition & 1 deletion app/daos/[daoAddress]/proposals/new/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function ProposalCreatePage() {
const [formState, setFormState] = useState(CreateProposalState.METADATA_FORM);
const isAzorius = useMemo(
() => type === GovernanceType.AZORIUS_ERC20 || type === GovernanceType.AZORIUS_ERC721,
[type]
[type],
);

const successCallback = () => {
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: "3"
version: '3'
services:
blockchain:
build: docker/blockchain
ports:
- "8545:8545"
- '8545:8545'
env_file:
- ./docker/.env.tests.local

Expand All @@ -16,7 +16,7 @@ services:
NEXT_PUBLIC_LOCAL_CHAIN_ID: '31337'
NEXT_PUBLIC_LOCAL_PROVIDER_URL: 'http://127.0.0.1:8545'
ports:
- "3000:3000"
- '3000:3000'
environment:
- NEXT_PUBLIC_TESTING_ENVIRONMENT=true
- NEXT_PUBLIC_LOCAL_CHAIN_ID=31337
Expand Down
Loading

0 comments on commit 7720d94

Please sign in to comment.