-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
72 changed files
with
427 additions
and
530 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/lintstagedrc.schema.json", | ||
"*": "prettier --ignore-unknown --write", | ||
"{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx}": "eslint --ext .mjs,.js,.cjs,.ts,.tsx --fix", | ||
"{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx}": "eslint --fix", | ||
"src/**.ts": "vitest related --run --config ../../vitest.config.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import unocss from '@unocss/eslint-plugin'; | ||
import common from 'eslint-config-neon/flat/common.js'; | ||
import edge from 'eslint-config-neon/flat/edge.js'; | ||
import next from 'eslint-config-neon/flat/next.js'; | ||
import node from 'eslint-config-neon/flat/node.js'; | ||
import prettier from 'eslint-config-neon/flat/prettier.js'; | ||
import react from 'eslint-config-neon/flat/react.js'; | ||
import typescript from 'eslint-config-neon/flat/typescript.js'; | ||
import deepMerge from 'ts-deepmerge'; | ||
|
||
const generalRuleset = Object.freeze( | ||
deepMerge.withOptions({ mergeArrays: false }, ...common, ...node, ...typescript, { | ||
files: [ | ||
'{apps,packages}/**/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
'{apps,packages}/**/bin/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
'{apps,packages}/**/__tests__/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
], | ||
languageOptions: { | ||
parserOptions: { | ||
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( | ||
deepMerge.withOptions({ mergeArrays: false }, generalRuleset, ...react, ...next, ...edge, { | ||
files: [ | ||
'apps/**/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
'apps/**/bin/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
'apps/**/__tests__/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
'packages/ui/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
], | ||
plugins: { | ||
'@unocss': unocss, | ||
}, | ||
rules: { | ||
'@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( | ||
deepMerge.withOptions({ mergeArrays: false }, ...prettier, { | ||
files: [ | ||
'{apps,packages}/**/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
'{apps,packages}/**/bin/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
'{apps,packages}/**/__tests__/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
], | ||
}), | ||
); | ||
|
||
/** @type {import('eslint').Linter.FlatConfig[]} */ | ||
export default [ | ||
{ | ||
ignores: ['**/.next', '**/coverage', '**/dist', '**/node_modules', '**/.contentlayer', '**/template'], | ||
}, | ||
generalRuleset, | ||
reactRuleset, | ||
{ | ||
files: [ | ||
'packages/rest/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
'packages/rest/__tests__/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}', | ||
], | ||
rules: { | ||
'n/prefer-global/url': 0, | ||
'n/prefer-global/url-search-params': 0, | ||
'n/prefer-global/buffer': 0, | ||
'n/prefer-global/process': 0, | ||
'no-restricted-globals': 0, | ||
'unicorn/prefer-node-protocol': 0, | ||
}, | ||
}, | ||
{ | ||
files: [ | ||
'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: { | ||
'import/extensions': 0, | ||
'no-restricted-globals': 0, | ||
}, | ||
}, | ||
prettierRuleset, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
d37632d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
discord-js-guide – ./apps/guide
discord-js-guide-discordjs.vercel.app
discord-js-guide.vercel.app
next.discordjs.guide
guide.discordjs.dev
discord-js-guide-git-main-discordjs.vercel.app
d37632d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
discord-js – ./apps/website
discord-js-discordjs.vercel.app
discord-js-number-one.vercel.app
discord.js.org
discord-js-git-main-discordjs.vercel.app
discordjs.dev
www.discordjs.dev