-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TriggerReactor wiki bot is a Discord bot which resource slash command interactions to assist with TriggerReactor development.
- Loading branch information
0 parents
commit ed791dd
Showing
29 changed files
with
5,236 additions
and
0 deletions.
There are no files selected for viewing
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,15 @@ | ||
const [OFF, WARN, ERROR] = [0, 1, 2] | ||
|
||
module.exports = { | ||
extends: [ | ||
`@commitlint/config-angular` | ||
], | ||
rules: { | ||
'type-enum': [ | ||
ERROR, | ||
`always`, | ||
[`chore`, `build`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, `test`, `types`, `typings`, `wip`] | ||
], | ||
'scope-case': [OFF] | ||
} | ||
} |
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,23 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{js,ts,mjs}] | ||
indent_size = 2 | ||
indent_style = space | ||
block_comment_start = /* | ||
block_comment = * | ||
block_comment_end = */ | ||
max_line_length = 100 | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[*.{md,markdown}] | ||
tab_width = 4 | ||
trim_trailing_whitespace = false |
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,9 @@ | ||
DISCORD_TOKEN = 'Insert Discord bot token here' | ||
|
||
BASE_URL = 'https://github.com/TriggerReactor/TriggerReactor/wiki/' | ||
DATA_DIR = data | ||
TARGET_GIT_TO_SYNC = 'https://github.com/TriggerReactor/TriggerReactor.wiki.git' | ||
|
||
FUZZILY_DOCS_SEARCH_THRESHOLD = 0.3 | ||
|
||
COMMAND_GUILD_IDS = |
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,234 @@ | ||
const [OFF, WARN, ERROR] = [0, 1, 2] | ||
const [ALWAYS, NEVER] = [`always`, `never`] | ||
|
||
/** | ||
* @typedef ESLintAdvancedLinterOptions | ||
* @property {'@typescript-eslint-parser'} parser | ||
* @property {import('@typescript-eslint/parser').ParserOptions} parserOptions | ||
* | ||
* @typedef {import('eslint/lib/shared/types').ConfigData} ESLintBaseLinterOptions | ||
* @typedef {ESLintBaseLinterOptions & ESLintAdvancedLinterOptions} ESLintOptions | ||
*/ | ||
|
||
/** @type {ESLintOptions} */ | ||
module.exports = { | ||
env: { | ||
es6: true, | ||
node: true | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:node/recommended', | ||
'plugin:import/typescript', | ||
'plugin:eslint-comments/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended' | ||
], | ||
overrides: [ | ||
{ | ||
files: [`*.?({m,c})ts`], | ||
rules: { | ||
'@typescript-eslint/explicit-function-return-type': [ | ||
ERROR, | ||
{ | ||
allowExpressions: true, | ||
allowHigherOrderFunctions: false | ||
} | ||
], | ||
'@typescript-eslint/explicit-member-accessibility': [ERROR], | ||
'@typescript-eslint/explicit-module-boundary-types': [ | ||
ERROR, | ||
{ | ||
allowArgumentsExplicitlyTypedAsAny: true | ||
} | ||
] | ||
} | ||
} | ||
], | ||
parser: `@typescript-eslint/parser`, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
experimentalObjectRestSpread: true | ||
}, | ||
ecmaVersion: 2022, | ||
project: `tsconfig.eslint.json`, | ||
sourceType: `module`, | ||
tsconfigRootDir: __dirname | ||
}, | ||
plugins: [ | ||
`@typescript-eslint`, | ||
`node`, | ||
`simple-import-sort`, | ||
`sort-keys-fix`, | ||
`import`, | ||
`prettier` | ||
], | ||
root: true, | ||
rules: { | ||
'@typescript-eslint/array-type': [ | ||
ERROR, | ||
{ | ||
default: `array-simple`, | ||
readonly: `generic` | ||
} | ||
], | ||
'@typescript-eslint/class-literal-property-style': [ERROR, `fields`], | ||
'@typescript-eslint/consistent-type-assertions': [ERROR], | ||
'@typescript-eslint/consistent-type-definitions': [ERROR, `interface`], | ||
'@typescript-eslint/consistent-type-imports': [ | ||
ERROR, | ||
{ | ||
disallowTypeAnnotations: false | ||
} | ||
], | ||
'@typescript-eslint/explicit-function-return-type': [OFF], | ||
'@typescript-eslint/explicit-member-accessibility': [OFF], | ||
'@typescript-eslint/explicit-module-boundary-types': [OFF], | ||
'@typescript-eslint/member-delimiter-style': [ | ||
ERROR, | ||
{ | ||
multiline: { | ||
delimiter: `none`, | ||
requireLast: false | ||
} | ||
} | ||
], | ||
'@typescript-eslint/member-ordering': [ERROR], | ||
/** {@link https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md Docs} */ | ||
'@typescript-eslint/naming-convention': [ | ||
ERROR, | ||
{ | ||
format: [`camelCase`], | ||
selector: `default` | ||
}, | ||
{ | ||
format: [`camelCase`, `PascalCase`, `UPPER_CASE`], | ||
selector: `variable` | ||
}, | ||
{ | ||
format: [`camelCase`, `PascalCase`], | ||
selector: `enumMember` | ||
}, | ||
{ | ||
format: [`PascalCase`], | ||
prefix: [`is`, `should`, `has`, `can`, `did`, `will`], | ||
selector: `variable`, | ||
types: [`boolean`] | ||
}, | ||
{ | ||
format: [`camelCase`], | ||
leadingUnderscore: `allow`, | ||
selector: `parameter` | ||
}, | ||
{ | ||
format: [`camelCase`, `PascalCase`, `UPPER_CASE`], | ||
selector: `classProperty` | ||
}, | ||
{ | ||
format: [`camelCase`, `PascalCase`, `UPPER_CASE`], | ||
selector: `objectLiteralProperty` | ||
}, | ||
{ | ||
format: [`StrictPascalCase`], | ||
selector: `typeLike` | ||
} | ||
], | ||
|
||
'@typescript-eslint/no-base-to-string': [ERROR], | ||
'@typescript-eslint/no-confusing-non-null-assertion': [ERROR], | ||
'@typescript-eslint/no-confusing-void-expression': [ | ||
ERROR, | ||
{ | ||
ignoreArrowShorthand: true, | ||
ignoreVoidOperator: true | ||
} | ||
], | ||
'@typescript-eslint/no-dynamic-delete': [WARN], | ||
'@typescript-eslint/no-explicit-any': [WARN], | ||
'@typescript-eslint/no-extraneous-class': [ | ||
ERROR, | ||
{ | ||
allowStaticOnly: true | ||
} | ||
], | ||
'@typescript-eslint/no-inferrable-types': [ | ||
ERROR, | ||
{ | ||
ignoreParameters: true | ||
} | ||
], | ||
'@typescript-eslint/no-invalid-void-type': [ERROR], | ||
'@typescript-eslint/no-meaningless-void-operator': [ERROR], | ||
'@typescript-eslint/no-namespace': [OFF], | ||
'@typescript-eslint/no-non-null-assertion': [OFF], | ||
// '@typescript-eslint/no-non-null-asserted-nullish-coalescing': [ERROR], | ||
'@typescript-eslint/no-require-imports': [ERROR], | ||
// '@typescript-eslint/no-type-alias': [ | ||
// ERROR, | ||
// { | ||
// allowAliases: 'in-unions-and-intersections', | ||
// allowCallbacks: 'always', | ||
// allowConditionalTypes: 'always', | ||
// allowLiterals: 'in-unions-and-intersections', | ||
// allowMappedTypes: 'in-unions-and-intersections', | ||
// allowTupleTypes: 'in-unions', | ||
// allowGenerics: 'always' | ||
// } | ||
// ], | ||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': [ | ||
ERROR, | ||
{ | ||
allowComparingNullableBooleansToFalse: false, | ||
allowComparingNullableBooleansToTrue: false | ||
} | ||
], | ||
'@typescript-eslint/no-unnecessary-condition': [ERROR], | ||
'@typescript-eslint/prefer-readonly': [ERROR], | ||
'eslint-comments/no-use': [ | ||
ERROR, | ||
{ | ||
allow: [ | ||
`eslint-disable`, | ||
`eslint-disable-line`, | ||
`eslint-disable-next-line`, | ||
`eslint-enable` | ||
] | ||
} | ||
], | ||
'eslint-comments/disable-enable-pair': [OFF], | ||
'import/first': [ERROR], | ||
'import/newline-after-import': [ERROR], | ||
'import/no-absolute-path': [ERROR], | ||
'import/no-amd': [ERROR], | ||
'import/no-commonjs': [ERROR], | ||
// 'import/no-default-export': [ERROR], | ||
'import/no-deprecated': [ERROR], | ||
'import/no-duplicates': [ERROR], | ||
// 'import/no-anonymous-default-export': [ | ||
// ERROR, | ||
// { | ||
// allowArray: true, | ||
// allowArrayFunction: true, | ||
// allowAnonymousFunction: true | ||
// } | ||
// ], | ||
'import/no-extraneous-dependencies': [ | ||
ERROR, | ||
{ | ||
devDependencies: [`**/*.test.?([mc])ts`] | ||
} | ||
], | ||
'import/no-mutable-exports': [ERROR], | ||
// 'import/no-namespace': [WARN], | ||
// 'import/order': [ERROR, { 'newlines-between': 'always' }], | ||
'no-tabs': [ERROR, { allowIndentationTabs: false }], | ||
'node/no-missing-import': [OFF], | ||
'node/no-unpublished-import': [OFF], | ||
'node/no-unsupported-features/es-syntax': [OFF], | ||
'node/prefer-promises/dns': [ERROR], | ||
'node/prefer-promises/fs': [ERROR], | ||
'simple-import-sort/exports': [ERROR], | ||
'simple-import-sort/imports': [ERROR], | ||
'sort-keys-fix/sort-keys-fix': [ERROR, `asc`, { natural: true }] | ||
} | ||
} |
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,58 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Cached data | ||
data/ | ||
|
||
# Build distributions | ||
dist/ | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
.vscode/* | ||
!.vscode/extensions.json | ||
!.vscode/settings.json |
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,6 @@ | ||
module.exports = { | ||
"src/**/*.ts": [ | ||
"eslint --fix", | ||
"prettier --write" | ||
], | ||
} |
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,14 @@ | ||
/** @type {import('prettier').Options} */ | ||
module.exports = { | ||
parser: `typescript`, | ||
semi: false, | ||
useTabs: false, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
printWidth: 100, | ||
endOfLine: `lf`, | ||
quoteProps: `as-needed`, | ||
arrowParens: `avoid`, | ||
bracketSpacing: true, | ||
trailingComma: `none` | ||
} |
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,9 @@ | ||
/** | ||
* @typedef {'applypatch-msg' | 'pre-applypatch' | 'post-applypatch' | 'pre-commit' | 'pre-merge-commit' | 'prepare-commit-msg' | 'commit-msg' | 'post-commit' | 'pre-rebase' | 'post-checkout' | 'post-merge' | 'pre-push' | 'pre-receive' | 'update' | 'proc-receive' | 'post-receive' | 'post-update' | 'reference-transaction' | 'push-to-checkout' | 'pre-auto-gc' | 'post-rewrite' | 'sendemail-validate' | 'fsmonitor-watchman' | 'p4-changelist' | 'p4-prepare-changelist' | 'p4-post-changelist' | 'p4-pre-submit' | 'post-index-change'} GitHooks | ||
* | ||
* @type {Record<GitHooks, String>} | ||
*/ | ||
module.exports = { | ||
"pre-commit": "pnpm exec lint-staged --quiet", | ||
"commit-msg": "pnpm exec commitlint --edit" | ||
} |
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,18 @@ | ||
{ | ||
"editor.formatOnSave": false, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": false | ||
}, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true, | ||
"**/node_modules": true, | ||
"**/.turbo": true, | ||
"**/dist": true | ||
} | ||
} |
Oops, something went wrong.