Skip to content

Commit

Permalink
⬆️ upgrade to eslint 9, prettier 3 and migrate configs (#740)
Browse files Browse the repository at this point in the history
* ⬆️ upgrade to eslint 9

* ⬆️ upgrade to prettier 3 and migrate config to mjs

* 🎨 apply format
  • Loading branch information
bengeois authored Dec 21, 2024
1 parent 7b875aa commit 40ebae1
Show file tree
Hide file tree
Showing 235 changed files with 37,437 additions and 36,923 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- restore-dependencies
- run:
name: Check format
command: npm run prettier:check
command: npm run prettier

lint:
executor: node
Expand Down
9 changes: 0 additions & 9 deletions .eslintrc.json

This file was deleted.

15 changes: 15 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# next.js
.next
public
node_modules

# Ignore artifacts:
build
coverage

# Ignore all HTML files:
**/*.html

# IDEs
.idea
.vscode
3 changes: 0 additions & 3 deletions .prettierrc.json

This file was deleted.

14 changes: 14 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// prettier.config.js, .prettierrc.js, prettier.config.mjs, or .prettierrc.mjs

/**
* @see https://prettier.io/docs/en/configuration.html
* @type {import("prettier").Config}
*/
const config = {
trailingComma: 'es5',
tabWidth: 4,
semi: false,
singleQuote: true,
}

export default config
48 changes: 24 additions & 24 deletions bot-slack/app.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
const { App, ExpressReceiver, LogLevel } = require("@slack/bolt");
const { homePage } = require("./src/home");
const { commandsHandler } = require("./src/commands/commandsHandler");
const { actionsHandler } = require("./src/actions/actionsHandler");
const { viewHandler } = require("./src/views/viewHandler");
const { monthlyCron } = require("./src/cron/monthlyCron");
const { getAllTopics } = require("./src/lib/requestsHasura/getAllTopics");
const { App, ExpressReceiver, LogLevel } = require('@slack/bolt')
const { homePage } = require('./src/home')
const { commandsHandler } = require('./src/commands/commandsHandler')
const { actionsHandler } = require('./src/actions/actionsHandler')
const { viewHandler } = require('./src/views/viewHandler')
const { monthlyCron } = require('./src/cron/monthlyCron')
const { getAllTopics } = require('./src/lib/requestsHasura/getAllTopics')

const receiver = new ExpressReceiver({
signingSecret: process.env.BOT_SLACK_SIGNING_SECRET,
logLevel: LogLevel.INFO,
});
signingSecret: process.env.BOT_SLACK_SIGNING_SECRET,
logLevel: LogLevel.INFO,
})

const app = new App({
token: process.env.BOT_SLACK_BOT_TOKEN,
logLevel: LogLevel.INFO,
receiver,
});
token: process.env.BOT_SLACK_BOT_TOKEN,
logLevel: LogLevel.INFO,
receiver,
})

(async () => {
homePage(app);
actionsHandler(app);
commandsHandler(app);
viewHandler(app);
getAllTopics();
await app.start({ port: process.env.BOT_PORT });
await monthlyCron(app);
console.log("⚡️ Skillz-Bot started");
})();
;(async () => {
homePage(app)
actionsHandler(app)
commandsHandler(app)
viewHandler(app)
getAllTopics()
await app.start({ port: process.env.BOT_PORT })
await monthlyCron(app)
console.log('⚡️ Skillz-Bot started')
})()
Loading

0 comments on commit 40ebae1

Please sign in to comment.