mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-02 12:47:41 +02:00
Tools: Add linter rules for a few TypeScript naming conventions
This commit is contained in:
parent
06ed58b809
commit
11d35711c1
28
.eslintrc.js
28
.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'],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user