-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup turbo; make lint and build work
- Loading branch information
Showing
39 changed files
with
3,514 additions
and
7,706 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,6 +3,10 @@ node_modules | |
dist | ||
build | ||
public/build | ||
.next | ||
|
||
## Monorepo | ||
.turbo | ||
|
||
# Environment variables | ||
.env | ||
|
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 @@ | ||
auto-install-peers = true |
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
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,18 +1,4 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
extends: [ | ||
'@repo/eslint-config/base', | ||
'@repo/eslint-config/react', | ||
'plugin:storybook/recommended', | ||
], | ||
overrides: [ | ||
{ | ||
files: ['*.stories.tsx'], | ||
rules: { | ||
// For some reason it shows errors for imports from @repo/ui, even though they are resolved correctly. | ||
// Both develop and build work fine, so I'm disabling it for now. | ||
'import/no-unresolved': 'off', | ||
}, | ||
}, | ||
], | ||
extends: ['@repo/eslint-config/storybook'], | ||
} |
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
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,18 +1,5 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"declaration": false, | ||
"declarationMap": false, | ||
"incremental": true, | ||
"jsx": "preserve", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"module": "esnext", | ||
"noEmit": true, | ||
"resolveJsonModule": true, | ||
"target": "es5", | ||
"skipLibCheck": true | ||
}, | ||
"extends": "@repo/tsconfig/react-app.json", | ||
"include": ["."], | ||
"exclude": ["dist", "build", "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,8 @@ | ||
{ | ||
"extends": ["//"], | ||
"pipeline": { | ||
"build": { | ||
"outputs": ["build/**"] | ||
} | ||
} | ||
} |
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,22 +1,4 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
extends: ['@repo/eslint-config/base'], | ||
env: { | ||
node: true, | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
typescript: { | ||
project: 'apps/nestjs/tsconfig.json', | ||
}, | ||
}, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['jest.config.js', 'jest-e2e.config.js'], | ||
rules: { | ||
'@typescript-eslint/no-var-requires': 'off', | ||
}, | ||
}, | ||
], | ||
extends: ['@repo/eslint-config/nest'], | ||
} |
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 @@ | ||
{ | ||
"extends": ["//"], | ||
"pipeline": { | ||
"build": { | ||
"outputs": ["build/**"] | ||
} | ||
} | ||
} |
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,11 +1,4 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
extends: ['@repo/eslint-config/base', '@repo/eslint-config/react'], | ||
settings: { | ||
'import/resolver': { | ||
typescript: { | ||
project: 'apps/remix/tsconfig.json', | ||
}, | ||
}, | ||
}, | ||
extends: ['@repo/eslint-config/remix'], | ||
} |
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,10 +1,16 @@ | ||
import type { Cat } from '@repo/types' | ||
import axios from 'axios' | ||
|
||
const client = axios.create({ | ||
baseURL: process.env.API_URL || 'http://localhost:2222', | ||
}) | ||
const BASE_URL = process.env.API_URL || 'http://localhost:2222' | ||
|
||
export const catsApi = { | ||
getAll: () => client.get<Cat[]>('/cats'), | ||
interface CatsApi { | ||
getAll: () => Promise<Cat[]> | ||
} | ||
|
||
export const catsApi: CatsApi = { | ||
getAll: async () => { | ||
const response = await fetch(`${BASE_URL}/cats`) | ||
const data: unknown = await response.json() | ||
|
||
return data as Cat[] | ||
}, | ||
} |
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
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
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
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
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
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,20 +1,11 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"extends": "@repo/tsconfig/remix.json", | ||
"exclude": ["node_modules", "build"], | ||
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], | ||
"compilerOptions": { | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"isolatedModules": true, | ||
"jsx": "react-jsx", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"baseUrl": "./", | ||
"baseUrl": ".", | ||
"paths": { | ||
"~/*": ["./app/*"] | ||
}, | ||
|
||
// Remix takes care of building everything in `remix build`. | ||
"noEmit": true | ||
}, | ||
"exclude": ["node_modules", "build", "dist"] | ||
} | ||
} | ||
} |
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 @@ | ||
{ | ||
"extends": ["//"], | ||
"pipeline": { | ||
"build": { | ||
"outputs": ["build/**", "public/build/**"] | ||
} | ||
} | ||
} |
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,34 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
ignorePatterns: [ | ||
'node_modules/', | ||
'dist/', | ||
'build/', | ||
'public/build/', | ||
'.eslintrc.js', | ||
'**/*.css', | ||
], | ||
rules: { | ||
'import/order': [ | ||
'error', | ||
{ | ||
alphabetize: { caseInsensitive: true, order: 'asc' }, | ||
groups: ['builtin', 'external', 'internal', 'parent', 'sibling'], | ||
'newlines-between': 'always', | ||
}, | ||
], | ||
'import/no-default-export': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
|
||
// ⚠️ | ||
// Following rules are disabled during setup, but should probably be enabled later: | ||
|
||
// Errors as unknown, etc. | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
|
||
// Some weird type issues when calling `catsApi` in Remix index route | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.