Skip to content

Commit cfbf2b8

Browse files
committed
prettier and linting
1 parent 49c85e1 commit cfbf2b8

9 files changed

Lines changed: 109 additions & 13 deletions

File tree

.github/workflows/docker.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,3 @@ jobs:
2727
- name: Set Docker tag
2828
id: date
2929
run: echo "DATE_STAMP=$(date +%s)" > "$GITHUB_ENV"
30-
31-

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bunx lint-staged

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ COPY . .
2929
# [optional] tests & build
3030
ENV NODE_ENV=production
3131
RUN bun run lint
32+
RUN bun test
3233
RUN bun run build-prod
3334

3435
# copy production dependencies and source code into final image

bun.lock

Lines changed: 92 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import globals from "globals";
22
import pluginJs from "@eslint/js";
33
import tseslint from "typescript-eslint";
4+
import eslintConfigPrettier from "eslint-config-prettier/flat";
45

56
export default [
67
{ files: ["**/*.{js,mjs,cjs,ts}"] },
78
{ ignores: [".yarn", "bin"] },
89
{ languageOptions: { globals: globals.node } },
10+
eslintConfigPrettier,
911
pluginJs.configs.recommended,
1012
...tseslint.configs.recommended,
1113
];

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@
1515
"start-built": "bun --trace-warnings bin/index.js",
1616
"build-and-run": "bun run build && bun run start-built",
1717
"build-and-run-prod": "bun run lint && bun run build-prod && bun run start-built",
18-
"sentry:sourcemaps": "bunx sentry-cli sourcemaps inject --org developer-den-59 --project discord-bot ./bin && bunx sentry-cli sourcemaps upload --org developer-den-59 --project discord-bot ./bin"
18+
"sentry:sourcemaps": "bunx sentry-cli sourcemaps inject --org developer-den-59 --project discord-bot ./bin && bunx sentry-cli sourcemaps upload --org developer-den-59 --project discord-bot ./bin",
19+
"prepare": "husky",
20+
"lint-staged": {
21+
"**/*": "prettier --write --ignore-unknown"
22+
}
1923
},
2024
"keywords": [],
2125
"author": "Developer Den",
2226
"license": "MIT",
2327
"dependencies": {
24-
"@microsoft/eslint-formatter-sarif": "3.1.0",
2528
"@sentry/bun": "^10.1.0",
2629
"@sentry/cli": "^2.50.2",
2730
"@sequelize/core": "^7.0.0-alpha.46",
@@ -57,6 +60,7 @@
5760
],
5861
"repository": "https://github.com/TheDeveloperDen/DevDenBot.git",
5962
"devDependencies": {
63+
"@microsoft/eslint-formatter-sarif": "3.1.0",
6064
"@eslint/eslintrc": "^3.3.1",
6165
"@eslint/js": "^9.32.0",
6266
"@sentry/types": "^8.55.0",
@@ -70,7 +74,10 @@
7074
"@types/string-similarity": "^4.0.2",
7175
"@types/validator": "^13.15.2",
7276
"eslint": "^9.32.0",
77+
"eslint-config-prettier": "^10.1.8",
7378
"globals": "^15.15.0",
79+
"husky": "^9.1.7",
80+
"lint-staged": "^16.1.4",
7481
"nodemon": "^3.1.10",
7582
"prettier": "3.6.2",
7683
"ts-node": "^10.9.2",

src/Config.prod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const config: Config = {
1111
showcase: "847936633964724254",
1212
auditLog: "1004782799955435540",
1313
introductions: "888142541592076347",
14-
general: "821743100657270876"
14+
general: "821743100657270876",
1515
},
1616
commands: {
1717
daily: "1059214166075912225",

src/Config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const config: Config = {
1010
hotTake: "904478147351806015",
1111
showcase: "952536628533030942",
1212
auditLog: "994623474557538415",
13-
general: "904478147351806015"
13+
general: "904478147351806015",
1414
},
1515
commands: {
1616
daily: "1029850807794937949",

src/store/models/Bump.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { test, expect, mock } from "bun:test";
2-
import { Bump, getStreak } from "./Bump.js";
1+
import { test, expect } from "bun:test";
2+
import { getStreak } from "./Bump.js";
33

44
test("getStreak", () => {
55
const streakData: { userId: bigint }[][] = [

0 commit comments

Comments
 (0)