Skip to content

Commit

Permalink
Merge pull request #17 from wolfendale/ts-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbarrow authored Jul 16, 2024
2 parents 1fbfbb4 + 2661dec commit d872411
Show file tree
Hide file tree
Showing 55 changed files with 2,473 additions and 5,536 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
45 changes: 35 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
"commonjs": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2020
},
"globals": {
"BigInt": true
},
"extends": "eslint:recommended",
"plugins": [
"@typescript-eslint"
],
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"jsdoc/no-undefined-types": 1,
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/keyword-spacing": "error",
"require-atomic-updates": "warn",
"no-case-declarations": "off",
"no-empty": "off",
Expand All @@ -21,6 +25,11 @@
"no-global-assign": "off",
"prefer-const": "error",
"no-var": "error",
"no-unused-vars": "off",
"no-extra-semi": "off",
"keyword-spacing": "off",
"curly": "error",
"brace-style": "error",
"one-var": [
"error",
"never"
Expand All @@ -41,7 +50,23 @@
"always"
]
},
"plugins": [
"jsdoc"
"overrides": [
{
"files": ["**/*.ts", "**/*.d.ts"],
"rules": {
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/typedef": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/consistent-type-imports": ["error", { "prefer": "type-imports" }]
}
},
{
"files": ["**/*.js"],
"rules": {
// This rule does not work for js files
"@typescript-eslint/no-var-requires": "off"
}
}
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ typings/
config.json
database
db.json
dist/
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ COPY "docker/entrypoint.sh" ./

COPY package*.json ./
RUN npm install
RUN npm run build

COPY . ./

Expand Down
2 changes: 2 additions & 0 deletions example.config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"bot_token": "TOKEN",
"nsfw_model_path": "./nsfw_model",
"quantized_nsfw_model": false,
"json_db_path": "./db.json",
"sequelize": {
"force": false,
"alter": false
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d872411

Please sign in to comment.