-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finished refactoring react box, added npx script too
- Loading branch information
1 parent
1d53b5e
commit cd327d9
Showing
107 changed files
with
1,082 additions
and
4,576 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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
|
||
node_modules | ||
dest | ||
src/contracts/target | ||
src/contracts/target |
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,63 +1,42 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react-hooks/recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'prettier', | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript", | ||
"prettier", | ||
], | ||
settings: { | ||
'import/resolver': { | ||
"import/resolver": { | ||
typescript: true, | ||
node: true, | ||
}, | ||
}, | ||
ignorePatterns: ['dest', 'webpack.config.js', '.eslintrc.cjs'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['react-refresh'], | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.tsx'], | ||
parserOptions: { | ||
project: true, | ||
}, | ||
}, | ||
], | ||
ignorePatterns: ["dest", "webpack.config.js", ".eslintrc.cjs"], | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["react-refresh"], | ||
rules: { | ||
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/await-thenable': 'error', | ||
'@typescript-eslint/no-floating-promises': 2, | ||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], | ||
'require-await': 2, | ||
'no-console': 'warn', | ||
'no-constant-condition': 'off', | ||
camelcase: 2, | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
patterns: [ | ||
{ | ||
group: ['client-dest'], | ||
message: "Fix this absolute garbage import. It's your duty to solve it before it spreads.", | ||
}, | ||
{ | ||
group: ['dest'], | ||
message: 'You should not be importing from a build directory. Did you accidentally do a relative import?', | ||
}, | ||
], | ||
}, | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ allowConstantExport: true }, | ||
], | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/await-thenable": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, | ||
], | ||
'import/no-unresolved': 'error', | ||
'import/no-extraneous-dependencies': 'error', | ||
"require-await": 2, | ||
"no-console": "warn", | ||
"no-constant-condition": "off", | ||
camelcase: 2, | ||
"import/no-unresolved": "error", | ||
"import/no-extraneous-dependencies": "error", | ||
}, | ||
}; |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
!.yarn/releases | ||
|
||
node_modules | ||
dest | ||
dist | ||
artifacts | ||
src/contracts/target | ||
src/contracts/log |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Private Token Noir Smart Contract</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.js"></script> | ||
</body> | ||
<style> | ||
#root { | ||
width: 100%; | ||
text-align: center; | ||
} | ||
|
||
body { | ||
display: flex; | ||
place-items: center; | ||
background: linear-gradient(#f6fbfc, #d8d4e7); | ||
min-height: 100vh; | ||
} | ||
</style> | ||
</html> |
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 |
---|---|---|
|
@@ -3,15 +3,15 @@ | |
"private": true, | ||
"version": "0.1.0", | ||
"type": "module", | ||
"main": "./dest/index.js", | ||
"main": "./dist/index.js", | ||
"scripts": { | ||
"compile": "cd src/contracts && ${AZTEC_NARGO:-aztec-nargo} compile", | ||
"codegen": "${AZTEC_CLI:-aztec-cli} codegen src/contracts/target -o artifacts --ts", | ||
"build": "yarn clean && yarn compile && yarn codegen && tsc -b && webpack", | ||
"clean": "rm -rf ./dest .tsbuildinfo ./artifacts ./src/contracts/target", | ||
"clean": "rm -rf ./dist .tsbuildinfo ./artifacts ./src/contracts/target", | ||
"prep": "yarn clean && yarn compile && yarn codegen", | ||
"dev": "yarn prep && webpack serve --mode development", | ||
"serve": "serve -p 3000 ./dest", | ||
"dev": "webpack serve --mode development", | ||
"serve": "serve -p 3000 ./dist", | ||
"formatting": "prettier --check ./src && eslint ./src", | ||
"formatting:fix": "prettier -w ./src", | ||
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --runInBand" | ||
|
@@ -62,10 +62,12 @@ | |
"eslint-plugin-prettier": "^5.0.1", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-react-refresh": "^0.4.3", | ||
"html-webpack-plugin": "^5.6.0", | ||
"jest": "^29.6.4", | ||
"postcss": "^8.4.29", | ||
"postcss-loader": "^7.3.3", | ||
"prettier": "^3.1.1", | ||
"react-toastify": "^10.0.4", | ||
"resolve-typescript-plugin": "^2.0.1", | ||
"stream-browserify": "^3.0.0", | ||
"style-loader": "^3.3.3", | ||
|
@@ -79,23 +81,11 @@ | |
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^4.15.1" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.5%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"files": [ | ||
"dest", | ||
"dist", | ||
"src", | ||
"!*.test.*" | ||
], | ||
"types": "./dest/index.d.ts", | ||
"types": "./dist/index.d.ts", | ||
"packageManager": "[email protected]" | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.