Skip to content

Commit 4293f2f

Browse files
mandar1jnastrobot-houston
authored andcommitted
[ci] format
1 parent 8634869 commit 4293f2f

File tree

2 files changed

+97
-99
lines changed

2 files changed

+97
-99
lines changed

eslint.config.cjs

Lines changed: 93 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,105 @@
1-
const tsParser = require("@typescript-eslint/parser");
2-
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
3-
const prettier = require("eslint-plugin-prettier");
4-
const js = require("@eslint/js");
1+
const tsParser = require('@typescript-eslint/parser');
2+
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
3+
const prettier = require('eslint-plugin-prettier');
4+
const js = require('@eslint/js');
55

6-
const {
7-
FlatCompat,
8-
} = require("@eslint/eslintrc");
6+
const { FlatCompat } = require('@eslint/eslintrc');
97

108
const compat = new FlatCompat({
11-
baseDirectory: __dirname,
12-
recommendedConfig: js.configs.recommended,
13-
allConfig: js.configs.all
9+
baseDirectory: __dirname,
10+
recommendedConfig: js.configs.recommended,
11+
allConfig: js.configs.all,
1412
});
1513

1614
module.exports = [
17-
// Global ignores
18-
{
19-
ignores: [
20-
"**/.github",
21-
"**/dist",
22-
"**/node_modules",
23-
"**/*.d.ts",
24-
"**/pnpm-lock.yaml",
25-
]
26-
},
27-
28-
// JavaScript files
29-
{
30-
files: ["**/*.js", "**/*.cjs", "**/*.mjs"],
31-
...js.configs.recommended,
32-
plugins: {
33-
prettier,
34-
},
35-
rules: {
36-
"no-console": "off",
37-
"prefer-const": "off",
38-
}
39-
},
40-
41-
// TypeScript files
42-
{
43-
files: ["**/*.ts", "**/*.tsx"],
44-
...compat.extends(
45-
"plugin:@typescript-eslint/recommended-type-checked",
46-
"plugin:@typescript-eslint/stylistic-type-checked",
47-
"prettier",
48-
)[0],
15+
// Global ignores
16+
{
17+
ignores: ['**/.github', '**/dist', '**/node_modules', '**/*.d.ts', '**/pnpm-lock.yaml'],
18+
},
4919

50-
languageOptions: {
51-
parser: tsParser,
52-
parserOptions: {
53-
project: ["./tsconfig.json"],
54-
tsconfigRootDir: __dirname,
55-
},
56-
},
20+
// JavaScript files
21+
{
22+
files: ['**/*.js', '**/*.cjs', '**/*.mjs'],
23+
...js.configs.recommended,
24+
plugins: {
25+
prettier,
26+
},
27+
rules: {
28+
'no-console': 'off',
29+
'prefer-const': 'off',
30+
},
31+
},
5732

58-
plugins: {
59-
"@typescript-eslint": typescriptEslint,
60-
prettier,
61-
},
33+
// TypeScript files
34+
{
35+
files: ['**/*.ts', '**/*.tsx'],
36+
...compat.extends(
37+
'plugin:@typescript-eslint/recommended-type-checked',
38+
'plugin:@typescript-eslint/stylistic-type-checked',
39+
'prettier'
40+
)[0],
6241

63-
rules: {
64-
"@typescript-eslint/array-type": ["error", {
65-
default: "array-simple",
66-
}],
42+
languageOptions: {
43+
parser: tsParser,
44+
parserOptions: {
45+
project: ['./tsconfig.json'],
46+
tsconfigRootDir: __dirname,
47+
},
48+
},
6749

68-
"@typescript-eslint/no-unused-vars": ["warn", {
69-
argsIgnorePattern: "^_",
70-
varsIgnorePattern: "^_",
71-
caughtErrorsIgnorePattern: "^_",
72-
ignoreRestSiblings: true,
73-
}],
50+
plugins: {
51+
'@typescript-eslint': typescriptEslint,
52+
prettier,
53+
},
7454

75-
"@typescript-eslint/no-shadow": ["error"],
76-
"no-console": "off",
77-
"@typescript-eslint/array-type": "off",
78-
"@typescript-eslint/ban-ts-comment": "off",
79-
"@typescript-eslint/class-literal-property-style": "off",
80-
"@typescript-eslint/consistent-indexed-object-style": "off",
81-
"@typescript-eslint/consistent-type-definitions": "off",
82-
"@typescript-eslint/dot-notation": "off",
83-
"@typescript-eslint/no-base-to-string": "off",
84-
"@typescript-eslint/no-empty-function": "off",
85-
"@typescript-eslint/no-floating-promises": "off",
86-
"@typescript-eslint/no-misused-promises": "off",
87-
"@typescript-eslint/no-redundant-type-constituents": "off",
88-
"@typescript-eslint/no-this-alias": "off",
89-
"@typescript-eslint/no-unsafe-argument": "off",
90-
"@typescript-eslint/no-unsafe-assignment": "off",
91-
"@typescript-eslint/no-unsafe-call": "off",
92-
"@typescript-eslint/no-unsafe-member-access": "off",
93-
"@typescript-eslint/no-unsafe-return": "off",
94-
"@typescript-eslint/prefer-nullish-coalescing": "off",
95-
"@typescript-eslint/prefer-optional-chain": "off",
96-
"@typescript-eslint/prefer-string-starts-ends-with": "off",
97-
"@typescript-eslint/require-await": "off",
98-
"@typescript-eslint/restrict-plus-operands": "off",
99-
"@typescript-eslint/restrict-template-expressions": "off",
100-
"@typescript-eslint/sort-type-constituents": "off",
101-
"@typescript-eslint/unbound-method": "off",
102-
"@typescript-eslint/no-explicit-any": "off",
103-
"@typescript-eslint/await-thenable": "off",
104-
"prefer-const": "off",
105-
},
106-
}
55+
rules: {
56+
'@typescript-eslint/array-type': [
57+
'error',
58+
{
59+
default: 'array-simple',
60+
},
61+
],
62+
63+
'@typescript-eslint/no-unused-vars': [
64+
'warn',
65+
{
66+
argsIgnorePattern: '^_',
67+
varsIgnorePattern: '^_',
68+
caughtErrorsIgnorePattern: '^_',
69+
ignoreRestSiblings: true,
70+
},
71+
],
72+
73+
'@typescript-eslint/no-shadow': ['error'],
74+
'no-console': 'off',
75+
'@typescript-eslint/array-type': 'off',
76+
'@typescript-eslint/ban-ts-comment': 'off',
77+
'@typescript-eslint/class-literal-property-style': 'off',
78+
'@typescript-eslint/consistent-indexed-object-style': 'off',
79+
'@typescript-eslint/consistent-type-definitions': 'off',
80+
'@typescript-eslint/dot-notation': 'off',
81+
'@typescript-eslint/no-base-to-string': 'off',
82+
'@typescript-eslint/no-empty-function': 'off',
83+
'@typescript-eslint/no-floating-promises': 'off',
84+
'@typescript-eslint/no-misused-promises': 'off',
85+
'@typescript-eslint/no-redundant-type-constituents': 'off',
86+
'@typescript-eslint/no-this-alias': 'off',
87+
'@typescript-eslint/no-unsafe-argument': 'off',
88+
'@typescript-eslint/no-unsafe-assignment': 'off',
89+
'@typescript-eslint/no-unsafe-call': 'off',
90+
'@typescript-eslint/no-unsafe-member-access': 'off',
91+
'@typescript-eslint/no-unsafe-return': 'off',
92+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
93+
'@typescript-eslint/prefer-optional-chain': 'off',
94+
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
95+
'@typescript-eslint/require-await': 'off',
96+
'@typescript-eslint/restrict-plus-operands': 'off',
97+
'@typescript-eslint/restrict-template-expressions': 'off',
98+
'@typescript-eslint/sort-type-constituents': 'off',
99+
'@typescript-eslint/unbound-method': 'off',
100+
'@typescript-eslint/no-explicit-any': 'off',
101+
'@typescript-eslint/await-thenable': 'off',
102+
'prefer-const': 'off',
103+
},
104+
},
107105
];

