Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/v2 routes #12

Merged
merged 4 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 72 additions & 72 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
{
"plugins": ["tailwindcss"],
"extends": [
"@remix-run/eslint-config",
"@remix-run/eslint-config/node",
"plugin:tailwindcss/recommended",
"prettier"
],
"parserOptions": {
"project": ["./tsconfig.json"]
},
"settings": {
// Help eslint-plugin-tailwindcss to parse Tailwind classes outside of className
"tailwindcss": {
"callees": ["tw"]
},
"jest": {
"version": 27
}
},
"rules": {
"no-console": "warn",
"arrow-body-style": ["warn", "as-needed"],
// @typescript-eslint
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "all",
"argsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"ignoreRestSiblings": false
}
],
//import
"import/no-cycle": "error",
"import/no-unresolved": "error",
"import/no-default-export": "warn",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
},
"overrides": [
{
"files": [
"./app/root.tsx",
"./app/entry.client.tsx",
"./app/entry.server.tsx",
"./app/routes/**/*.tsx"
],
"rules": {
"import/no-default-export": "off"
}
}
]
"plugins": ["tailwindcss"],
"extends": [
"@remix-run/eslint-config",
"@remix-run/eslint-config/node",
"plugin:tailwindcss/recommended",
"prettier"
],
"parserOptions": {
"project": ["./tsconfig.json"]
},
"settings": {
// Help eslint-plugin-tailwindcss to parse Tailwind classes outside of className
"tailwindcss": {
"callees": ["tw"]
},
"jest": {
"version": 27
}
},
"rules": {
"no-console": "warn",
"arrow-body-style": ["warn", "as-needed"],
// @typescript-eslint
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "all",
"argsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"ignoreRestSiblings": false
}
],
//import
"import/no-cycle": "error",
"import/no-unresolved": "error",
"import/no-default-export": "warn",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
},
"overrides": [
{
"files": [
"./app/root.tsx",
"./app/entry.client.tsx",
"./app/entry.server.tsx",
"./app/routes/**/*.tsx"
],
"rules": {
"import/no-default-export": "off"
}
}
]
}
110 changes: 55 additions & 55 deletions .github/workflows/for-this-stack-repo-only.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
name: 🚀 Check Stack
on:
push:
branches:
- main
- dev
pull_request: {}
push:
branches:
- main
- dev
pull_request: {}
permissions:
actions: write
contents: read
actions: write
contents: read

jobs:
lint:
name: ⬣ ESLint
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: ⚙️ Build CSS
run: npm run generate:css

- name: 🔬 Lint
run: npm run lint

typecheck:
name: ʦ TypeScript
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: 🔎 Type check
run: npm run typecheck --if-present
lint:
name: ⬣ ESLint
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: ⚙️ Build CSS
run: npm run generate:css

- name: 🔬 Lint
run: npm run lint

typecheck:
name: ʦ TypeScript
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: 🔎 Type check
run: npm run typecheck --if-present
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ node_modules
.env
.cache

/app/styles/tailwind.css
# lock files
package-lock.json
yarn.lock
pnpm-lock.yaml
5 changes: 5 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import("prettier").Options} */
module.exports = {
tabWidth: 4,
useTabs: true,
};
9 changes: 6 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"tailwindCSS.experimental.classRegex": [
["tw\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
]
"tailwindCSS.experimental.classRegex": [
["tw\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
],
"typescript.tsdk": "node_modules/typescript/lib",
"editor.tabSize": 4,
"editor.insertSpaces": false,
}
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# base node image
FROM node:16-bullseye-slim as base
FROM node:18-bookworm-slim as base

# set for base and all layer that inherit from it
ENV NODE_ENV production
Expand All @@ -12,7 +12,7 @@ FROM base as deps

WORKDIR /myapp

ADD package.json package-lock.json ./
ADD package.json ./
RUN npm install --production=false

# Setup production node_modules
Expand All @@ -21,7 +21,7 @@ FROM base as production-deps
WORKDIR /myapp

COPY --from=deps /myapp/node_modules /myapp/node_modules
ADD package.json package-lock.json ./
ADD package.json ./
RUN npm prune --production

# Build the app
Expand Down
Loading