Skip to content
Draft
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
14 changes: 11 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
{
"root": true,

"env": {
"browser": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"ignorePatterns": ["dist"],
"ignorePatterns": ["**/dist/*"],
"parserOptions": {
"project": "./tsconfig.eslint.json"
"project": ["./tsconfig.eslint.json", "./apps/*/tsconfig.eslint.json", "./packages/*/tsconfig.eslint.json"]
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-non-null-assertion": "off"
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^h$"
}
]
}
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,7 @@ dist

# End of https://www.toptal.com/developers/gitignore/api/node,macos

discord-html-transcripts-*.tgz
discord-html-transcripts-*.tgz
# moon
.moon/cache
.moon/docker
69 changes: 69 additions & 0 deletions .moon/toolchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# https://moonrepo.dev/docs/config/toolchain
$schema: 'https://moonrepo.dev/schemas/toolchain.json'

# Extend and inherit an external configuration file. Must be a valid HTTPS URL or file system path.
# extends: './shared/toolchain.yml'

# Configures Node.js within the toolchain. moon manages its own version of Node.js
# instead of relying on a version found on the host machine. This ensures deterministic
# and reproducible builds across any machine.
node:
# The version to use. Must be a semantic version that includes major, minor, and patch.
# We suggest using the latest active LTS version: https://nodejs.org/en/about/releases
version: '18.16.0'

# The package manager to use when managing dependencies.
# Accepts "npm" (default), "pnpm", or "yarn".
packageManager: 'pnpm'

# The version of the package manager (above) to use.
pnpm:
version: '8.6.0'

# Add `node.version` as a constraint in the root `package.json` `engines`.
addEnginesConstraint: true

# Dedupe dependencies after the lockfile has changed.
dedupeOnLockfileChange: true

# Version format to use when syncing dependencies within the project's `package.json`.
# dependencyVersionFormat: 'workspace'

# Infer and automatically create moon tasks from `package.json` scripts, per project.
# BEWARE: Tasks and scripts are not 1:1 in functionality, so please refer to the documentation.
inferTasksFromScripts: true

# Sync a project's `dependsOn` as dependencies within the project's `package.json`.
syncProjectWorkspaceDependencies: true

# Sync `node.version` to a 3rd-party version manager's config file.
# Accepts "nodenv" (.node-version), "nvm" (.nvmrc), or none.
# syncVersionManagerConfig: 'nvm'

# Configures how moon integrates with TypeScript.
typescript:
# When `syncProjectReferences` is enabled and a dependent project reference
# *does not* have a `tsconfig.json`, automatically create one.
createMissingConfig: false

# Name of `tsconfig.json` file in each project root.
projectConfigFileName: 'tsconfig.json'

# Name of `tsconfig.json` file in the workspace root.
rootConfigFileName: 'tsconfig.json'

# Name of the config file in the workspace root that defines shared compiler
# options for all project reference based config files.
# rootOptionsConfigFileName: 'tsconfig.options.json'

# Update a project's `tsconfig.json` to route the `outDir` compiler option
# to moon's `.moon/cache` directory.
routeOutDirToCache: false

# Sync a project's `dependsOn` as project references within the
# project's `tsconfig.json` and the workspace root `tsconfig.json`.
syncProjectReferences: false

# Sync a project's project references as import aliases to the `paths`
# compiler option in each applicable project.
syncProjectReferencesToPaths: false
16 changes: 16 additions & 0 deletions .moon/workspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://moonrepo.dev/docs/config/workspace
$schema: 'https://moonrepo.dev/schemas/workspace.json'

# Require a specific version of moon while running commands, otherwise fail.
# versionConstraint: '>=1.0.0'

# Extend and inherit an external configuration file. Must be a valid HTTPS URL or file system path.
# extends: './shared/workspace.yml'

# REQUIRED: A map of all projects found within the workspace, or a list or file system globs.
# When using a map, each entry requires a unique project ID as the map key, and a file system
# path to the project folder as the map value. File paths are relative from the workspace root,
# and cannot reference projects located outside the workspace boundary.
projects:
- 'apps/*'
- 'packages/*'
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": false
}
},

"eslint.workingDirectories": ["./packages/*", "./apps/*"]
}
63 changes: 12 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,63 +1,24 @@
{
"name": "discord-html-transcripts",
"version": "3.1.5",
"description": "A nicely formatted html transcript generator for discord.js.",
"main": "dist/index.js",
"homepage": "https://github.com/ItzDerock/discord-html-transcripts",
"types": "./dist/index.d.ts",
"version": "1.0.0",
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc -p tsconfig.json",
"prepack": "npm run build",
"test:typescript": "ts-node ./tests/generate.ts",
"lint": "prettier --write --cache . && eslint --cache --fix .",
"typecheck": "tsc -p tsconfig.eslint.json"
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Derock <[email protected]>",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/ItzDerock/discord-html-transcripts.git"
"url": "git+https://github.com/ItzDerock/discord-html-transcripts"
},
"keywords": [
"discord.js",
"discord.js-transcripts",
"discord.js-html-transcripts",
"html-transcripts",
"discord-html-transcripts",
"discord-transcripts"
],
"author": "Derock <[email protected]>",
"license": "GNU GPLv3",
"files": [
"dist/**/*.js",
"dist/**/*.d.ts",
"dist/**/*.js.map"
],
"devDependencies": {
"@types/node": "^18.11.18",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"discord.js": "^14.12.0",
"dotenv": "^16.0.3",
"eslint": "^8.32.0",
"husky": "^8.0.3",
"prettier": "^2.8.3",
"pretty-quick": "^3.1.3",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
},
"dependencies": {
"@derockdev/discord-components-core": "^3.5.3",
"@derockdev/discord-components-react": "^3.5.3",
"discord-markdown-parser": "~1.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"simple-markdown": "^0.7.3",
"twemoji": "^14.0.2",
"undici": "^5.21.0"
"eslint": "^8.47.0",
"vitest": "^0.34.1"
},
"peerDependencies": {
"discord.js": "^14.0.0 || ^15.0.0"
"packageManager": "[email protected]",
"engines": {
"node": "18.16.0"
}
}
8 changes: 8 additions & 0 deletions packages/discord-components-core/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../.eslintrc.json",
"settings": {
"react": {
"pragma": "h"
}
}
}
Empty file.
Loading