src/commands/docs.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const returnObjectResult = async (
7878
'weight',
7979
],
8080
distinct: false,
81-
}
81+
},
8282
});
8383
const hits = searchResult.hits.filter((hit: any) => !hit.hierarchy[`lvl${highest + 1}`]);
8484

@@ -153,7 +153,7 @@ const command: Command = {
153153
if (query.startsWith('auto-')) {
154154
const reply: SearchHit = await index.getObject({
155155
indexName: client.env.ALGOLIA_INDEX!,
156-
objectID: query.substring(5)
156+
objectID: query.substring(5),
157157
});
158158
await returnObjectResult(client.interaction, reply, client.env);
159159
return;
@@ -193,7 +193,7 @@ const command: Command = {
193193
'hierarchy.lvl6:10',
194194
'content:10',
195195
],
196-
}
196+
},
197197
});
198198

199199
const items = reply.hits.map((hit: any) => {
@@ -305,7 +305,7 @@ const command: Command = {
305305
facetFilters: [['lang:' + (getStringOption(client.interaction.data, 'language') ?? 'en')]],
306306
hitsPerPage: 20,
307307
distinct: true,
308-
}
308+
},
309309
});
310310

311311
const hits = reply.hits.map((hit: any) => {

0 commit comments

Comments
 (0)