update lint configs and scripts

This commit is contained in:
itsMapleLeaf
2023-09-27 12:07:32 -05:00
parent 2abb61493e
commit 2c706f6791
9 changed files with 460 additions and 783 deletions

View File

@@ -1,77 +0,0 @@
{
"root": true,
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/stylistic",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:astro/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": true
},
"plugins": ["@typescript-eslint", "react"],
"rules": {
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "ignoreRestSiblings": true }
],
"@typescript-eslint/no-empty-function": "off"
},
"ignorePatterns": [
"node_modules",
"dist",
".astro",
"packages/website/public/api"
],
"settings": {
"react": {
"version": "detect"
}
},
"overrides": [
{
"files": ["*.tsx", "*.jsx"],
"extends": [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended"
],
"rules": {
"react/prop-types": "off"
}
},
{
"files": ["*.astro"],
"parser": "astro-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"extraFileExtensions": [".astro"]
},
"globals": {
"astroHTML": "readonly"
},
"rules": {
"react/no-unknown-property": "off",
"react/jsx-key": "off",
"react/jsx-no-undef": "off"
}
}
]
}

View File

@@ -1,2 +1,3 @@
pnpm-lock.yaml pnpm-lock.yaml
/packages/website/public/api /packages/website/public/api
.astro

View File

@@ -1,18 +0,0 @@
{
"semi": false,
"useTabs": true,
"htmlWhitespaceSensitivity": "ignore",
"plugins": [
"prettier-plugin-jsdoc",
"prettier-plugin-astro",
"prettier-plugin-tailwindcss"
],
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}

View File

@@ -1,42 +1,53 @@
{ {
"name": "reacord-monorepo", "name": "reacord-monorepo",
"private": true, "private": true,
"scripts": { "scripts": {
"lint": "run-p --print-label --continue-on-error --silent lint:*", "lint": "run-s --continue-on-error lint:*",
"lint:prettier": "prettier --cache --check .", "lint:eslint": "eslint . --fix --cache --cache-file=node_modules/.cache/.eslintcache --report-unused-disable-directives",
"lint:eslint": "pnpm astro-sync && eslint . --report-unused-disable-directives", "lint:prettier": "prettier . --write --cache",
"lint:tsc": "pnpm astro-sync && pnpm -r --parallel --no-bail exec tsc -b", "lint:types": "tsc -b & pnpm -r --parallel run typecheck",
"lint:tsc-root": "tsc -b", "astro-sync": "pnpm --filter website exec astro sync",
"astro-sync": "pnpm --filter website exec astro sync", "format": "run-s --continue-on-error format:*",
"format": "run-s --continue-on-error format:*", "format:eslint": "eslint . --report-unused-disable-directives --fix",
"format:eslint": "eslint . --report-unused-disable-directives --fix", "format:prettier": "prettier --cache --write .",
"format:prettier": "prettier --cache --write .", "test": "vitest",
"test": "vitest", "build": "pnpm -r run build",
"build": "pnpm -r run build", "build:website": "pnpm --filter website... run build",
"build:website": "pnpm --filter website... run build", "start": "pnpm -C packages/website run start",
"start": "pnpm -C packages/website run start", "start:website": "pnpm -C packages/website run start",
"start:website": "pnpm -C packages/website run start", "release": "pnpm -r run build && changeset publish"
"release": "pnpm -r run build && changeset publish" },
}, "devDependencies": {
"devDependencies": { "@changesets/cli": "^2.26.2",
"@changesets/cli": "^2.26.2", "@itsmapleleaf/configs": "github:itsMapleLeaf/configs",
"@itsmapleleaf/configs": "^3.0.1", "@types/eslint": "^8.44.2",
"@types/eslint": "^8.44.2", "@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/eslint-plugin": "^6.4.0", "@typescript-eslint/parser": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0", "eslint": "^8.47.0",
"eslint": "^8.47.0", "eslint-config-prettier": "^9.0.0",
"eslint-config-prettier": "^9.0.0", "eslint-plugin-astro": "^0.28.0",
"eslint-plugin-astro": "^0.28.0", "eslint-plugin-react": "^7.33.2",
"eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^4.6.0", "npm-run-all": "^4.1.5",
"npm-run-all": "^4.1.5", "prettier": "^3.0.2",
"prettier": "^3.0.2", "prettier-plugin-astro": "^0.11.1",
"prettier-plugin-astro": "^0.11.1", "prettier-plugin-jsdoc": "^1.0.1",
"prettier-plugin-jsdoc": "^1.0.1", "prettier-plugin-tailwindcss": "^0.5.3",
"prettier-plugin-tailwindcss": "^0.5.3", "react": "^18.2.0",
"react": "^18.2.0", "tailwindcss": "^3.3.3",
"tailwindcss": "^3.3.3", "typescript": "^5.1.6",
"typescript": "^5.1.6", "vitest": "^0.34.1"
"vitest": "^0.34.1" },
} "prettier": "@itsmapleleaf/configs/prettier",
"eslintConfig": {
"extends": [
"./node_modules/@itsmapleleaf/configs/eslint.config.cjs",
"./node_modules/@itsmapleleaf/configs/eslint.config.react.cjs"
],
"ignorePatterns": [
"node_modules",
"dist",
"packages/website/public/api"
]
}
} }

