Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/deploy-integrations-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
uses: ./.github/actions/deploy-integrations
with:
environment: 'staging'
extra_filter: "-F '!calendly'"
force: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.force == 'true' }}
dry_run: ${{ github.event_name == 'pull_request' }}
sentry_auth_token: ${{ secrets.SENTRY_AUTH_TOKEN }}
Expand Down
5 changes: 2 additions & 3 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["unicorn", "typescript", "oxc", "import", "promise", "n", "vitest"],
"plugins": ["unicorn", "typescript", "oxc", "import", "promise", "vitest"],
"env": {
"browser": true,
"es2024": true,
Expand Down Expand Up @@ -138,9 +138,8 @@
// ],
// "eslint/no-trailing-spaces": "error",
// "eslint/object-shorthand": "error",
"eslint/no-unused-vars": "off",
"typescript/no-unused-vars": "off",
"unused-imports/no-unused-vars": [
"eslint/no-unused-vars": [
"error",
{
"vars": "all",
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
!*.yaml
!*.yml
!*.md
!*.mjs

# exclusions
# **/*.d.ts
Expand All @@ -26,4 +27,4 @@ bp_modules
.genenv/
.genenv.*
.turbo
*.md.ts
*.md.ts
234 changes: 128 additions & 106 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,124 +1,146 @@
import importPlugin from 'eslint-plugin-import';
import jsdoc from "eslint-plugin-jsdoc";
import prettier from "eslint-plugin-prettier";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import tseslint from 'typescript-eslint';
import importPlugin from 'eslint-plugin-import'
import jsdoc from 'eslint-plugin-jsdoc'
import prettier from 'eslint-plugin-prettier'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import tseslint from 'typescript-eslint'
import stylistic from '@stylistic/eslint-plugin'
import oxlint from 'eslint-plugin-oxlint';
import path from "path"
import oxlint from 'eslint-plugin-oxlint'
import path from 'path'

const oxlintFile = path.join(import.meta.dirname, '.oxlintrc.json');
const oxlintFile = path.join(import.meta.dirname, '.oxlintrc.json')

const ignores = [
".git/",
"**/*.{d.ts,test.ts,js,cjs,mjs,jsx}",
"**/cdk.out/",
"**/dist/",
"node_modules/",
"**/node_modules/",
"**/bp_modules/",
"**/.botpress/",
"**/gen/",
"**/.turbo/",
"**/.genenv/",
"**/.ignore.me.*",
"**/*.md.ts",
"packages/llmz/examples/"
];

export default [{
'.git/',
'**/*.{d.ts,test.ts,js,cjs,mjs,jsx}',
'**/cdk.out/',
'**/dist/',
'node_modules/',
'**/node_modules/',
'**/bp_modules/',
'**/.botpress/',
'**/gen/',
'**/.turbo/',
'**/.genenv/',
'**/.ignore.me.*',
'**/*.md.ts',
'packages/llmz/examples/',
]

const oxlintRules = oxlint
.buildFromOxlintConfigFile(oxlintFile)
.map((config) => config.rules)
.reduce((acc, rules) => ({ ...acc, ...rules }), {})

export default [
{
ignores,
// ^ DO NOT REMOVE THIS LINE - this is necessary for the ignores
// pattern to be treated as a "global ignores"
}, {
},
{
ignores,
files: ["**/*.{ts,tsx}"],
files: ['**/*.{ts,tsx}'],
plugins: {
jsdoc,
'@stylistic': stylistic,
"@typescript-eslint": tseslint.plugin,
prettier,
import: importPlugin
jsdoc,
'@stylistic': stylistic,
'@typescript-eslint': tseslint.plugin,
prettier,
import: importPlugin,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
globals: {
...globals.browser,
...globals.node,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: 'commonjs',

parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: import.meta.dirname,
},
},

rules: {
...prettier.configs.recommended.rules,

complexity: ['off'],
'prefer-const': 'warn',

'@stylistic/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: true,
},

singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],

parser: tsParser,
ecmaVersion: 5,
sourceType: "commonjs",
'@stylistic/quotes': [
'error',
'single',
{
avoidEscape: true,
},
],

parserOptions: {
project: ["./tsconfig.json"],
tsconfigRootDir: import.meta.dirname,
'@typescript-eslint/no-floating-promises': [
'error',
{
checkThenables: true,
},
},
],
'@typescript-eslint/no-misused-promises': 'error',
'@stylistic/semi': ['error', 'never'],
'@stylistic/type-annotation-spacing': 'error',
'@stylistic/brace-style': 'off',
'@stylistic/eol-last': 'error',
'@typescript-eslint/no-shadow': 'off',

'import/order': [
'warn',
{
groups: [['builtin', 'external'], 'parent', 'index', 'sibling'],
// TODO: Eventually enable this in the future for consistency
// 'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},

pathGroupsExcludedImportTypes: ['builtin'],
},
],

'jsdoc/check-alignment': 'error',
'@stylistic/linebreak-style': ['error', 'unix'],
'@stylistic/no-trailing-spaces': 'error',
'object-shorthand': 'error',

'@typescript-eslint/naming-convention': [
'warn',
{
selector: 'memberLike',
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require',
},
],

rules: {
...prettier.configs.recommended.rules,

complexity: ["off"],
"prefer-const": "warn",

"@stylistic/member-delimiter-style": ["error", {
multiline: {
delimiter: "none",
requireLast: true,
},

singleline: {
delimiter: "semi",
requireLast: false,
},
}],

"@stylistic/quotes": ["error", "single", {
avoidEscape: true,
}],

"@typescript-eslint/no-floating-promises": ["error", {
checkThenables: true
}],
"@typescript-eslint/no-misused-promises": "error",
"@stylistic/semi": ["error", "never"],
"@stylistic/type-annotation-spacing": "error",
"@stylistic/brace-style": "off",
"@stylistic/eol-last": "error",
"@typescript-eslint/no-shadow": "off",

"import/order": ["warn", {
groups: [["builtin", "external"], "parent", "index", "sibling"],
// TODO: Eventually enable this in the future for consistency
// 'newlines-between': 'always',
alphabetize: {
order: "asc",
caseInsensitive: true,
},

pathGroupsExcludedImportTypes: ["builtin"],
}],

"jsdoc/check-alignment": "error",
"@stylistic/linebreak-style": ["error", "unix"],
"@stylistic/no-trailing-spaces": "error",
"object-shorthand": "error",

"@typescript-eslint/naming-convention": ["warn", {
selector: "memberLike",
modifiers: ["private"],
format: ["camelCase"],
leadingUnderscore: "require",
}],

"@typescript-eslint/explicit-member-accessibility": "warn",

// Disable every rule already covered by oxlint:
...oxlint.buildFromOxlintConfigFile(oxlintFile)
.map(config => config.rules)
.reduce((acc, rules) => ({ ...acc, ...rules }), {}),
'@typescript-eslint/explicit-member-accessibility': 'warn',

// Disable every rule already covered by oxlint:
...oxlintRules,
},
}];
},
]
2 changes: 1 addition & 1 deletion integrations/calcom/src/actions/bookEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { TIntegration } from '.botpress'
import { Input } from '.botpress/implementation/typings/actions/bookEvent/input'

export async function bookEvent(props: ActionHandlerProps<TIntegration, 'bookEvent', Input>) {
const { input, logger, ctx, client } = props
const { input, logger, ctx } = props

const calcom = new CalcomApi(ctx.configuration.calcomApiKey, logger.forBot())

Expand Down
2 changes: 1 addition & 1 deletion integrations/calcom/src/actions/getEventTypes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ActionHandlerProps } from '@botpress/sdk/dist/integration'
import { CalcomApi, CalcomEventType } from 'src/calcom.api'
import { CalcomApi } from 'src/calcom.api'
import { TIntegration } from '.botpress'
import { Input } from '.botpress/implementation/typings/actions/getEventTypes/input'

Expand Down
Loading
Loading