Skip to content

Commit

Permalink
eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
amerharb committed Nov 27, 2023
1 parent 4b88185 commit 609ffe4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webapp/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
es6: true,
},
extends: [
// 'plugin:@typescript-eslint/recommended', // TypeScript rules
'plugin:@typescript-eslint/recommended', // TypeScript rules
'plugin:react-hooks/recommended', // React hooks rules
'plugin:jsx-a11y/recommended', // Accessibility rules
],
Expand Down
2 changes: 2 additions & 0 deletions webapp/src/app/api/translations/[lang]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ export async function GET(
}

function flattenObject(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
obj: Record<string, any>,
parentKey: string = '',
): Record<string, string> {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const result: Record<string, any> = {};

for (const key in obj) {
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export type LanguageMap = Map<string, Record<string, unknown>>;

declare global {
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line
var languages: LanguageMap;
}
2 changes: 1 addition & 1 deletion webapp/src/utils/readTypedMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default function readTypedMessages(fileName: string) {
type TypeID = string;

export type MessageData = {
id: string;
defaultMessage: string;
id: string;
params: {
name: string;
types: TypeID[];
Expand Down
1 change: 1 addition & 0 deletions webapp/src/utils/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export function logInfo(msg: string) {
console.info(msg);
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function logError(msg: any) {
// eslint-disable-next-line no-console
console.error(msg)
Expand Down

0 comments on commit 609ffe4

Please sign in to comment.