Skip to content

Commit

Permalink
* add a couple more linting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ConorMurphy21 committed Feb 5, 2024
1 parent d9e7889 commit c32f0d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions client/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
},
rules: {
'@typescript-eslint/consistent-type-imports': 2,
'@typescript-eslint/prefer-for-of': 2,
'@typescript-eslint/unbound-method': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
Expand Down
3 changes: 2 additions & 1 deletion server/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ module.exports = {
},
plugins: ['@typescript-eslint', 'prettier'],
rules: {
'@typescript-eslint/consistent-type-imports': ['error'],
'@typescript-eslint/prefer-for-of': 2,
'@typescript-eslint/consistent-type-imports': 2,
'prettier/prettier': 2
},
ignorePatterns: ['/*', '!/src', '!/tests']
Expand Down
4 changes: 2 additions & 2 deletions server/src/state/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ export class Prompts {
const oldCustomPack = oldPrompts.packs[oldPrompts.packs.length - 1];
const customPack = this.packs[this.packs.length - 1];
for (const i of oldCustomPack.used) {
for (let j = 0; j < customPack.prompts.length; j++) {
if (oldCustomPack.prompts[i] === customPack.prompts[j]) {
for (const customPrompt of customPack.prompts) {
if (oldCustomPack.prompts[i] === customPrompt) {
customPack.used.add(i);
}
}
Expand Down

0 comments on commit c32f0d9

Please sign in to comment.