View File

@@ -1,11 +1,14 @@
{ {
"name": "@reacord/helpers", "name": "@reacord/helpers",
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"dependencies": { "scripts": {
"@types/lodash-es": "^4.17.8", "typecheck": "tsc -b"
"lodash-es": "^4.17.21", },
"type-fest": "^4.2.0", "dependencies": {
"vitest": "^0.34.1" "@types/lodash-es": "^4.17.8",
} "lodash-es": "^4.17.21",
"type-fest": "^4.2.0",
"vitest": "^0.34.1"
}
} }

View File

@@ -1,90 +1,91 @@
{ {
"name": "reacord", "name": "reacord",
"type": "module", "type": "module",
"description": "Create interactive Discord messages using React.", "description": "Create interactive Discord messages using React.",
"version": "0.5.2", "version": "0.5.2",
"types": "./dist/main.d.ts", "types": "./dist/main.d.ts",
"homepage": "https://reacord.mapleleaf.dev", "homepage": "https://reacord.mapleleaf.dev",
"repository": "https://github.com/itsMapleLeaf/reacord.git", "repository": "https://github.com/itsMapleLeaf/reacord.git",
"changelog": "https://github.com/itsMapleLeaf/reacord/releases", "changelog": "https://github.com/itsMapleLeaf/reacord/releases",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [
"discord", "discord",
"discord-js", "discord-js",
"react", "react",
"react-js", "react-js",
"react-renderer", "react-renderer",
"interaction", "interaction",
"message", "message",
"embed", "embed",
"reacord" "reacord"
], ],
"files": [ "files": [
"library", "library",
"dist", "dist",
"README.md", "README.md",
"LICENSE" "LICENSE"
], ],
"exports": { "exports": {
".": { ".": {
"import": "./dist/main.js", "import": "./dist/main.js",
"require": "./dist/main.cjs", "require": "./dist/main.cjs",
"types": "./library/main.ts" "types": "./library/main.ts"
}, },
"./package.json": { "./package.json": {
"import": "./package.json", "import": "./package.json",
"require": "./package.json" "require": "./package.json"
} }
}, },
"scripts": { "scripts": {
"build": "cpy ../../README.md ../../LICENSE . && tsup library/main.ts --target node16 --format cjs,esm --sourcemap", "build": "cpy ../../README.md ../../LICENSE . && tsup library/main.ts --target node16 --format cjs,esm --sourcemap",
"build-watch": "pnpm build -- --watch", "build-watch": "pnpm build -- --watch",
"test": "vitest --coverage --no-watch", "test": "vitest --coverage --no-watch",
"test-dev": "vitest", "test-dev": "vitest",
"test-manual": "nodemon --exec tsx --ext ts,tsx ./scripts/discordjs-manual-test.tsx" "test-manual": "nodemon --exec tsx --ext ts,tsx ./scripts/discordjs-manual-test.tsx",
}, "typecheck": "tsc -b"
"dependencies": { },
"@types/node": "^20.5.0", "dependencies": {
"@types/react": "^18.2.20", "@types/node": "^20.5.0",
"@types/react-reconciler": "^0.28.2", "@types/react": "^18.2.20",
"react-reconciler": "^0.29.0", "@types/react-reconciler": "^0.28.2",
"rxjs": "^7.8.1" "react-reconciler": "^0.29.0",
}, "rxjs": "^7.8.1"
"peerDependencies": { },
"discord.js": "^14", "peerDependencies": {
"react": ">=17" "discord.js": "^14",
}, "react": ">=17"
"peerDependenciesMeta": { },
"discord.js": { "peerDependenciesMeta": {
"optional": true "discord.js": {
} "optional": true
}, }
"devDependencies": { },
"@reacord/helpers": "workspace:*", "devDependencies": {
"@types/lodash-es": "^4.17.8", "@reacord/helpers": "workspace:*",
"c8": "^8.0.1", "@types/lodash-es": "^4.17.8",
"cpy-cli": "^5.0.0", "c8": "^8.0.1",
"discord.js": "^14.12.1", "cpy-cli": "^5.0.0",
"dotenv": "^16.3.1", "discord.js": "^14.12.1",
"lodash-es": "^4.17.21", "dotenv": "^16.3.1",
"nodemon": "^3.0.1", "lodash-es": "^4.17.21",
"prettier": "^3.0.2", "nodemon": "^3.0.1",
"pretty-ms": "^8.0.0", "prettier": "^3.0.2",
"react": "^18.2.0", "pretty-ms": "^8.0.0",
"tsup": "^7.2.0", "react": "^18.2.0",
"tsx": "^3.12.7", "tsup": "^7.2.0",
"type-fest": "^4.2.0" "tsx": "^3.12.7",
}, "type-fest": "^4.2.0"
"release-it": { },
"git": { "release-it": {
"commitMessage": "release v${version}" "git": {
}, "commitMessage": "release v${version}"
"github": { },
"release": true, "github": {
"web": true "release": true,
} "web": true
}, }
"publishConfig": { },
"access": "public" "publishConfig": {
} "access": "public"
}
} }

