setup tailwind + lint and format from root

This commit is contained in:
MapleLeaf
2021-12-29 15:10:54 -06:00
parent 1b4cedd857
commit 5e88509973
15 changed files with 301 additions and 138 deletions

View File

@@ -5,3 +5,4 @@ node_modules
.env
.vscode
app/docs.json
app/tailwind.css

View File

@@ -1,5 +0,0 @@
node_modules
pnpm-lock.yaml
build
public/build

View File

@@ -1,3 +1,4 @@
import type { MetaFunction, LinksFunction } from "remix"
import {
Links,
LiveReload,
@@ -6,12 +7,16 @@ import {
Scripts,
ScrollRestoration,
} from "remix"
import type { MetaFunction } from "remix"
import tailwindCss from "./tailwind.css"
export const meta: MetaFunction = () => {
return { title: "New Remix App" }
}
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: tailwindCss },
]
export default function App() {
return (
<html lang="en">

View File

@@ -4,13 +4,10 @@
"description": "",
"license": "",
"scripts": {
"prepare": "remix setup node & typedoc",
"dev": "concurrently typedoc 'remix dev'",
"build": "typedoc && remix build",
"start": "remix-serve build",
"lint": "eslint --ext js,ts,tsx .",
"lint-fix": "pnpm lint -- --fix",
"format": "prettier --write ."
"prepare": "remix setup node && pnpm build",
"dev": "concurrently 'typedoc' 'remix dev' 'tailwindcss --output app/tailwind.css & typedoc'",
"build": "typedoc && tailwindcss --output app/tailwind.css && remix build",
"start": "remix-serve build"
},
"dependencies": {
"@remix-run/react": "^1.1.1",
@@ -24,40 +21,17 @@
"@remix-run/dev": "^1.1.1",
"@types/react": "^17.0.24",
"@types/react-dom": "^17.0.9",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"autoprefixer": "^10.4.1",
"concurrently": "^6.5.1",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-unicorn": "^39.0.0",
"postcss": "^8.4.5",
"prettier": "^2.5.1",
"typescript": "^4.1.2",
"typedoc": "^0.22.10"
"tailwindcss": "^3.0.8",
"typedoc": "^0.22.10",
"typescript": "^4.1.2"
},
"engines": {
"node": ">=14"
},
"sideEffects": false,
"eslintConfig": {
"extends": [
"./node_modules/@itsmapleleaf/configs/eslint"
],
"ignorePatterns": [
"**/node_modules/**",
"**/.vscode/**"
],
"parserOptions": {
"project": "./node_modules/@itsmapleleaf/tsconfig.base.json"
},
"rules": {
"import/no-unused-modules": "off",
"unicorn/prevent-abbreviations": "off"
}
},
"prettier": "@itsmapleleaf/configs/prettier"
}

View File

@@ -1,6 +1,7 @@
/**
* @type {import('@remix-run/dev/config').AppConfig}
*/
// eslint-disable-next-line unicorn/prefer-module
module.exports = {
appDirectory: "app",
assetsBuildDirectory: "public/build",

View File

@@ -0,0 +1,8 @@
// eslint-disable-next-line unicorn/prefer-module
module.exports = {
content: ["./app/**/*.{ts,tsx}"],
theme: {
extend: {},
},
plugins: [],
}

View File

@@ -1,20 +1,9 @@
{
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"strict": true,
"baseUrl": ".",
"paths": {
"~/*": ["./app/*"]
},
// Remix takes care of building everything in `remix build`.
"noEmit": true
}
}
}

View File

@@ -1,18 +0,0 @@
{
"extends": ["./node_modules/@itsmapleleaf/configs/eslint"],
"ignorePatterns": [
"**/node_modules/**",
"**/coverage/**",
"**/dist/**",
"**/.vscode/**",
"**/docs/**"
],
"parserOptions": {
"project": "./node_modules/@itsmapleleaf/tsconfig.base.json"
},
"rules": {
// this rule causes a bunch of error notifications to pop up when moving files around
// disabling this for now
"import/no-unused-modules": "off"
}
}

View File

@@ -1,4 +0,0 @@
node_modules
dist
coverage
pnpm-lock.yaml

View File

@@ -41,25 +41,14 @@
}
},
"devDependencies": {
"@itsmapleleaf/configs": "^1.1.2",
"@jest/globals": "^27.4.4",
"@types/jest": "^27.0.3",
"@types/lodash-es": "^4.17.5",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"c8": "^7.10.0",
"discord.js": "^13.4.0",
"dotenv": "^10.0.0",
"esbuild": "latest",
"esbuild-jest": "^0.5.0",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-unicorn": "^39.0.0",
"esmo": "^0.13.0",
"jest": "^27.4.5",
"lodash-es": "^4.17.21",

View File

@@ -1,14 +1,3 @@
{
"extends": "@itsmapleleaf/configs/tsconfig.base",
"compilerOptions": {
"noImplicitOverride": true
},
"exclude": [
"**/node_modules/**",
"**/coverage/**",
"**/dist/**",
"**/.cache/**",
"**/api/_build/**",
"**/public/**"
]
"extends": "../../tsconfig.base.json"
}