1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00

Tools: Apply rule @typescript-eslint/comma-dangle

This commit is contained in:
Laurent Cozic 2020-11-12 19:23:54 +00:00
parent d20694e52c
commit 42799b0662
3 changed files with 14 additions and 5 deletions

View File

@ -115,8 +115,6 @@ module.exports = {
'space-before-blocks': 'error',
'spaced-comment': ['error', 'always'],
'keyword-spacing': ['error', { 'before': true, 'after': true }],
'@typescript-eslint/type-annotation-spacing': ['error', { 'before': false, 'after': true }],
},
'plugins': [
'react',
@ -132,6 +130,17 @@ module.exports = {
// Warn only because it would make it difficult to convert JS classes to TypeScript, unless we
// make everything public which is not great. New code however should specify member accessibility.
'@typescript-eslint/explicit-member-accessibility': ['warn'],
'@typescript-eslint/type-annotation-spacing': ['error', { 'before': false, 'after': true }],
'@typescript-eslint/comma-dangle': ['error', {
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'always-multiline',
'exports': 'always-multiline',
'enums': 'always-multiline',
'generics': 'always-multiline',
'tuples': 'always-multiline',
'functions': 'never',
}],
},
},
],

View File

@ -22,7 +22,7 @@ const useKeymap = (): [
Error,
(keymapItems: KeymapItem[])=> void,
(commandName: string, accelerator: string)=> void,
(commandName: string)=> void
(commandName: string)=> void,
] => {
const [keymapItems, setKeymapItems] = useState<KeymapItem[]>(() => allKeymapItems());
const [keymapError, setKeymapError] = useState<Error>(null);

View File

@ -13,12 +13,12 @@ enum Relation {
enum Operation {
UNION = 'UNION',
INTERSECT = 'INTERSECT'
INTERSECT = 'INTERSECT',
}
enum Requirement {
EXCLUSION = 'EXCLUSION',
INCLUSION = 'INCLUSION'
INCLUSION = 'INCLUSION',
}
const notebookFilter = (terms: Term[], conditions: string[], params: string[], withs: string[]) => {