Skip to content

Commit ed791dd

Browse files
committed
feat: bump all files to GitHub 🎉
TriggerReactor wiki bot is a Discord bot which resource slash command interactions to assist with TriggerReactor development.
0 parents  commit ed791dd

29 files changed

Lines changed: 5236 additions & 0 deletions

.commitlintrc.cjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const [OFF, WARN, ERROR] = [0, 1, 2]
2+
3+
module.exports = {
4+
extends: [
5+
`@commitlint/config-angular`
6+
],
7+
rules: {
8+
'type-enum': [
9+
ERROR,
10+
`always`,
11+
[`chore`, `build`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, `test`, `types`, `typings`, `wip`]
12+
],
13+
'scope-case': [OFF]
14+
}
15+
}

.editorconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{js,ts,mjs}]
10+
indent_size = 2
11+
indent_style = space
12+
block_comment_start = /*
13+
block_comment = *
14+
block_comment_end = */
15+
max_line_length = 100
16+
17+
[*.{yml,yaml}]
18+
indent_size = 2
19+
indent_style = space
20+
21+
[*.{md,markdown}]
22+
tab_width = 4
23+
trim_trailing_whitespace = false

.env.sample

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
DISCORD_TOKEN = 'Insert Discord bot token here'
2+
3+
BASE_URL = 'https://github.com/TriggerReactor/TriggerReactor/wiki/'
4+
DATA_DIR = data
5+
TARGET_GIT_TO_SYNC = 'https://github.com/TriggerReactor/TriggerReactor.wiki.git'
6+
7+
FUZZILY_DOCS_SEARCH_THRESHOLD = 0.3
8+
9+
COMMAND_GUILD_IDS =

