mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
build: refactor linting setup
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -20,10 +20,9 @@ dist-docs
|
|||||||
|
|
||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
.tmp
|
.tmp
|
||||||
.vscode
|
.vscode/*
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
!.vscode/settings.json
|
!.vscode/settings.json
|
||||||
!packages/create-discord-bot/template/**/.vscode
|
|
||||||
.idea
|
.idea
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.turbo
|
.turbo
|
||||||
|
|||||||
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@@ -1,11 +1,13 @@
|
|||||||
{
|
{
|
||||||
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
|
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
|
||||||
|
"eslint.useESLintClass": false,
|
||||||
"eslint.experimental.useFlatConfig": true,
|
"eslint.experimental.useFlatConfig": true,
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll": true,
|
"source.organizeImports": false,
|
||||||
"source.organizeImports": false
|
"source.fixAll.eslint": true,
|
||||||
|
"source.fixAll": true
|
||||||
},
|
},
|
||||||
"editor.trimAutoWhitespace": false,
|
"editor.trimAutoWhitespace": false,
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
|
|||||||
105
.yarn/patches/eslint-plugin-i-npm-2.28.0-2-4a8edfc1f1.patch
Normal file
105
.yarn/patches/eslint-plugin-i-npm-2.28.0-2-4a8edfc1f1.patch
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +1,2 @@
|
|||||||
|
/** @type {import('prettier').Config} */
|
||||||
module.exports = require('../../.prettierrc.json');
|
module.exports = require('../../.prettierrc.json');
|
||||||
|
|||||||
@@ -70,8 +70,8 @@
|
|||||||
"@testing-library/react": "^14.0.0",
|
"@testing-library/react": "^14.0.0",
|
||||||
"@testing-library/user-event": "^14.4.3",
|
"@testing-library/user-event": "^14.4.3",
|
||||||
"@types/html-escaper": "^3.0.0",
|
"@types/html-escaper": "^3.0.0",
|
||||||
"@types/node": "18.17.6",
|
"@types/node": "18.17.9",
|
||||||
"@types/react": "^18.2.20",
|
"@types/react": "^18.2.21",
|
||||||
"@types/react-dom": "^18.2.7",
|
"@types/react-dom": "^18.2.7",
|
||||||
"@unocss/cli": "^0.55.2",
|
"@unocss/cli": "^0.55.2",
|
||||||
"@unocss/eslint-plugin": "^0.55.2",
|
"@unocss/eslint-plugin": "^0.55.2",
|
||||||
@@ -81,18 +81,18 @@
|
|||||||
"concurrently": "^8.2.1",
|
"concurrently": "^8.2.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"happy-dom": "^10.10.4",
|
"happy-dom": "^10.11.0",
|
||||||
"hast-util-to-string": "^2.0.0",
|
"hast-util-to-string": "^2.0.0",
|
||||||
"hastscript": "^8.0.0",
|
"hastscript": "^8.0.0",
|
||||||
"html-escaper": "^3.0.3",
|
"html-escaper": "^3.0.3",
|
||||||
"lighthouse": "^11.0.0",
|
"lighthouse": "^11.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"unocss": "^0.55.2",
|
"unocss": "^0.55.2",
|
||||||
"vercel": "^32.0.0",
|
"vercel": "^32.0.1",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { Providers } from './providers';
|
|
||||||
import { inter } from '~/util/fonts';
|
import { inter } from '~/util/fonts';
|
||||||
|
import { Providers } from './providers';
|
||||||
|
|
||||||
export default function GlobalError({ error }: { readonly error: Error }) {
|
export default function GlobalError({ error }: { readonly error: Error }) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { allContents } from 'contentlayer/generated';
|
|
||||||
import { notFound } from 'next/navigation';
|
import { notFound } from 'next/navigation';
|
||||||
|
import { allContents } from 'contentlayer/generated';
|
||||||
import { Mdx } from '~/components/Mdx';
|
import { Mdx } from '~/components/Mdx';
|
||||||
|
|
||||||
export async function generateStaticParams() {
|
export async function generateStaticParams() {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
import { Providers } from './providers';
|
|
||||||
import Footer from '~/components/Footer';
|
import Footer from '~/components/Footer';
|
||||||
import Header from '~/components/Header';
|
import Header from '~/components/Header';
|
||||||
import { Nav } from '~/components/Nav';
|
import { Nav } from '~/components/Nav';
|
||||||
|
import { Providers } from './providers';
|
||||||
|
|
||||||
export default function Layout({ children }: PropsWithChildren) {
|
export default function Layout({ children }: PropsWithChildren) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Analytics } from '@vercel/analytics/react';
|
import { Analytics } from '@vercel/analytics/react';
|
||||||
import type { Metadata } from 'next';
|
import type { Metadata } from 'next';
|
||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
import { Providers } from './providers';
|
|
||||||
import { DESCRIPTION } from '~/util/constants';
|
import { DESCRIPTION } from '~/util/constants';
|
||||||
import { inter, jetBrainsMono } from '~/util/fonts';
|
import { inter, jetBrainsMono } from '~/util/fonts';
|
||||||
|
import { Providers } from './providers';
|
||||||
|
|
||||||
import '@unocss/reset/tailwind-compat.css';
|
import '@unocss/reset/tailwind-compat.css';
|
||||||
import '~/styles/unocss.css';
|
import '~/styles/unocss.css';
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
import { Alert, Section, DiscordMessages, DiscordMessage, DiscordMessageEmbed } from '@discordjs/ui';
|
import { Alert, Section, DiscordMessages, DiscordMessage, DiscordMessageEmbed } from '@discordjs/ui';
|
||||||
import { useMDXComponent } from 'next-contentlayer/hooks';
|
import { useMDXComponent } from 'next-contentlayer/hooks';
|
||||||
|
import { DocsLink } from '~/components/DocsLink';
|
||||||
|
import { ResultingCode } from '~/components/ResultingCode';
|
||||||
import { DiscordAPITypesLink } from './DiscordAPITypesLink';
|
import { DiscordAPITypesLink } from './DiscordAPITypesLink';
|
||||||
import { H1 } from './H1';
|
import { H1 } from './H1';
|
||||||
import { H2 } from './H2';
|
import { H2 } from './H2';
|
||||||
import { H3 } from './H3';
|
import { H3 } from './H3';
|
||||||
import { H4 } from './H4';
|
import { H4 } from './H4';
|
||||||
import { DocsLink } from '~/components/DocsLink';
|
|
||||||
import { ResultingCode } from '~/components/ResultingCode';
|
|
||||||
|
|
||||||
export function Mdx({ code }: { readonly code: string }) {
|
export function Mdx({ code }: { readonly code: string }) {
|
||||||
const Component = useMDXComponent(code);
|
const Component = useMDXComponent(code);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { Scrollbars } from 'react-custom-scrollbars-2';
|
import { Scrollbars } from 'react-custom-scrollbars-2';
|
||||||
import { Sidebar } from './Sidebar';
|
|
||||||
import { useNav } from '~/contexts/nav';
|
import { useNav } from '~/contexts/nav';
|
||||||
|
import { Sidebar } from './Sidebar';
|
||||||
|
|
||||||
export function Nav() {
|
export function Nav() {
|
||||||
const { opened } = useNav();
|
const { opened } = useNav();
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { allContents } from 'contentlayer/generated';
|
|
||||||
import type { Route } from 'next';
|
import type { Route } from 'next';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from 'next/navigation';
|
||||||
import { Section } from './Section';
|
import { allContents } from 'contentlayer/generated';
|
||||||
import { useNav } from '~/contexts/nav';
|
import { useNav } from '~/contexts/nav';
|
||||||
|
import { Section } from './Section';
|
||||||
|
|
||||||
const items = allContents.map((content) => ({
|
const items = allContents.map((content) => ({
|
||||||
title: content.title,
|
title: content.title,
|
||||||
|
|||||||
@@ -3,19 +3,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.js", "*.cjs", "*.mjs", "src"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,8 +79,8 @@
|
|||||||
"@next/bundle-analyzer": "^13.4.19",
|
"@next/bundle-analyzer": "^13.4.19",
|
||||||
"@testing-library/react": "^14.0.0",
|
"@testing-library/react": "^14.0.0",
|
||||||
"@testing-library/user-event": "^14.4.3",
|
"@testing-library/user-event": "^14.4.3",
|
||||||
"@types/node": "18.17.6",
|
"@types/node": "18.17.9",
|
||||||
"@types/react": "^18.2.20",
|
"@types/react": "^18.2.21",
|
||||||
"@types/react-dom": "^18.2.7",
|
"@types/react-dom": "^18.2.7",
|
||||||
"@unocss/cli": "^0.55.2",
|
"@unocss/cli": "^0.55.2",
|
||||||
"@unocss/eslint-plugin": "^0.55.2",
|
"@unocss/eslint-plugin": "^0.55.2",
|
||||||
@@ -91,14 +91,14 @@
|
|||||||
"cpy-cli": "^5.0.0",
|
"cpy-cli": "^5.0.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"happy-dom": "^10.10.4",
|
"happy-dom": "^10.11.0",
|
||||||
"lighthouse": "^11.0.0",
|
"lighthouse": "^11.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vercel": "^32.0.0",
|
"vercel": "^32.0.1",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { Analytics } from '@vercel/analytics/react';
|
import { Analytics } from '@vercel/analytics/react';
|
||||||
import { Providers } from './providers';
|
|
||||||
import { inter } from '~/util/fonts';
|
import { inter } from '~/util/fonts';
|
||||||
|
import { Providers } from './providers';
|
||||||
|
|
||||||
import '@unocss/reset/tailwind-compat.css';
|
import '@unocss/reset/tailwind-compat.css';
|
||||||
import '~/styles/unocss.css';
|
import '~/styles/unocss.css';
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { ApiModel } from '@microsoft/api-extractor-model';
|
|||||||
import dynamic from 'next/dynamic';
|
import dynamic from 'next/dynamic';
|
||||||
import { notFound } from 'next/navigation';
|
import { notFound } from 'next/navigation';
|
||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
import { Providers } from './providers';
|
|
||||||
import { fetchModelJSON, fetchVersions } from '~/app/docAPI';
|
import { fetchModelJSON, fetchVersions } from '~/app/docAPI';
|
||||||
import { Banner } from '~/components/Banner';
|
import { Banner } from '~/components/Banner';
|
||||||
import { CmdKDialog } from '~/components/CmdK';
|
import { CmdKDialog } from '~/components/CmdK';
|
||||||
@@ -12,6 +11,7 @@ import { Nav } from '~/components/Nav';
|
|||||||
import type { SidebarSectionItemData } from '~/components/Sidebar';
|
import type { SidebarSectionItemData } from '~/components/Sidebar';
|
||||||
import { resolveItemURI } from '~/components/documentation/util';
|
import { resolveItemURI } from '~/components/documentation/util';
|
||||||
import { N_RECENT_VERSIONS, PACKAGES } from '~/util/constants';
|
import { N_RECENT_VERSIONS, PACKAGES } from '~/util/constants';
|
||||||
|
import { Providers } from './providers';
|
||||||
|
|
||||||
const Header = dynamic(async () => import('~/components/Header'));
|
const Header = dynamic(async () => import('~/components/Header'));
|
||||||
const Footer = dynamic(async () => import('~/components/Footer'));
|
const Footer = dynamic(async () => import('~/components/Footer'));
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import { MDXRemote } from 'next-mdx-remote/rsc';
|
|||||||
import rehypeRaw from 'rehype-raw';
|
import rehypeRaw from 'rehype-raw';
|
||||||
import rehypeSlug from 'rehype-slug';
|
import rehypeSlug from 'rehype-slug';
|
||||||
import remarkGfm from 'remark-gfm';
|
import remarkGfm from 'remark-gfm';
|
||||||
import type { VersionRouteParams } from './layout';
|
|
||||||
import { SyntaxHighlighter } from '~/components/SyntaxHighlighter';
|
import { SyntaxHighlighter } from '~/components/SyntaxHighlighter';
|
||||||
|
import type { VersionRouteParams } from './layout';
|
||||||
|
|
||||||
async function loadREADME(packageName: string) {
|
async function loadREADME(packageName: string) {
|
||||||
return readFile(join(process.cwd(), 'src', 'assets', 'readme', packageName, 'home-README.md'), 'utf8');
|
return readFile(join(process.cwd(), 'src', 'assets', 'readme', packageName, 'home-README.md'), 'utf8');
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Analytics } from '@vercel/analytics/react';
|
import { Analytics } from '@vercel/analytics/react';
|
||||||
import type { Metadata } from 'next';
|
import type { Metadata } from 'next';
|
||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
import { Providers } from './providers';
|
|
||||||
import { DESCRIPTION } from '~/util/constants';
|
import { DESCRIPTION } from '~/util/constants';
|
||||||
import { inter, jetBrainsMono } from '~/util/fonts';
|
import { inter, jetBrainsMono } from '~/util/fonts';
|
||||||
|
import { Providers } from './providers';
|
||||||
|
|
||||||
import '@unocss/reset/tailwind-compat.css';
|
import '@unocss/reset/tailwind-compat.css';
|
||||||
import '~/styles/unocss.css';
|
import '~/styles/unocss.css';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import type { ApiModel, Excerpt } from '@microsoft/api-extractor-model';
|
import type { ApiModel, Excerpt } from '@microsoft/api-extractor-model';
|
||||||
import { ExcerptTokenKind } from '@microsoft/api-extractor-model';
|
import { ExcerptTokenKind } from '@microsoft/api-extractor-model';
|
||||||
|
import { DISCORD_API_TYPES_DOCS_URL } from '~/util/constants';
|
||||||
import { ItemLink } from './ItemLink';
|
import { ItemLink } from './ItemLink';
|
||||||
import { resolveItemURI } from './documentation/util';
|
import { resolveItemURI } from './documentation/util';
|
||||||
import { DISCORD_API_TYPES_DOCS_URL } from '~/util/constants';
|
|
||||||
|
|
||||||
export interface ExcerptTextProps {
|
export interface ExcerptTextProps {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
import dynamic from 'next/dynamic';
|
import dynamic from 'next/dynamic';
|
||||||
import { Scrollbars } from 'react-custom-scrollbars-2';
|
import { Scrollbars } from 'react-custom-scrollbars-2';
|
||||||
|
import { useNav } from '~/contexts/nav';
|
||||||
import { Sidebar } from './Sidebar';
|
import { Sidebar } from './Sidebar';
|
||||||
import type { SidebarSectionItemData } from './Sidebar';
|
import type { SidebarSectionItemData } from './Sidebar';
|
||||||
import { useNav } from '~/contexts/nav';
|
|
||||||
|
|
||||||
const PackageSelect = dynamic(async () => import('./PackageSelect'));
|
const PackageSelect = dynamic(async () => import('./PackageSelect'));
|
||||||
const VersionSelect = dynamic(async () => import('./VersionSelect'));
|
const VersionSelect = dynamic(async () => import('./VersionSelect'));
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import type { ApiDocumentedItem, ApiParameterListMixin } from '@microsoft/api-extractor-model';
|
import type { ApiDocumentedItem, ApiParameterListMixin } from '@microsoft/api-extractor-model';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
import { resolveParameters } from '~/util/model';
|
||||||
import { ExcerptText } from './ExcerptText';
|
import { ExcerptText } from './ExcerptText';
|
||||||
import { Table } from './Table';
|
import { Table } from './Table';
|
||||||
import { TSDoc } from './documentation/tsdoc/TSDoc';
|
import { TSDoc } from './documentation/tsdoc/TSDoc';
|
||||||
import { resolveParameters } from '~/util/model';
|
|
||||||
|
|
||||||
const columnStyles = {
|
const columnStyles = {
|
||||||
Name: 'font-mono whitespace-nowrap',
|
Name: 'font-mono whitespace-nowrap',
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import type {
|
|||||||
} from '@microsoft/api-extractor-model';
|
} from '@microsoft/api-extractor-model';
|
||||||
import { ApiItemKind } from '@microsoft/api-extractor-model';
|
import { ApiItemKind } from '@microsoft/api-extractor-model';
|
||||||
import { Fragment, useMemo } from 'react';
|
import { Fragment, useMemo } from 'react';
|
||||||
import { Property } from './Property';
|
|
||||||
import { resolveMembers } from '~/util/members';
|
import { resolveMembers } from '~/util/members';
|
||||||
|
import { Property } from './Property';
|
||||||
|
|
||||||
export function isPropertyLike(item: ApiItem): item is ApiProperty | ApiPropertySignature {
|
export function isPropertyLike(item: ApiItem): item is ApiProperty | ApiPropertySignature {
|
||||||
return item.kind === ApiItemKind.Property || item.kind === ApiItemKind.PropertySignature;
|
return item.kind === ApiItemKind.Property || item.kind === ApiItemKind.PropertySignature;
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod';
|
|||||||
import { VscSymbolVariable } from '@react-icons/all-files/vsc/VscSymbolVariable';
|
import { VscSymbolVariable } from '@react-icons/all-files/vsc/VscSymbolVariable';
|
||||||
import { useSelectedLayoutSegment } from 'next/navigation';
|
import { useSelectedLayoutSegment } from 'next/navigation';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
import { useNav } from '~/contexts/nav';
|
||||||
import { ItemLink } from './ItemLink';
|
import { ItemLink } from './ItemLink';
|
||||||
import { Section } from './Section';
|
import { Section } from './Section';
|
||||||
import { useNav } from '~/contexts/nav';
|
|
||||||
|
|
||||||
export interface SidebarSectionItemData {
|
export interface SidebarSectionItemData {
|
||||||
href: string;
|
href: string;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import type { ApiConstructor } from '@microsoft/api-extractor-model';
|
import type { ApiConstructor } from '@microsoft/api-extractor-model';
|
||||||
import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod';
|
import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod';
|
||||||
|
import { CodeHeading } from '~/components/CodeHeading';
|
||||||
import { ParameterTable } from '../../ParameterTable';
|
import { ParameterTable } from '../../ParameterTable';
|
||||||
import { TSDoc } from '../tsdoc/TSDoc';
|
import { TSDoc } from '../tsdoc/TSDoc';
|
||||||
import { parametersString } from '../util';
|
import { parametersString } from '../util';
|
||||||
import { DocumentationSection } from './DocumentationSection';
|
import { DocumentationSection } from './DocumentationSection';
|
||||||
import { CodeHeading } from '~/components/CodeHeading';
|
|
||||||
|
|
||||||
export function ConstructorSection({ item }: { readonly item: ApiConstructor }) {
|
export function ConstructorSection({ item }: { readonly item: ApiConstructor }) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import type {
|
|||||||
import { ApiItemKind } from '@microsoft/api-extractor-model';
|
import { ApiItemKind } from '@microsoft/api-extractor-model';
|
||||||
import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod';
|
import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod';
|
||||||
import { useMemo, Fragment } from 'react';
|
import { useMemo, Fragment } from 'react';
|
||||||
|
import { resolveMembers } from '~/util/members';
|
||||||
import { Method } from '../../model/method/Method';
|
import { Method } from '../../model/method/Method';
|
||||||
import { DocumentationSection } from './DocumentationSection';
|
import { DocumentationSection } from './DocumentationSection';
|
||||||
import { resolveMembers } from '~/util/members';
|
|
||||||
|
|
||||||
function isMethodLike(item: ApiItem): item is ApiMethod | ApiMethodSignature {
|
function isMethodLike(item: ApiItem): item is ApiMethod | ApiMethodSignature {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import type {
|
|||||||
ApiDocumentedItem,
|
ApiDocumentedItem,
|
||||||
ApiParameterListMixin,
|
ApiParameterListMixin,
|
||||||
} from '@microsoft/api-extractor-model';
|
} from '@microsoft/api-extractor-model';
|
||||||
import type { TableOfContentsSerialized } from '../TableOfContentItems';
|
|
||||||
import { METHOD_SEPARATOR, OVERLOAD_SEPARATOR } from '~/util/constants';
|
import { METHOD_SEPARATOR, OVERLOAD_SEPARATOR } from '~/util/constants';
|
||||||
import { resolveMembers } from '~/util/members';
|
import { resolveMembers } from '~/util/members';
|
||||||
import { resolveParameters } from '~/util/model';
|
import { resolveParameters } from '~/util/model';
|
||||||
|
import type { TableOfContentsSerialized } from '../TableOfContentItems';
|
||||||
|
|
||||||
export function hasProperties(item: ApiItemContainerMixin) {
|
export function hasProperties(item: ApiItemContainerMixin) {
|
||||||
return resolveMembers(item, memberPredicate).some(
|
return resolveMembers(item, memberPredicate).some(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { ApiEnumMember } from '@microsoft/api-extractor-model';
|
import type { ApiEnumMember } from '@microsoft/api-extractor-model';
|
||||||
|
import { CodeHeading } from '~/components/CodeHeading';
|
||||||
import { SignatureText } from '../../SignatureText';
|
import { SignatureText } from '../../SignatureText';
|
||||||
import { TSDoc } from '../../documentation/tsdoc/TSDoc';
|
import { TSDoc } from '../../documentation/tsdoc/TSDoc';
|
||||||
import { CodeHeading } from '~/components/CodeHeading';
|
|
||||||
|
|
||||||
export function EnumMember({ member }: { readonly member: ApiEnumMember }) {
|
export function EnumMember({ member }: { readonly member: ApiEnumMember }) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { addPackageToModel } from '@discordjs/scripts';
|
import { addPackageToModel } from '@discordjs/scripts';
|
||||||
import { ApiModel, ApiFunction } from '@microsoft/api-extractor-model';
|
import { ApiModel, ApiFunction } from '@microsoft/api-extractor-model';
|
||||||
import { notFound } from 'next/navigation';
|
import { notFound } from 'next/navigation';
|
||||||
|
import { fetchModelJSON } from '~/app/docAPI';
|
||||||
import { OVERLOAD_SEPARATOR, PACKAGES } from './constants';
|
import { OVERLOAD_SEPARATOR, PACKAGES } from './constants';
|
||||||
import { findMember, findMemberByKey } from './model';
|
import { findMember, findMemberByKey } from './model';
|
||||||
import { fetchModelJSON } from '~/app/docAPI';
|
|
||||||
|
|
||||||
export interface ItemRouteParams {
|
export interface ItemRouteParams {
|
||||||
item: string;
|
item: string;
|
||||||
|
|||||||
@@ -3,19 +3,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "scripts"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
137
eslint.config.js
137
eslint.config.js
@@ -1,3 +1,5 @@
|
|||||||
|
import { dirname } from 'node:path';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
import unocss from '@unocss/eslint-plugin';
|
import unocss from '@unocss/eslint-plugin';
|
||||||
import common from 'eslint-config-neon/flat/common.js';
|
import common from 'eslint-config-neon/flat/common.js';
|
||||||
import edge from 'eslint-config-neon/flat/edge.js';
|
import edge from 'eslint-config-neon/flat/edge.js';
|
||||||
@@ -6,74 +8,82 @@ import node from 'eslint-config-neon/flat/node.js';
|
|||||||
import prettier from 'eslint-config-neon/flat/prettier.js';
|
import prettier from 'eslint-config-neon/flat/prettier.js';
|
||||||
import react from 'eslint-config-neon/flat/react.js';
|
import react from 'eslint-config-neon/flat/react.js';
|
||||||
import typescript from 'eslint-config-neon/flat/typescript.js';
|
import typescript from 'eslint-config-neon/flat/typescript.js';
|
||||||
import deepMerge from 'ts-deepmerge';
|
import merge from 'lodash.merge';
|
||||||
|
|
||||||
const generalRuleset = Object.freeze(
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
deepMerge.withOptions({ mergeArrays: false }, ...common, ...node, ...typescript, {
|
const __dirname = dirname(__filename);
|
||||||
files: [
|
|
||||||
'{apps,packages}/**/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
const commonFiles = '{js,mjs,cjs,ts,mts,cts,jsx,tsx}';
|
||||||
'{apps,packages}/**/bin/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
|
||||||
'{apps,packages}/**/__tests__/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
const commonRuleset = merge(...common, { files: [`**/*${commonFiles}`] });
|
||||||
],
|
|
||||||
languageOptions: {
|
const nodeRuleset = merge(...node, { files: [`**/*${commonFiles}`] });
|
||||||
parserOptions: {
|
|
||||||
|
const typeScriptRuleset = merge(...typescript, {
|
||||||
|
files: [`**/*${commonFiles}`],
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
allowAutomaticSingleRunInference: true,
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
project: ['./tsconfig.eslint.json', './apps/*/tsconfig.eslint.json', './packages/*/tsconfig.eslint.json'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/consistent-type-definitions': [2, 'interface'],
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
'import/resolver': {
|
||||||
|
typescript: {
|
||||||
project: ['./tsconfig.eslint.json', './apps/*/tsconfig.eslint.json', './packages/*/tsconfig.eslint.json'],
|
project: ['./tsconfig.eslint.json', './apps/*/tsconfig.eslint.json', './packages/*/tsconfig.eslint.json'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
rules: {
|
},
|
||||||
'@typescript-eslint/consistent-type-definitions': [2, 'interface'],
|
});
|
||||||
'jsdoc/no-undefined-types': 1,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
const reactRuleset = Object.freeze(
|
const reactRuleset = merge(...react, {
|
||||||
deepMerge.withOptions({ mergeArrays: false }, generalRuleset, ...react, ...next, ...edge, {
|
files: [`apps/**/*${commonFiles}`, `packages/ui/**/*${commonFiles}`],
|
||||||
files: [
|
plugins: { '@unocss': unocss },
|
||||||
'apps/**/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
rules: {
|
||||||
'apps/**/bin/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
'@unocss/order': 2,
|
||||||
'apps/**/__tests__/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
'@next/next/no-html-link-for-pages': 0,
|
||||||
'packages/ui/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
'react/react-in-jsx-scope': 0,
|
||||||
],
|
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
|
||||||
plugins: {
|
},
|
||||||
'@unocss': unocss,
|
});
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
'@unocss/order': 2,
|
|
||||||
'@next/next/no-html-link-for-pages': 0,
|
|
||||||
'react/react-in-jsx-scope': 0,
|
|
||||||
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
|
|
||||||
},
|
|
||||||
settings: {
|
|
||||||
react: {
|
|
||||||
version: 'detect',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
const prettierRuleset = Object.freeze(
|
const nextRuleset = merge(...next, { files: [`apps/**/*${commonFiles}`] });
|
||||||
deepMerge.withOptions({ mergeArrays: false }, ...prettier, {
|
|
||||||
files: [
|
const edgeRuleset = merge(...edge, { files: [`apps/**/*${commonFiles}`] });
|
||||||
'{apps,packages}/**/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
|
||||||
'{apps,packages}/**/bin/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
const prettierRuleset = merge(...prettier, { files: [`**/*${commonFiles}`] });
|
||||||
'{apps,packages}/**/__tests__/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
/** @type {import('eslint').Linter.FlatConfig[]} */
|
/** @type {import('eslint').Linter.FlatConfig[]} */
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
ignores: ['**/.next', '**/coverage', '**/dist', '**/node_modules', '**/.contentlayer', '**/template'],
|
ignores: [
|
||||||
},
|
'**/node_modules/',
|
||||||
generalRuleset,
|
'.git/',
|
||||||
reactRuleset,
|
'**/dist/',
|
||||||
{
|
'**/template/',
|
||||||
files: [
|
'**/coverage/',
|
||||||
'packages/rest/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
'**/storybook-static/',
|
||||||
'packages/rest/__tests__/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
'**/.next/',
|
||||||
|
'packages/discord.js/',
|
||||||
],
|
],
|
||||||
|
},
|
||||||
|
commonRuleset,
|
||||||
|
nodeRuleset,
|
||||||
|
typeScriptRuleset,
|
||||||
|
{
|
||||||
|
files: ['**/*{ts,mts,cts,tsx}'],
|
||||||
|
rules: { 'jsdoc/no-undefined-types': 0 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: [`packages/docgen/**/*${commonFiles}`],
|
||||||
|
rules: { 'import/extensions': 0 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: [`packages/rest/**/*${commonFiles}`],
|
||||||
rules: {
|
rules: {
|
||||||
'n/prefer-global/url': 0,
|
'n/prefer-global/url': 0,
|
||||||
'n/prefer-global/url-search-params': 0,
|
'n/prefer-global/url-search-params': 0,
|
||||||
@@ -84,15 +94,18 @@ export default [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
files: [
|
files: [`packages/voice/**/*${commonFiles}`],
|
||||||
'packages/voice/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
|
||||||
'packages/voice/__tests__/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
|
||||||
'packages/voice/__mocks__/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}',
|
|
||||||
],
|
|
||||||
rules: {
|
rules: {
|
||||||
'import/extensions': 0,
|
'import/extensions': 0,
|
||||||
'no-restricted-globals': 0,
|
'no-restricted-globals': 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
nextRuleset,
|
||||||
|
edgeRuleset,
|
||||||
|
reactRuleset,
|
||||||
|
{
|
||||||
|
files: ['**/*{js,mjs,cjs,jsx}'],
|
||||||
|
rules: { 'tsdoc/syntax': 0 },
|
||||||
|
},
|
||||||
prettierRuleset,
|
prettierRuleset,
|
||||||
];
|
];
|
||||||
|
|||||||
12
package.json
12
package.json
@@ -21,7 +21,7 @@
|
|||||||
"docs:affected": "turbo run docs --filter='...[origin/main]' --parallel",
|
"docs:affected": "turbo run docs --filter='...[origin/main]' --parallel",
|
||||||
"postinstall": "is-ci || husky install",
|
"postinstall": "is-ci || husky install",
|
||||||
"update": "yarn upgrade-interactive",
|
"update": "yarn upgrade-interactive",
|
||||||
"create-package": "node packages/scripts/src/packageScript.mjs"
|
"create-package": "turbo gen create-package"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
@@ -52,19 +52,20 @@
|
|||||||
"@commitlint/config-angular": "^17.7.0",
|
"@commitlint/config-angular": "^17.7.0",
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@favware/npm-deprecate": "^1.0.7",
|
"@favware/npm-deprecate": "^1.0.7",
|
||||||
|
"@types/lodash.merge": "^4.6.7",
|
||||||
"@unocss/eslint-plugin": "^0.55.2",
|
"@unocss/eslint-plugin": "^0.55.2",
|
||||||
"conventional-changelog-cli": "^3.0.0",
|
"conventional-changelog-cli": "^3.0.0",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"is-ci": "^3.0.1",
|
"is-ci": "^3.0.1",
|
||||||
"lint-staged": "^14.0.1",
|
"lint-staged": "^14.0.1",
|
||||||
"ts-deepmerge": "^6.2.0",
|
"lodash.merge": "^4.6.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"unocss": "^0.55.2",
|
"unocss": "^0.55.2",
|
||||||
"vercel": "^32.0.0",
|
"vercel": "^32.0.1",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
@@ -76,6 +77,7 @@
|
|||||||
"@contentlayer/utils/@opentelemetry/semantic-conventions": "^1.15.1",
|
"@contentlayer/utils/@opentelemetry/semantic-conventions": "^1.15.1",
|
||||||
"@microsoft/tsdoc-config@~0.16.1": "patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch",
|
"@microsoft/tsdoc-config@~0.16.1": "patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch",
|
||||||
"@microsoft/tsdoc-config@0.16.2": "patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch",
|
"@microsoft/tsdoc-config@0.16.2": "patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch",
|
||||||
|
"eslint-plugin-import@npm:eslint-plugin-i@latest": "patch:eslint-plugin-i@npm%3A2.28.0-2#./.yarn/patches/eslint-plugin-i-npm-2.28.0-2-4a8edfc1f1.patch",
|
||||||
"yaml@2.2.2": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch",
|
"yaml@2.2.2": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch",
|
||||||
"yaml@^2.2.2": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch",
|
"yaml@^2.2.2": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch",
|
||||||
"yaml@^1.10.2": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch",
|
"yaml@^1.10.2": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch",
|
||||||
|
|||||||
@@ -47,15 +47,15 @@
|
|||||||
"undici": "5.23.0"
|
"undici": "5.23.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "__tests__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,14 +49,14 @@
|
|||||||
"@microsoft/tsdoc": "0.14.2"
|
"@microsoft/tsdoc": "0.14.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6"
|
"typescript": "^5.1.6"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
/** @type {import('prettier').Config} */
|
||||||
module.exports = require('../../.prettierrc.json');
|
module.exports = require('../../.prettierrc.json');
|
||||||
|
|||||||
@@ -73,15 +73,15 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "scripts", "__tests__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,17 +75,17 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"downlevel-dts": "^0.11.0",
|
"downlevel-dts": "^0.11.0",
|
||||||
"esbuild-plugin-version-injector": "^1.2.0",
|
"esbuild-plugin-version-injector": "^1.2.0",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "__tests__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,16 +62,16 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"esbuild-plugin-version-injector": "^1.2.0",
|
"esbuild-plugin-version-injector": "^1.2.0",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "__tests__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,16 +75,16 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "18.17.6",
|
"@types/node": "18.17.9",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"esbuild-plugin-version-injector": "^1.2.0",
|
"esbuild-plugin-version-injector": "^1.2.0",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,13 +56,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"@types/prompts": "^2.4.4",
|
"@types/prompts": "^2.4.4",
|
||||||
"@types/validate-npm-package-name": "^4.0.0",
|
"@types/validate-npm-package-name": "^4.0.0",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"terser": "^5.19.2",
|
"terser": "^5.19.2",
|
||||||
|
|||||||
@@ -4,6 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts", "**/*.js", "**/*.test.ts", "**/*.test.js"],
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src"]
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts", "**/*.js", "**/*.test.ts", "**/*.test.js"],
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "bin"]
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,18 +4,6 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "bin", "template"],
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": ["template/Deno"]
|
"exclude": ["template/Deno"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/lintstagedrc.schema.json",
|
"$schema": "https://json.schemastore.org/lintstagedrc.schema.json",
|
||||||
"*": "prettier --ignore-unknown --write",
|
"*": "prettier --ignore-unknown --write",
|
||||||
"{src/**,test/**,typings/**,scripts/**}.{mjs,js,ts}": "eslint --ext mjs,js,ts --fix"
|
"{src/**,test/**,typings/**,scripts/**}.{mjs,js,ts}": "cross-env ESLINT_USE_FLAT_CONFIG=false eslint --ext mjs,js,ts --fix"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@discordjs/docgen": "workspace:^",
|
"@discordjs/docgen": "workspace:^",
|
||||||
"@favware/cliff-jumper": "2.1.1",
|
"@favware/cliff-jumper": "2.1.1",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"dtslint": "4.2.1",
|
"dtslint": "4.2.1",
|
||||||
"eslint": "8.47.0",
|
"eslint": "8.47.0",
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"prettier": "3.0.2",
|
"prettier": "3.0.2",
|
||||||
"tsd": "0.28.1",
|
"tsd": "0.28.1",
|
||||||
"tslint": "6.1.3",
|
"tslint": "6.1.3",
|
||||||
"turbo": "1.10.12",
|
"turbo": "1.10.13",
|
||||||
"typescript": "5.1.6"
|
"typescript": "5.1.6"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -6,6 +6,21 @@
|
|||||||
"pretty": false,
|
"pretty": false,
|
||||||
|
|
||||||
// Completeness
|
// Completeness
|
||||||
"skipDefaultLibCheck": true
|
"skipDefaultLibCheck": true,
|
||||||
|
|
||||||
|
"types": [
|
||||||
|
"@discordjs/builders",
|
||||||
|
"@discordjs/util",
|
||||||
|
"@discordjs/collection",
|
||||||
|
"@discordjs/rest",
|
||||||
|
"@discordjs/ws",
|
||||||
|
"discord-api-types/v10",
|
||||||
|
"node",
|
||||||
|
"ws",
|
||||||
|
"tsd",
|
||||||
|
"jest",
|
||||||
|
"undici",
|
||||||
|
"@sapphire/snowflake"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,14 +65,14 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@types/jsdoc-to-markdown": "^7.0.3",
|
"@types/jsdoc-to-markdown": "^7.0.3",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6"
|
"typescript": "^5.1.6"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "bin"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,15 +59,15 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "__tests__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,16 +76,16 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "18.17.6",
|
"@types/node": "18.17.9",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"esbuild-plugin-version-injector": "^1.2.0",
|
"esbuild-plugin-version-injector": "^1.2.0",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "__tests__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,14 +49,14 @@
|
|||||||
"tslib": "^2.6.2"
|
"tslib": "^2.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "18.17.6",
|
"@types/node": "18.17.9",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6"
|
"typescript": "^5.1.6"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
/** @type {import('prettier').Config} */
|
||||||
module.exports = require('../../.prettierrc.json');
|
module.exports = require('../../.prettierrc.json');
|
||||||
|
|||||||
@@ -72,17 +72,17 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "18.17.6",
|
"@types/node": "18.17.9",
|
||||||
"@types/supertest": "^2.0.12",
|
"@types/supertest": "^2.0.12",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"supertest": "^6.3.3",
|
"supertest": "^6.3.3",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "__tests__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,16 +95,16 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "18.17.6",
|
"@types/node": "18.17.9",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"esbuild-plugin-version-injector": "^1.2.0",
|
"esbuild-plugin-version-injector": "^1.2.0",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "__tests__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,18 @@
|
|||||||
module.exports = require('../../.prettierrc.json');
|
/** @type {import('prettier').Config} */
|
||||||
|
module.exports = {
|
||||||
|
...require('../../.prettierrc.json'),
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: 'turbo/generators/templates/{.cliff-jumperrc.json.hbs,api-extractor.json.hbs,package.json.hbs}',
|
||||||
|
options: {
|
||||||
|
parser: 'json',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: 'turbo/generators/templates/{.lintstagedrc.js.hbs,.prettierrc.js.hbs}',
|
||||||
|
options: {
|
||||||
|
parser: 'babel',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup",
|
"build": "tsup",
|
||||||
"lint": "prettier --check . && cross-env TIMING=1 eslint --format=pretty src",
|
"lint": "prettier --check . && cross-env TIMING=1 eslint --format=pretty src turbo",
|
||||||
"format": "prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src",
|
"format": "prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src turbo",
|
||||||
"fmt": "yarn format"
|
"fmt": "yarn format"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
@@ -56,23 +56,21 @@
|
|||||||
"@microsoft/api-extractor-model": "7.27.6",
|
"@microsoft/api-extractor-model": "7.27.6",
|
||||||
"@microsoft/tsdoc": "0.14.2",
|
"@microsoft/tsdoc": "0.14.2",
|
||||||
"@microsoft/tsdoc-config": "0.16.2",
|
"@microsoft/tsdoc-config": "0.16.2",
|
||||||
"commander": "^11.0.0",
|
|
||||||
"fs-extra": "^11.1.1",
|
|
||||||
"tslib": "^2.6.2",
|
"tslib": "^2.6.2",
|
||||||
"undici": "5.23.0",
|
"undici": "5.23.0",
|
||||||
"yaml": "2.3.1"
|
"yaml": "2.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/fs-extra": "^11.0.1",
|
"@turbo/gen": "^1.10.13",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,104 +0,0 @@
|
|||||||
import { mkdir, writeFile, readFile } from 'node:fs/promises';
|
|
||||||
import { join } from 'node:path';
|
|
||||||
import { chdir } from 'node:process';
|
|
||||||
import { copy } from 'fs-extra';
|
|
||||||
import { parse as parseYAML, stringify as stringifyYAML } from 'yaml';
|
|
||||||
import cliffJumperJSON from './template/.cliff-jumperrc.json';
|
|
||||||
import apiExtractorJSON from './template/api-extractor.json';
|
|
||||||
import templateJSON from './template/template.package.json';
|
|
||||||
|
|
||||||
interface LabelerData {
|
|
||||||
color: string;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
function sortYAMLObject(yaml: Record<string, string[]>) {
|
|
||||||
const sortedYAML: typeof yaml = {};
|
|
||||||
for (const key of Object.keys(yaml).sort((a, b) => a.localeCompare(b))) sortedYAML[key] = yaml[key]!;
|
|
||||||
return sortedYAML;
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function createPackage(packageName: string, packageDescription?: string) {
|
|
||||||
const packageDir = join('packages', packageName);
|
|
||||||
|
|
||||||
// Make directory for package
|
|
||||||
await mkdir(packageDir);
|
|
||||||
|
|
||||||
// Change to subdirectory
|
|
||||||
chdir(packageDir);
|
|
||||||
|
|
||||||
// Create folder structure
|
|
||||||
await Promise.all([mkdir('src'), mkdir('__tests__')]);
|
|
||||||
|
|
||||||
const templateDir = join('..', 'scripts', 'src', 'template');
|
|
||||||
|
|
||||||
// Create files
|
|
||||||
await writeFile(join('src', 'index.ts'), `console.log('Hello, from @discordjs/${packageName}');`);
|
|
||||||
await writeFile('.eslintrc.json', await readFile(join(templateDir, 'template.eslintrc.json'), 'utf8'));
|
|
||||||
await writeFile('.gitignore', await readFile(join(templateDir, 'template.gitignore'), 'utf8'));
|
|
||||||
await writeFile('.lintstagedrc.js', await readFile(join(templateDir, 'template.lintstagedrc.js'), 'utf8'));
|
|
||||||
await writeFile('.prettierignore', await readFile(join(templateDir, 'template.prettierignore'), 'utf8'));
|
|
||||||
await writeFile('.prettierrc.js', await readFile(join(templateDir, 'template.prettierrc.js'), 'utf8'));
|
|
||||||
|
|
||||||
const packageJSON = {
|
|
||||||
...templateJSON,
|
|
||||||
name: templateJSON.name.replace('{name}', packageName),
|
|
||||||
description: packageDescription ?? '',
|
|
||||||
};
|
|
||||||
|
|
||||||
// Edit changelog script
|
|
||||||
packageJSON.scripts.changelog = packageJSON.scripts.changelog.replace('{name}', packageName);
|
|
||||||
|
|
||||||
// Edit repository directory
|
|
||||||
packageJSON.repository.directory = packageJSON.repository.directory.replace('{name}', packageName);
|
|
||||||
|
|
||||||
// Create package.json
|
|
||||||
await writeFile(`package.json`, JSON.stringify(packageJSON, null, 2));
|
|
||||||
|
|
||||||
// Update cliff.toml
|
|
||||||
const cliffTOML = (await readFile(join(templateDir, 'cliff.toml'), 'utf8')).replace('{name}', packageName);
|
|
||||||
|
|
||||||
await writeFile('cliff.toml', cliffTOML);
|
|
||||||
|
|
||||||
// Update .cliff-jumperrc.json
|
|
||||||
const newCliffJumperJSON = { ...cliffJumperJSON, name: packageName, packagePath: `packages/${packageName}` };
|
|
||||||
|
|
||||||
await writeFile('.cliff-jumperrc.json', JSON.stringify(newCliffJumperJSON, null, 2));
|
|
||||||
|
|
||||||
// Update api-extractor.json
|
|
||||||
const newApiExtractorJSON = { ...apiExtractorJSON };
|
|
||||||
newApiExtractorJSON.docModel.projectFolderUrl = newApiExtractorJSON.docModel.projectFolderUrl.replace(
|
|
||||||
'{name}',
|
|
||||||
packageName,
|
|
||||||
);
|
|
||||||
|
|
||||||
await writeFile('api-extractor.json', JSON.stringify(newApiExtractorJSON, null, 2));
|
|
||||||
|
|
||||||
// Move to github directory
|
|
||||||
chdir(join('..', '..', '.github'));
|
|
||||||
|
|
||||||
const labelsYAML = parseYAML(await readFile('labels.yml', 'utf8')) as LabelerData[];
|
|
||||||
labelsYAML.push({ name: `packages:${packageName}`, color: 'fbca04' });
|
|
||||||
|
|
||||||
labelsYAML.sort((a, b) => a.name.localeCompare(b.name));
|
|
||||||
|
|
||||||
await writeFile('labels.yml', stringifyYAML(labelsYAML));
|
|
||||||
|
|
||||||
const labelerYAML = parseYAML(await readFile('labeler.yml', 'utf8')) as Record<string, string[]>;
|
|
||||||
labelerYAML[`packages:${packageName}`] = [`packages/${packageName}/*`, `packages/${packageName}/**/*`];
|
|
||||||
|
|
||||||
await writeFile('labeler.yml', stringifyYAML(sortYAMLObject(labelerYAML)));
|
|
||||||
|
|
||||||
const issueLabelerYAML = parseYAML(await readFile('issue-labeler.yml', 'utf8')) as Record<string, string[]>;
|
|
||||||
issueLabelerYAML[`packages:${packageName}`] = [
|
|
||||||
`### Which (application|package|application or package) is this (bug report|feature request) for\\?\\n\\n${packageName}\\n`,
|
|
||||||
];
|
|
||||||
|
|
||||||
await writeFile('issue-labeler.yml', stringifyYAML(sortYAMLObject(issueLabelerYAML)));
|
|
||||||
|
|
||||||
// Move back to root
|
|
||||||
chdir('..');
|
|
||||||
|
|
||||||
// Copy default files over
|
|
||||||
await copy(join('packages', 'scripts', 'src', 'template', 'default'), packageDir);
|
|
||||||
}
|
|
||||||
@@ -1,2 +1 @@
|
|||||||
export * from './generateIndex.js';
|
export * from './generateIndex.js';
|
||||||
export * from './createPackage.js';
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
import { program } from 'commander';
|
|
||||||
import { createPackage } from '../dist/index.mjs';
|
|
||||||
|
|
||||||
program
|
|
||||||
.description('A script for creating discord.js packages.')
|
|
||||||
.argument('<name>', 'The name of the new package.')
|
|
||||||
.argument('[description]', 'The description of the new package.');
|
|
||||||
program.parse();
|
|
||||||
|
|
||||||
const [packageName, description] = program.args;
|
|
||||||
|
|
||||||
console.log(`Creating package @discordjs/${packageName}...`);
|
|
||||||
await createPackage(packageName, description);
|
|
||||||
console.log('Done!');
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "",
|
|
||||||
"org": "discordjs",
|
|
||||||
"packagePath": ""
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../api-extractor.json",
|
|
||||||
"docModel": {
|
|
||||||
"projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/{name}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://json.schemastore.org/tsconfig.json",
|
|
||||||
"extends": "./tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"allowJs": true
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../.eslintrc.json"
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Packages
|
|
||||||
node_modules
|
|
||||||
|
|
||||||
# Log files
|
|
||||||
logs
|
|
||||||
*.log
|
|
||||||
npm-debug.log*
|
|
||||||
|
|
||||||
# Runtime data
|
|
||||||
pids
|
|
||||||
*.pid
|
|
||||||
*.seed
|
|
||||||
|
|
||||||
# Env
|
|
||||||
.env
|
|
||||||
|
|
||||||
# Dist
|
|
||||||
dist
|
|
||||||
dist-docs
|
|
||||||
|
|
||||||
# Docs
|
|
||||||
docs/**/*
|
|
||||||
!docs/README.md
|
|
||||||
|
|
||||||
# Miscellaneous
|
|
||||||
.turbo
|
|
||||||
.tmp
|
|
||||||
coverage
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
.turbo
|
|
||||||
coverage
|
|
||||||
dist
|
|
||||||
dist-docs
|
|
||||||
docs/docs.api.json
|
|
||||||
CHANGELOG.md
|
|
||||||
@@ -4,17 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "turbo"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
93
packages/scripts/turbo/generators/config.ts
Normal file
93
packages/scripts/turbo/generators/config.ts
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
import { writeFile } from 'node:fs/promises';
|
||||||
|
import type { PlopTypes } from '@turbo/gen';
|
||||||
|
import { parse as parseYAML, stringify as stringifyYAML } from 'yaml';
|
||||||
|
|
||||||
|
interface LabelerData {
|
||||||
|
color: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sortYAMLObject(yaml: Record<string, string[]>) {
|
||||||
|
const sortedYAML: typeof yaml = {};
|
||||||
|
for (const key of Object.keys(yaml).sort((a, b) => a.localeCompare(b))) sortedYAML[key] = yaml[key]!;
|
||||||
|
return sortedYAML;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function generator(plop: PlopTypes.NodePlopAPI): void {
|
||||||
|
plop.setGenerator('create-package', {
|
||||||
|
description: '',
|
||||||
|
prompts: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
name: 'name',
|
||||||
|
message: 'The name of the new package',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
name: 'description',
|
||||||
|
message: 'The description of the new package.',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
type: 'add',
|
||||||
|
path: `${plop.getDestBasePath()}/../{{name}}/src/index.ts`,
|
||||||
|
template: "console.log('Hello, from @discordjs/{{name}}');",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'add',
|
||||||
|
path: `${plop.getDestBasePath()}/../{{name}}/__tests__/.gitkeep`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'addMany',
|
||||||
|
destination: `${plop.getDestBasePath()}/../{{name}}`,
|
||||||
|
templateFiles: ['templates/**'],
|
||||||
|
globOptions: { dot: true },
|
||||||
|
base: 'templates/default/',
|
||||||
|
stripExtensions: ['hbs'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'modify',
|
||||||
|
path: `${plop.getDestBasePath()}/turbo/generators/templates/cliff.toml`,
|
||||||
|
async transform(content, answers) {
|
||||||
|
const cliffTOML = content.replace('{{name}}', answers.name);
|
||||||
|
await writeFile(`${plop.getDestBasePath()}/../${answers.name}/cliff.toml`, cliffTOML);
|
||||||
|
return content;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'modify',
|
||||||
|
path: `${plop.getDestBasePath()}/../../.github/labels.yml`,
|
||||||
|
transform(content, answers) {
|
||||||
|
const labelsYAML = parseYAML(content) as LabelerData[];
|
||||||
|
labelsYAML.push({ name: `packages:${answers.name}`, color: 'fbca04' });
|
||||||
|
labelsYAML.sort((a, b) => a.name.localeCompare(b.name));
|
||||||
|
|
||||||
|
return stringifyYAML(labelsYAML);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'modify',
|
||||||
|
path: `${plop.getDestBasePath()}/../../.github/labeler.yml`,
|
||||||
|
transform(content, answers) {
|
||||||
|
const labelerYAML = parseYAML(content) as Record<string, string[]>;
|
||||||
|
labelerYAML[`packages:${answers.name}`] = [`packages/${answers.name}/*`, `packages/${answers.name}/**/*`];
|
||||||
|
|
||||||
|
return stringifyYAML(sortYAMLObject(labelerYAML));
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'modify',
|
||||||
|
path: `${plop.getDestBasePath()}/../../.github/issue-labeler.yml`,
|
||||||
|
transform(content, answers) {
|
||||||
|
const issueLabelerYAML = parseYAML(content) as Record<string, string[]>;
|
||||||
|
issueLabelerYAML[`packages:${answers.name}`] = [
|
||||||
|
`### Which (application|package|application or package) is this (bug report|feature request) for\\?\\n\\n${answers.name}\\n`,
|
||||||
|
];
|
||||||
|
|
||||||
|
return stringifyYAML(sortYAMLObject(issueLabelerYAML));
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{ "name": "{{name}}", "org": "discordjs", "packagePath": "packages/{{name}}" }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Packages node_modules # Log files logs *.log npm-debug.log* # Runtime data pids *.pid *.seed # Env .env # Dist dist
|
||||||
|
dist-docs # Docs docs/**/* !docs/README.md # Miscellaneous .turbo .tmp coverage
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.turbo coverage dist dist-docs docs/docs.api.json CHANGELOG.md
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../api-extractor.json",
|
||||||
|
"docModel": { "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/{{name}}" }
|
||||||
|
}
|
||||||
@@ -57,7 +57,7 @@ commit_parsers = [
|
|||||||
{ body = ".*security", group = "Security"},
|
{ body = ".*security", group = "Security"},
|
||||||
]
|
]
|
||||||
filter_commits = true
|
filter_commits = true
|
||||||
tag_pattern = "@discordjs/{name}@[0-9]*"
|
tag_pattern = "@discordjs/{{name}}@[0-9]*"
|
||||||
ignore_tags = ""
|
ignore_tags = ""
|
||||||
topo_order = true
|
topo_order = true
|
||||||
sort_commits = "newest"
|
sort_commits = "newest"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig.json",
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowJs": true
|
||||||
|
},
|
||||||
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "__tests__"]
|
||||||
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
import { createTsupConfig } from '../../tsup.config.js';
|
import { createTsupConfig } from '../../tsup.config.js';
|
||||||
|
|
||||||
export default createTsupConfig({});
|
export default createTsupConfig();
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@discordjs/{name}",
|
"name": "@discordjs/{{name}}",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "",
|
"description": "{{description}}",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"build": "tsup",
|
"build": "tsup",
|
||||||
@@ -10,17 +10,24 @@
|
|||||||
"format": "prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src __tests__",
|
"format": "prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src __tests__",
|
||||||
"docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json",
|
"docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json",
|
||||||
"prepack": "yarn build && yarn lint",
|
"prepack": "yarn build && yarn lint",
|
||||||
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/{name}/*'",
|
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/{{name}}/*'",
|
||||||
"release": "cliff-jumper"
|
"release": "cliff-jumper"
|
||||||
},
|
},
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"require": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
},
|
||||||
|
"import": {
|
||||||
|
"types": "./dist/index.d.mts",
|
||||||
|
"default": "./dist/index.mjs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"exports": {
|
|
||||||
"types": "./dist/index.d.ts",
|
|
||||||
"import": "./dist/index.mjs",
|
|
||||||
"require": "./dist/index.js"
|
|
||||||
},
|
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "src",
|
"lib": "src",
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
@@ -37,7 +44,7 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/discordjs/discord.js.git",
|
"url": "https://github.com/discordjs/discord.js.git",
|
||||||
"directory": "packages/{name}"
|
"directory": "packages/{{name}}"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/discordjs/discord.js/issues"
|
"url": "https://github.com/discordjs/discord.js/issues"
|
||||||
@@ -47,11 +54,11 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.42",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.47",
|
"eslint-config-neon": "^0.1.54",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
@@ -1 +1,2 @@
|
|||||||
|
/** @type {import('prettier').Config} */
|
||||||
export * from '../../.prettierrc.json' assert { type: 'json' };
|
export * from '../../.prettierrc.json' assert { type: 'json' };
|
||||||
|
|||||||
@@ -67,8 +67,8 @@
|
|||||||
"@storybook/react": "^7.3.2",
|
"@storybook/react": "^7.3.2",
|
||||||
"@storybook/react-vite": "^7.3.2",
|
"@storybook/react-vite": "^7.3.2",
|
||||||
"@storybook/testing-library": "^0.2.0",
|
"@storybook/testing-library": "^0.2.0",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"@types/react": "^18.2.20",
|
"@types/react": "^18.2.21",
|
||||||
"@types/react-dom": "^18.2.7",
|
"@types/react-dom": "^18.2.7",
|
||||||
"@unocss/eslint-plugin": "^0.55.2",
|
"@unocss/eslint-plugin": "^0.55.2",
|
||||||
"@unocss/reset": "^0.55.2",
|
"@unocss/reset": "^0.55.2",
|
||||||
@@ -77,12 +77,12 @@
|
|||||||
"chromatic": "^6.23.0",
|
"chromatic": "^6.23.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"storybook": "^7.3.2",
|
"storybook": "^7.3.2",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"unocss": "^0.55.2",
|
"unocss": "^0.55.2",
|
||||||
"vite": "^4.4.9",
|
"vite": "^4.4.9",
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", ".storybook"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,16 +63,16 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsd": "^0.28.1",
|
"tsd": "^0.28.1",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vitest": "^0.34.2"
|
"vitest": "^0.34.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "__tests__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,19 +74,19 @@
|
|||||||
"@babel/preset-typescript": "^7.22.5",
|
"@babel/preset-typescript": "^7.22.5",
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/jest": "^29.5.3",
|
"@types/jest": "^29.5.4",
|
||||||
"@types/node": "16.18.41",
|
"@types/node": "16.18.44",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"esbuild-plugin-version-injector": "^1.2.0",
|
"esbuild-plugin-version-injector": "^1.2.0",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"jest": "^29.6.3",
|
"jest": "^29.6.3",
|
||||||
"jest-websocket-mock": "^2.4.1",
|
"jest-websocket-mock": "^2.4.1",
|
||||||
"mock-socket": "^9.2.1",
|
"mock-socket": "^9.2.1",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"tweetnacl": "^1.0.3",
|
"tweetnacl": "^1.0.3",
|
||||||
"typescript": "^5.1.6"
|
"typescript": "^5.1.6"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "scripts", "__tests__", "__mocks__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,17 +85,17 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@favware/cliff-jumper": "^2.1.1",
|
"@favware/cliff-jumper": "^2.1.1",
|
||||||
"@microsoft/api-extractor": "^7.36.4",
|
"@microsoft/api-extractor": "^7.36.4",
|
||||||
"@types/node": "18.17.6",
|
"@types/node": "18.17.9",
|
||||||
"@vitest/coverage-v8": "^0.34.2",
|
"@vitest/coverage-v8": "^0.34.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"esbuild-plugin-version-injector": "^1.2.0",
|
"esbuild-plugin-version-injector": "^1.2.0",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-neon": "^0.1.54",
|
"eslint-config-neon": "^0.1.56",
|
||||||
"eslint-formatter-pretty": "^5.0.0",
|
"eslint-formatter-pretty": "^5.0.0",
|
||||||
"mock-socket": "^9.2.1",
|
"mock-socket": "^9.2.1",
|
||||||
"prettier": "^3.0.2",
|
"prettier": "^3.0.2",
|
||||||
"tsup": "^7.2.0",
|
"tsup": "^7.2.0",
|
||||||
"turbo": "^1.10.12",
|
"turbo": "^1.10.13",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"undici": "5.23.0",
|
"undici": "5.23.0",
|
||||||
"vitest": "^0.34.2",
|
"vitest": "^0.34.2",
|
||||||
|
|||||||
@@ -4,18 +4,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["*.ts", "*.tsx", "*.js", "*.cjs", "*.mjs", "src", "__tests__"]
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
"**/*.jsx",
|
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.js",
|
|
||||||
"**/*.test.mjs",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.spec.js",
|
|
||||||
"**/*.spec.mjs"
|
|
||||||
],
|
|
||||||
"exclude": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user