View File

@@ -1,39 +1,40 @@
{ {
"type": "module", "type": "module",
"name": "website", "name": "website",
"version": "0.4.3", "version": "0.4.3",
"private": true, "private": true,
"sideEffects": false, "sideEffects": false,
"scripts": { "scripts": {
"dev": "run-p --race --print-label dev:*", "dev": "run-p --race --print-label dev:*",
"dev:typedoc": "typedoc --watch", "dev:typedoc": "typedoc --watch",
"dev:astro": "astro dev", "dev:astro": "astro dev",
"start": "astro preview", "start": "astro preview",
"build": "typedoc && astro build" "build": "typedoc && astro build",
}, "typecheck": "astro check && tsc -b"
"dependencies": { },
"@astrojs/prefetch": "^0.3.0", "dependencies": {
"@astrojs/react": "^2.2.2", "@astrojs/prefetch": "^0.3.0",
"@fontsource/jetbrains-mono": "^4.5.12", "@astrojs/react": "^2.2.2",
"@fontsource/rubik": "^4.5.14", "@fontsource/jetbrains-mono": "^4.5.12",
"@heroicons/react": "^2.0.18", "@fontsource/rubik": "^4.5.14",
"@tailwindcss/typography": "^0.5.9", "@heroicons/react": "^2.0.18",
"astro": "^2.10.9", "@tailwindcss/typography": "^0.5.9",
"clsx": "^2.0.0", "astro": "^2.10.9",
"reacord": "workspace:*", "clsx": "^2.0.0",
"react": "^18.2.0", "reacord": "workspace:*",
"react-dom": "^18.2.0", "react": "^18.2.0",
"tailwind-merge": "^1.14.0" "react-dom": "^18.2.0",
}, "tailwind-merge": "^1.14.0"
"devDependencies": { },
"@astrojs/tailwind": "^4.0.0", "devDependencies": {
"@total-typescript/ts-reset": "^0.4.2", "@astrojs/tailwind": "^4.0.0",
"@types/node": "^20.5.0", "@total-typescript/ts-reset": "^0.4.2",
"@types/react": "^18.2.20", "@types/node": "^20.5.0",
"@types/react-dom": "^18.2.7", "@types/react": "^18.2.20",
"npm-run-all": "^4.1.5", "@types/react-dom": "^18.2.7",
"tailwindcss": "^3.3.3", "npm-run-all": "^4.1.5",
"typedoc": "^0.24.8", "tailwindcss": "^3.3.3",
"wait-on": "^7.0.1" "typedoc": "^0.24.8",
} "wait-on": "^7.0.1"
}
} }

769
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,3 @@
{ {
"compilerOptions": { "extends": "@itsmapleleaf/configs/tsconfig"
"allowImportingTsExtensions": true,
"allowJs": true,
"checkJs": true,
"module": "esnext",
"moduleResolution": "bundler",
"noEmit": true,
"noUncheckedIndexedAccess": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "esnext"
}
} }