.eslintrc.cjs

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
const [OFF, WARN, ERROR] = [0, 1, 2]
2+
const [ALWAYS, NEVER] = [`always`, `never`]
3+
4+
/**
5+
* @typedef ESLintAdvancedLinterOptions
6+
* @property {'@typescript-eslint-parser'} parser
7+
* @property {import('@typescript-eslint/parser').ParserOptions} parserOptions
8+
*
9+
* @typedef {import('eslint/lib/shared/types').ConfigData} ESLintBaseLinterOptions
10+
* @typedef {ESLintBaseLinterOptions & ESLintAdvancedLinterOptions} ESLintOptions
11+
*/
12+
13+
/** @type {ESLintOptions} */
14+
module.exports = {
15+
env: {
16+
es6: true,
17+
node: true
18+
},
19+
extends: [
20+
'eslint:recommended',
21+
'plugin:node/recommended',
22+
'plugin:import/typescript',
23+
'plugin:eslint-comments/recommended',
24+
'plugin:@typescript-eslint/recommended',
25+
'plugin:prettier/recommended'
26+
],
27+
overrides: [
28+
{
29+
files: [`*.?({m,c})ts`],
30+
rules: {
31+
'@typescript-eslint/explicit-function-return-type': [
32+
ERROR,
33+
{
34+
allowExpressions: true,
35+
allowHigherOrderFunctions: false
36+
}
37+
],
38+
'@typescript-eslint/explicit-member-accessibility': [ERROR],
39+
'@typescript-eslint/explicit-module-boundary-types': [
40+
ERROR,
41+
{
42+
allowArgumentsExplicitlyTypedAsAny: true
43+
}
44+
]
45+
}
46+
}
47+
],
48+
parser: `@typescript-eslint/parser`,
49+
parserOptions: {
50+
ecmaFeatures: {
51+
experimentalObjectRestSpread: true
52+
},
53+
ecmaVersion: 2022,
54+
project: `tsconfig.eslint.json`,
55+
sourceType: `module`,
56+
tsconfigRootDir: __dirname
57+
},
58+
plugins: [
59+
`@typescript-eslint`,
60+
`node`,
61+
`simple-import-sort`,
62+
`sort-keys-fix`,
63+
`import`,
64+
`prettier`
65+
],
66+
root: true,
67+
rules: {
68+
'@typescript-eslint/array-type': [
69+
ERROR,
70+
{
71+
default: `array-simple`,
72+
readonly: `generic`
73+
}
74+
],
75+
'@typescript-eslint/class-literal-property-style': [ERROR, `fields`],
76+
'@typescript-eslint/consistent-type-assertions': [ERROR],
77+
'@typescript-eslint/consistent-type-definitions': [ERROR, `interface`],
78+
'@typescript-eslint/consistent-type-imports': [
79+
ERROR,
80+
{
81+
disallowTypeAnnotations: false
82+
}
83+
],
84+
'@typescript-eslint/explicit-function-return-type': [OFF],
85+
'@typescript-eslint/explicit-member-accessibility': [OFF],
86+
'@typescript-eslint/explicit-module-boundary-types': [OFF],
87+
'@typescript-eslint/member-delimiter-style': [
88+
ERROR,
89+
{
90+
multiline: {
91+
delimiter: `none`,
92+
requireLast: false
93+
}
94+
}
95+
],
96+
'@typescript-eslint/member-ordering': [ERROR],
97+
/** {@link https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md Docs} */
98+
'@typescript-eslint/naming-convention': [
99+
ERROR,
100+
{
101+
format: [`camelCase`],
102+
selector: `default`
103+
},
104+
{
105+
format: [`camelCase`, `PascalCase`, `UPPER_CASE`],
106+
selector: `variable`
107+
},
108+
{
109+
format: [`camelCase`, `PascalCase`],
110+
selector: `enumMember`
111+
},
112+
{
113+
format: [`PascalCase`],
114+
prefix: [`is`, `should`, `has`, `can`, `did`, `will`],
115+
selector: `variable`,
116+
types: [`boolean`]
117+
},
118+
{
119+
format: [`camelCase`],
120+
leadingUnderscore: `allow`,
121+
selector: `parameter`
122+
},
123+
{
124+
format: [`camelCase`, `PascalCase`, `UPPER_CASE`],
125+
selector: `classProperty`
126+
},
127+
{
128+
format: [`camelCase`, `PascalCase`, `UPPER_CASE`],
129+
selector: `objectLiteralProperty`
130+
},
131+
{
132+
format: [`StrictPascalCase`],
133+
selector: `typeLike`
134+
}
135+
],
136+
137+
'@typescript-eslint/no-base-to-string': [ERROR],
138+
'@typescript-eslint/no-confusing-non-null-assertion': [ERROR],
139+
'@typescript-eslint/no-confusing-void-expression': [
140+
ERROR,
141+
{
142+
ignoreArrowShorthand: true,
143+
ignoreVoidOperator: true
144+
}
145+
],
146+
'@typescript-eslint/no-dynamic-delete': [WARN],
147+
'@typescript-eslint/no-explicit-any': [WARN],
148+
'@typescript-eslint/no-extraneous-class': [
149+
ERROR,
150+
{
151+
allowStaticOnly: true
152+
}
153+
],
154+
'@typescript-eslint/no-inferrable-types': [
155+
ERROR,
156+
{
157+
ignoreParameters: true
158+
}
159+
],
160+
'@typescript-eslint/no-invalid-void-type': [ERROR],
161+
'@typescript-eslint/no-meaningless-void-operator': [ERROR],
162+
'@typescript-eslint/no-namespace': [OFF],
163+
'@typescript-eslint/no-non-null-assertion': [OFF],
164+
// '@typescript-eslint/no-non-null-asserted-nullish-coalescing': [ERROR],
165+
'@typescript-eslint/no-require-imports': [ERROR],
166+
// '@typescript-eslint/no-type-alias': [
167+
// ERROR,
168+
// {
169+
// allowAliases: 'in-unions-and-intersections',
170+
// allowCallbacks: 'always',
171+
// allowConditionalTypes: 'always',
172+
// allowLiterals: 'in-unions-and-intersections',
173+
// allowMappedTypes: 'in-unions-and-intersections',
174+
// allowTupleTypes: 'in-unions',
175+
// allowGenerics: 'always'
176+
// }
177+
// ],
178+
'@typescript-eslint/no-unnecessary-boolean-literal-compare': [
179+
ERROR,
180+
{
181+
allowComparingNullableBooleansToFalse: false,
182+
allowComparingNullableBooleansToTrue: false
183+
}
184+
],
185+
'@typescript-eslint/no-unnecessary-condition': [ERROR],
186+
'@typescript-eslint/prefer-readonly': [ERROR],
187+
'eslint-comments/no-use': [
188+
ERROR,
189+
{
190+
allow: [
191+
`eslint-disable`,
192+
`eslint-disable-line`,
193+
`eslint-disable-next-line`,
194+
`eslint-enable`
195+
]
196+
}
197+
],
198+
'eslint-comments/disable-enable-pair': [OFF],
199+
'import/first': [ERROR],
200+
'import/newline-after-import': [ERROR],
201+
'import/no-absolute-path': [ERROR],
202+
'import/no-amd': [ERROR],
203+
'import/no-commonjs': [ERROR],
204+
// 'import/no-default-export': [ERROR],
205+
'import/no-deprecated': [ERROR],
206+
'import/no-duplicates': [ERROR],
207+
// 'import/no-anonymous-default-export': [
208+
// ERROR,
209+
// {
210+
// allowArray: true,
211+
// allowArrayFunction: true,
212+
// allowAnonymousFunction: true
213+
// }
214+
// ],
215+
'import/no-extraneous-dependencies': [
216+
ERROR,
217+
{
218+
devDependencies: [`**/*.test.?([mc])ts`]
219+
}
220+
],
221+
'import/no-mutable-exports': [ERROR],
222+
// 'import/no-namespace': [WARN],
223+
// 'import/order': [ERROR, { 'newlines-between': 'always' }],
224+
'no-tabs': [ERROR, { allowIndentationTabs: false }],
225+
'node/no-missing-import': [OFF],
226+
'node/no-unpublished-import': [OFF],
227+
'node/no-unsupported-features/es-syntax': [OFF],
228+
'node/prefer-promises/dns': [ERROR],
229+
'node/prefer-promises/fs': [ERROR],
230+
'simple-import-sort/exports': [ERROR],
231+
'simple-import-sort/imports': [ERROR],
232+
'sort-keys-fix/sort-keys-fix': [ERROR, `asc`, { natural: true }]
233+
}
234+
}

.gitignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Cached data
11+
data/
12+
13+
# Build distributions
14+
dist/
15+
16+
# Diagnostic reports (https://nodejs.org/api/report.html)
17+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
18+
19+
# Runtime data
20+
pids
21+
*.pid
22+
*.seed
23+
*.pid.lock
24+
25+
# Compiled binary addons (https://nodejs.org/api/addons.html)
26+
build/Release
27+
28+
# Dependency directories
29+
node_modules/
30+
jspm_packages/
31+
32+
# TypeScript cache
33+
*.tsbuildinfo
34+
35+
# Optional npm cache directory
36+
.npm
37+
38+
# Optional eslint cache
39+
.eslintcache
40+
41+
# Optional REPL history
42+
.node_repl_history
43+
44+
# Output of 'npm pack'
45+
*.tgz
46+
47+
# dotenv environment variable files
48+
.env
49+
.env.development.local
50+
.env.test.local
51+
.env.production.local
52+
.env.local
53+
54+
# Stores VSCode versions used for testing VSCode extensions
55+
.vscode-test
56+
.vscode/*
57+
!.vscode/extensions.json
58+
!.vscode/settings.json

.lintstagedrc.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
"src/**/*.ts": [
3+
"eslint --fix",
4+
"prettier --write"
5+
],
6+
}

.prettierrc.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/** @type {import('prettier').Options} */
2+
module.exports = {
3+
parser: `typescript`,
4+
semi: false,
5+
useTabs: false,
6+
singleQuote: true,
7+
tabWidth: 2,
8+
printWidth: 100,
9+
endOfLine: `lf`,
10+
quoteProps: `as-needed`,
11+
arrowParens: `avoid`,
12+
bracketSpacing: true,
13+
trailingComma: `none`
14+
}

.simple-git-hooks.cjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @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
3+
*
4+
* @type {Record<GitHooks, String>}
5+
*/
6+
module.exports = {
7+
"pre-commit": "pnpm exec lint-staged --quiet",
8+
"commit-msg": "pnpm exec commitlint --edit"
9+
}

.vscode/settings.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"editor.formatOnSave": false,
3+
"editor.codeActionsOnSave": {
4+
"source.organizeImports": false
5+
},
6+
"typescript.tsdk": "node_modules/typescript/lib",
7+
"files.exclude": {
8+
"**/.git": true,
9+
"**/.svn": true,
10+
"**/.hg": true,
11+
"**/CVS": true,
12+
"**/.DS_Store": true,
13+
"**/Thumbs.db": true,
14+
"**/node_modules": true,
15+
"**/.turbo": true,
16+
"**/dist": true
17+
}
18+
}

0 commit comments

Comments
 (0)