diff --git a/.eslintrc.js b/.eslintrc.js index 8d674354b..24e7465f2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -171,6 +171,34 @@ module.exports = { }, }], '@typescript-eslint/no-floating-promises': ['error'], + '@typescript-eslint/naming-convention': ['error', + // Naming conventions over the codebase is very inconsistent + // unfortunately and fixing it would be way too much work. + // In general, we use "strictCamelCase" for variable names. + + // { + // selector: 'default', + // format: ['StrictPascalCase', 'strictCamelCase', 'snake_case', 'UPPER_CASE'], + // leadingUnderscore: 'allow', + // trailingUnderscore: 'allow', + // }, + { + selector: 'enumMember', + format: ['StrictPascalCase'], + }, + { + selector: 'enumMember', + format: null, + 'filter': { + 'regex': '^(GET|POST|PUT|DELETE|PATCH|HEAD|SQLite|PostgreSQL|ASC|DESC|E2EE|OR|AND|UNION|INTERSECT|EXCLUSION|INCLUSION|EUR|GBP|USD)$', + 'match': true, + }, + }, + { + selector: 'interface', + format: ['StrictPascalCase'], + }, + ], }, }, ], diff --git a/packages/app-desktop/gui/ResizableLayout/ResizableLayout.tsx b/packages/app-desktop/gui/ResizableLayout/ResizableLayout.tsx index b0e314704..a514a8bc5 100644 --- a/packages/app-desktop/gui/ResizableLayout/ResizableLayout.tsx +++ b/packages/app-desktop/gui/ResizableLayout/ResizableLayout.tsx @@ -11,13 +11,13 @@ import { StyledWrapperRoot, StyledMoveOverlay, MoveModeRootWrapper, MoveModeRoot import { Resizable } from 're-resizable'; const EventEmitter = require('events'); -interface onResizeEvent { +interface OnResizeEvent { layout: LayoutItem; } interface Props { layout: LayoutItem; - onResize(event: onResizeEvent): void; + onResize(event: OnResizeEvent): void; width?: number; height?: number; renderItem: Function;