This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0b5afc8
Showing
50 changed files
with
10,314 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# apps | ||
.next | ||
next-env.d.ts | ||
out | ||
|
||
# scripts | ||
packages/t[sw]config | ||
scripts | ||
.*.js | ||
*.config.js | ||
|
||
# dependencies | ||
node_modules |
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,139 @@ | ||
const packageJson = require("./package.json"); | ||
|
||
const jsExtensions = [".js", ".mjs", ".cjs", ".jsx"]; | ||
|
||
const tsExtensions = [ | ||
...jsExtensions.map((ext) => ext.replace("js", "ts")), | ||
".d.ts", | ||
]; | ||
|
||
const esExtensions = [...tsExtensions, ...jsExtensions]; | ||
|
||
const reactExtensions = esExtensions.filter((ext) => ext.endsWith("sx")); | ||
|
||
/** @type {import('eslint').Linter.Config} */ | ||
const config = { | ||
root: true, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript", | ||
"next/core-web-vitals", | ||
"prettier", | ||
], | ||
plugins: [ | ||
"@typescript-eslint", | ||
"import", | ||
"simple-import-sort", | ||
"react", | ||
"react-hooks", | ||
"jsx-a11y", | ||
"@next/next", | ||
].reverse(), | ||
rules: { | ||
"eol-last": "error", | ||
"no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 1 }], | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
"no-constant-condition": "off", | ||
"lines-around-directive": ["error", { before: "never", after: "always" }], | ||
quotes: "off", | ||
"dot-notation": "error", | ||
"arrow-body-style": "error", | ||
"prefer-arrow-callback": "error", | ||
"require-await": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ ignoreRestSiblings: true }, | ||
], | ||
"@typescript-eslint/no-use-before-define": "error", | ||
"@typescript-eslint/no-unnecessary-condition": [ | ||
"error", | ||
{ allowConstantLoopConditions: true }, | ||
], | ||
"@typescript-eslint/ban-ts-comment": [ | ||
"error", | ||
{ | ||
"ts-expect-error": "allow-with-description", | ||
"ts-nocheck": "allow-with-description", | ||
}, | ||
], | ||
"@typescript-eslint/quotes": "error", | ||
"@typescript-eslint/consistent-type-imports": "error", | ||
"@typescript-eslint/consistent-type-definitions": "error", | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ default: "array-simple", readonly: "array-simple" }, | ||
], | ||
"@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/explicit-function-return-type": [ | ||
"error", | ||
{ allowExpressions: true }, | ||
], | ||
"@typescript-eslint/require-await": "error", | ||
"@typescript-eslint/await-thenable": "error", | ||
"@typescript-eslint/no-misused-promises": "error", | ||
"@typescript-eslint/no-floating-promises": "error", | ||
"import/first": "error", | ||
"import/newline-after-import": "error", | ||
"import/namespace": ["error", { allowComputed: true }], | ||
"import/no-cycle": "error", | ||
"import/no-internal-modules": [ | ||
"error", | ||
{ allow: ["next/*", "next/font/*", "react-dom/*", "jotai/*", "~/*"] }, | ||
], | ||
"simple-import-sort/imports": [ | ||
"error", | ||
{ | ||
groups: [ | ||
["client", "server"].map((name) => `^\\u0000${name}-only$`), | ||
["^\\u0000[^\\.]"], | ||
["^\\u0000~\\/"], | ||
["^\\u0000\\.\\."], | ||
["^\\u0000\\.[^\\.]"], | ||
["\\u0000$"], | ||
["^~\\/.*\\u0000$"], | ||
["^\\.\\..*\\u0000$"], | ||
["^\\.[^\\.].*\\u0000$"], | ||
["^[^\\.]"], | ||
["^~\\/"], | ||
["^\\.\\."], | ||
["^\\.[^\\.]"], | ||
], | ||
}, | ||
], | ||
"simple-import-sort/exports": "error", | ||
"react/jsx-filename-extension": [ | ||
"error", | ||
{ allow: "as-needed", extensions: reactExtensions }, | ||
], | ||
"react/function-component-definition": [ | ||
"error", | ||
{ | ||
namedComponents: "arrow-function", | ||
unnamedComponents: "arrow-function", | ||
}, | ||
], | ||
}, | ||
settings: { | ||
"import/extensions": esExtensions, | ||
"import/parsers": { "@typescript-eslint/parser": tsExtensions }, | ||
"import/resolver": { | ||
typescript: { | ||
project: packageJson.workspaces.map( | ||
(workspace) => `./${workspace}/tsconfig.json` | ||
), | ||
}, | ||
}, | ||
next: { rootDir: "apps/www" }, | ||
}, | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: packageJson.workspaces.map( | ||
(workspace) => `./${workspace}/tsconfig.json` | ||
), | ||
}, | ||
}; | ||
|
||
module.exports = config; |
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,17 @@ | ||
# apps | ||
.next | ||
next-env.d.ts | ||
out | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# debug | ||
npm-debug.log* | ||
|
||
# env | ||
.env*.local | ||
|
||
# misc | ||
.DS_Store | ||
*.pem |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,17 @@ | ||
# apps | ||
.next | ||
next-env.d.ts | ||
out | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# debug | ||
npm-debug.log* | ||
|
||
# env | ||
.env* | ||
|
||
# misc | ||
.DS_Store | ||
*.pem |
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,6 @@ | ||
/** @type {import('prettier').Options} */ | ||
const options = { | ||
plugins: [require("prettier-plugin-tailwindcss")], | ||
}; | ||
|
||
module.exports = options; |
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,8 @@ | ||
{ | ||
"recommendations": [ | ||
"bradlc.vscode-tailwindcss", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} |
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,22 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"javascript.suggestionActions.enabled": false, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { "source.fixAll": true }, | ||
"editor.formatOnSave": true, | ||
"files.trimTrailingWhitespace": true, | ||
"files.trimFinalNewlines": true, | ||
"files.insertFinalNewline": true, | ||
"files.associations": { | ||
"*.css": "tailwindcss", | ||
".env.*": "properties" | ||
}, | ||
"files.exclude": { | ||
"node_modules": true, | ||
"package-lock.json": true, | ||
"**/.next": true, | ||
"**/next-env.d.ts": true, | ||
"**/out": true, | ||
".husky/_": true | ||
} | ||
} |
Oops, something went wrong.