Skip to content

Commit

Permalink
Run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Kruhlmann committed Oct 31, 2023
1 parent c64955e commit 2641573
Show file tree
Hide file tree
Showing 11 changed files with 911 additions and 775 deletions.
39 changes: 39 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = {
parser: "@typescript-eslint/parser",
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"./node_modules/gts/",
"plugin:unicorn/recommended",
],
env: {
es6: true,
jest: true,
},
parserOptions: {
ecmaVersion: 2019,
sourceType: "module",
},
plugins: ["eslint-plugin-tsdoc", "unicorn", "simple-import-sort", "import"],
rules: {
indent: ["warn", 4, { SwitchCase: 1 }],
quotes: ["warn", "double"],
radix: "error",
complexity: ["error", 2],
"node/no-unpublished-import": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-unused-vars": [2, { args: "none" }],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/prefer-interface": "off",
"@typescript-eslint/indent": "off",
"tsdoc/syntax": "error",
"unicorn/filename-case": "off",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"max-len": ["warn", { code: 120 }],
},
};
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ lint: node_modules
$(ESLINT) $(TS_SOURCES) $(TEST_SOURCES)

fix: node_modules
$(ESLINT) $(TS_SOURCES) $(TEST_SOURCES)
$(ESLINT) --fix $(TS_SOURCES) $(TEST_SOURCES)

dev: node_modules data.json
$(TSC_WATCH) $(TSC_WATCH_FLAGS)
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,17 @@ To have an item linked simply type the name of the item in the `/item` command.
Typing a partial name will give you autocomplete suggestions.

![Showcase](doc/showcase.png)

### Docker compose file

```yml
version: '3'
services:
classicdb_bot:
image: cr.kruhlmann.dev/classicdb_bot
environment:
- CLASSICDB_BOT_TOKEN=<your_bot_token>
- CLASSICDB_BOT_CLIENT_ID=<your_client_id>
- CLASSICDB_BOT_PROD=1
- CLASSICDB_BOT_DISCORD_REST_VERSION=9
```
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.1.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-unicorn": "^42.0.0",
"gts": "^3.1.0",
"jest": "^28.1.1",
Expand Down
Loading

0 comments on commit 2641573

Please sign in to comment.