Skip to content

Commit 1e3aed0

Browse files
committed
chore: config overhaul
1 parent 5d7c59c commit 1e3aed0

File tree

131 files changed

+353
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+353
-114
lines changed

.commitlintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/commitlintrc.json",
23
"extends": ["@commitlint/config-angular"],
34
"rules": {
45
"type-enum": [

.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"root": true,
34
"extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"],
45
"parserOptions": {

.github/workflows/issue-triage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
issue-triage:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: github/issue-labeler@v3.1
9+
- uses: github/issue-labeler@v3.2
1010
with:
1111
repo-token: '${{ secrets.GITHUB_TOKEN }}'
1212
configuration-path: .github/issue-labeler.yml

.github/workflows/lighthouse-main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
- name: Audit production URLs with Lighthouse
1313
id: lighthouse_audit
14-
uses: treosh/lighthouse-ci-action@v9
14+
uses: treosh/lighthouse-ci-action@v10
1515
with:
1616
urls: |
1717
https://discordjs.dev

.github/workflows/lighthouse.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Audit preview URL with Lighthouse
4444
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
4545
id: lighthouse_audit
46-
uses: treosh/lighthouse-ci-action@v9
46+
uses: treosh/lighthouse-ci-action@v10
4747
with:
4848
urls: |
4949
${{ steps.get_preview_url.outputs.vercel_preview_url }}

.lintstagedrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/lintstagedrc.schema.json",
23
"*": "prettier --ignore-unknown --write",
34
"{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx}": "eslint --ext .mjs,.js,.cjs,.ts,.tsx --fix",
45
"src/**.ts": "vitest related --run --config ../../vitest.config.ts"

.prettierrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/prettierrc.json",
23
"printWidth": 120,
34
"useTabs": true,
45
"singleQuote": true,

apps/guide/.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"extends": ["../../.eslintrc.json", "neon/react", "neon/next", "neon/edge", "@unocss", "neon/prettier"],
34
"settings": {
45
"react": {

apps/guide/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/package.json",
23
"name": "@discordjs/guide",
34
"version": "0.1.0",
45
"description": "Imagine a guide... that explores the many possibilities for your discord.js bot",

apps/website/.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"extends": ["../../.eslintrc.json", "neon/react", "neon/next", "neon/edge", "@unocss", "neon/prettier"],
34
"settings": {
45
"react": {

apps/website/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/package.json",
23
"name": "@discordjs/website",
34
"version": "0.1.0",
45
"description": "Imagine a bot... the most popular way to build discord bots",

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/package.json",
23
"name": "@discordjs/discord.js",
34
"version": "0.0.0",
45
"description": "A powerful library for interacting with the Discord API",

packages/actions/.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"extends": "../../.eslintrc.json"
34
}

packages/actions/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/package.json",
23
"name": "@discordjs/actions",
34
"version": "0.1.0",
45
"description": "A set of actions that we use for our workflows",
@@ -11,8 +12,6 @@
1112
"fmt": "yarn format"
1213
},
1314
"type": "module",
14-
"main": "./dist/index.mjs",
15-
"types": "./dist/index.d.ts",
1615
"directories": {
1716
"lib": "src",
1817
"test": "__tests__"

packages/actions/tsconfig.eslint.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "./tsconfig.json",
34
"compilerOptions": {
45
"allowJs": true

packages/actions/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "../../tsconfig.json",
34
"include": ["src/**/*.ts"]
45
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"extends": "../../.eslintrc.json"
34
}

packages/api-extractor-utils/package.json

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/package.json",
23
"name": "@discordjs/api-extractor-utils",
34
"version": "1.0.0",
45
"description": "Utilities for api-extractor",
@@ -9,6 +10,18 @@
910
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --fix --format=pretty",
1011
"fmt": "yarn format"
1112
},
13+
"exports": {
14+
".": {
15+
"require": {
16+
"types": "./dist/index.d.ts",
17+
"default": "./dist/index.js"
18+
},
19+
"import": {
20+
"types": "./dist/index.d.mts",
21+
"default": "./dist/index.mjs"
22+
}
23+
}
24+
},
1225
"main": "./dist/index.js",
1326
"module": "./dist/index.mjs",
1427
"types": "./dist/index.d.ts",

packages/api-extractor-utils/tsconfig.eslint.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "./tsconfig.json",
34
"compilerOptions": {
45
"allowJs": true

packages/api-extractor-utils/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "../../tsconfig.json",
34
"compilerOptions": {
45
"skipDefaultLibCheck": true,

packages/brokers/.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"extends": "../../.eslintrc.json"
34
}

packages/brokers/package.json

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/package.json",
23
"name": "@discordjs/brokers",
34
"version": "0.2.2",
45
"description": "Powerful set of message brokers",
@@ -14,14 +15,21 @@
1415
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/brokers/*'",
1516
"release": "cliff-jumper"
1617
},
17-
"main": "./dist/index.js",
18-
"module": "./dist/index.mjs",
19-
"typings": "./dist/index.d.ts",
2018
"exports": {
21-
"types": "./dist/index.d.ts",
22-
"import": "./dist/index.mjs",
23-
"require": "./dist/index.js"
19+
".": {
20+
"require": {
21+
"types": "./dist/index.d.ts",
22+
"default": "./dist/index.js"
23+
},
24+
"import": {
25+
"types": "./dist/index.d.mts",
26+
"default": "./dist/index.mjs"
27+
}
28+
}
2429
},
30+
"main": "./dist/index.js",
31+
"module": "./dist/index.mjs",
32+
"types": "./dist/index.d.ts",
2533
"directories": {
2634
"lib": "src",
2735
"test": "__tests__"

packages/brokers/tsconfig.docs.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "../../tsconfig.docs.json",
34
"include": ["src/**/*.ts"],
45
"compilerOptions": {

packages/brokers/tsconfig.eslint.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "./tsconfig.json",
34
"compilerOptions": {
45
"allowJs": true

packages/brokers/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "../../tsconfig.json",
34
"include": ["src/**/*.ts"]
45
}

packages/builders/.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"extends": "../../.eslintrc.json"
34
}

packages/builders/package.json

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/package.json",
23
"name": "@discordjs/builders",
34
"version": "1.6.5",
45
"description": "A set of builders that you can use when creating your bot",
@@ -14,14 +15,21 @@
1415
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/builders/*'",
1516
"release": "cliff-jumper"
1617
},
18+
"exports": {
19+
".": {
20+
"require": {
21+
"types": "./dist/index.d.ts",
22+
"default": "./dist/index.js"
23+
},
24+
"import": {
25+
"types": "./dist/index.d.mts",
26+
"default": "./dist/index.mjs"
27+
}
28+
}
29+
},
1730
"main": "./dist/index.js",
1831
"module": "./dist/index.mjs",
1932
"types": "./dist/index.d.ts",
20-
"exports": {
21-
"types": "./dist/index.d.ts",
22-
"import": "./dist/index.mjs",
23-
"require": "./dist/index.js"
24-
},
2533
"directories": {
2634
"lib": "src",
2735
"test": "__tests__"

packages/builders/tsconfig.docs.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "../../tsconfig.docs.json",
34
"include": ["src/**/*.ts"],
45
"compilerOptions": {

packages/builders/tsconfig.eslint.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "./tsconfig.json",
34
"compilerOptions": {
45
"allowJs": true

packages/builders/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "../../tsconfig.json",
34
"compilerOptions": {
45
"emitDecoratorMetadata": true,

packages/collection/.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"extends": "../../.eslintrc.json"
34
}

packages/collection/package.json

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/package.json",
23
"name": "@discordjs/collection",
34
"version": "1.5.3",
45
"description": "Utility data structure used in discord.js",
@@ -14,14 +15,21 @@
1415
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/collection/*'",
1516
"release": "cliff-jumper"
1617
},
18+
"exports": {
19+
".": {
20+
"require": {
21+
"types": "./dist/index.d.ts",
22+
"default": "./dist/index.js"
23+
},
24+
"import": {
25+
"types": "./dist/index.d.mts",
26+
"default": "./dist/index.mjs"
27+
}
28+
}
29+
},
1730
"main": "./dist/index.js",
1831
"module": "./dist/index.mjs",
1932
"types": "./dist/index.d.ts",
20-
"exports": {
21-
"types": "./dist/index.d.ts",
22-
"import": "./dist/index.mjs",
23-
"require": "./dist/index.js"
24-
},
2533
"directories": {
2634
"lib": "src",
2735
"test": "__tests__"

packages/collection/tsconfig.docs.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "../../tsconfig.docs.json",
34
"include": ["src/**/*.ts"],
45
"compilerOptions": {

packages/collection/tsconfig.eslint.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "./tsconfig.json",
34
"compilerOptions": {
45
"allowJs": true

packages/collection/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "../../tsconfig.json",
34
"include": ["src/**/*.ts"]
45
}

packages/core/.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"extends": "../../.eslintrc.json"
34
}

packages/core/package.json

+20-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/package.json",
23
"name": "@discordjs/core",
34
"version": "1.0.1",
45
"description": "A thinly abstracted wrapper around the rest API, and gateway.",
@@ -13,21 +14,31 @@
1314
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/core/*'",
1415
"release": "cliff-jumper"
1516
},
16-
"main": "./dist/index.js",
17-
"module": "./dist/index.mjs",
18-
"typings": "./dist/index.d.ts",
1917
"exports": {
2018
".": {
21-
"types": "./dist/index.d.ts",
22-
"import": "./dist/index.mjs",
23-
"require": "./dist/index.js"
19+
"require": {
20+
"types": "./dist/index.d.ts",
21+
"default": "./dist/index.js"
22+
},
23+
"import": {
24+
"types": "./dist/index.d.mts",
25+
"default": "./dist/index.mjs"
26+
}
2427
},
2528
"./http-only": {
26-
"types": "./dist/http-only.d.ts",
27-
"import": "./dist/http-only.mjs",
28-
"require": "./dist/http-only.js"
29+
"require": {
30+
"types": "./dist/http-only.d.ts",
31+
"default": "./dist/http-only.js"
32+
},
33+
"import": {
34+
"types": "./dist/http-only.d.mts",
35+
"default": "./dist/http-only.mjs"
36+
}
2937
}
3038
},
39+
"main": "./dist/index.js",
40+
"module": "./dist/index.mjs",
41+
"types": "./dist/index.d.ts",
3142
"directories": {
3243
"lib": "src",
3344
"test": "__tests__"

packages/core/tsconfig.docs.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "../../tsconfig.docs.json",
34
"include": ["src/**/*.ts"],
45
"compilerOptions": {

packages/core/tsconfig.eslint.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "./tsconfig.json",
34
"compilerOptions": {
45
"allowJs": true

packages/core/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
23
"extends": "../../tsconfig.json",
34
"include": ["src/**/*.ts"]
45
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"extends": "../../.eslintrc.json",
34
"ignorePatterns": ["**/template/Deno/*"]
45
}

0 commit comments

Comments
 (0)