Skip to content

Commit

Permalink
feat: start staking poc
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Feb 27, 2024
0 parents commit 6aa7e8b
Show file tree
Hide file tree
Showing 36 changed files with 17,043 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/node_modules/*
**/out/*
**/.next/*
**/dist/*
130 changes: 130 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
const path = require("node:path");

const paddingLineBetweenStatements = [
"error",
{ blankLine: "always", next: "return", prev: "*" },
]
.concat(
[
"multiline-block-like",
"multiline-expression",
"multiline-const",
"const",
"type",
"interface",
"if",
]
.map((item) => [
{ blankLine: "always", next: "*", prev: item },
{ blankLine: "always", next: item, prev: "*" },
])
.flat(),
)
.concat([
{
blankLine: "any",
next: ["singleline-const"],
prev: ["singleline-const"],
},
]);

module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
plugins: [
"@typescript-eslint",
"react-hooks",
"@stylistic",
"perfectionist",
"tailwindcss",
"import",
],
rules: {
"@next/next/no-img-element": "off",

"@stylistic/padding-line-between-statements": paddingLineBetweenStatements,

"tailwindcss/classnames-order": "error",

"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-var-requires": "off",

"arrow-body-style": "error",
"camelcase": "off",
"global-require": "off",

"import/no-duplicates": "error",

"jsx-a11y/anchor-is-valid": "off",

"no-console": ["error", { allow: ["warn", "error"] }],
"no-else-return": "error",
"no-shadow": "off",
"no-unused-vars": "off",
"no-useless-return": "error",
"object-shorthand": "error",

"perfectionist/sort-classes": "error",
"perfectionist/sort-enums": "error",
"perfectionist/sort-exports": "error",
"perfectionist/sort-interfaces": "error",
"perfectionist/sort-object-types": "error",
"perfectionist/sort-objects": "error",
"perfectionist/sort-union-types": "error",

"prefer-const": "error",
"prefer-destructuring": ["error"],
"prefer-spread": "error",
"prefer-template": "error",
"quote-props": ["error", "consistent-as-needed"],

"react-hooks/exhaustive-deps": "error",
"react-hooks/rules-of-hooks": "error",

"react/destructuring-assignment": [
"error",
"always",
{ destructureInSignature: "always" },
],
"react/display-name": "off",
"react/function-component-definition": "off",
"react/jsx-boolean-value": "error",
"react/jsx-curly-brace-presence": "error",
"react/jsx-filename-extension": "off",
"react/jsx-fragments": "error",
"react/jsx-key": ["error", { warnOnDuplicates: true }],
"react/jsx-no-useless-fragment": "error",
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-sort-props": "error",
"react/no-array-index-key": "off",
"react/no-unescaped-entities": "off",
"react/no-unknown-property": "off",
"react/no-unstable-nested-components": "error",
"react/no-unused-prop-types": "error",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"react/self-closing-comp": "error",
},
settings: {
react: {
version: "detect",
},
},
};
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.svg
.yarn
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"importOrder": ["^~(.*)$", "@/.*$", "^[./]"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"quoteProps": "consistent"
}
Empty file added README.md
Empty file.
10 changes: 10 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const nextConfig = {
eslint: {
ignoreDuringBuilds: process.env.QUICK_BUILD === "true",
},
typescript: {
ignoreBuildErrors: process.env.QUICK_BUILD === "true",
},
};

export default nextConfig;
Loading

0 comments on commit 6aa7e8b

Please sign in to comment.