Disallow trailing commas

This commit is contained in:
Daniel Imms
2018-03-20 09:10:48 -07:00
parent 4f82cf26f0
commit ae32893732
6 changed files with 19 additions and 7 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ export const wcwidth = (function(opts: {nul: number, control: number}): (ucs: nu
[0x206A, 0x206F], [0x20D0, 0x20EF], [0x302A, 0x302F], [0x206A, 0x206F], [0x20D0, 0x20EF], [0x302A, 0x302F],
[0x3099, 0x309A], [0xA806, 0xA806], [0xA80B, 0xA80B], [0x3099, 0x309A], [0xA806, 0xA806], [0xA80B, 0xA80B],
[0xA825, 0xA826], [0xFB1E, 0xFB1E], [0xFE00, 0xFE0F], [0xA825, 0xA826], [0xFB1E, 0xFB1E], [0xFE00, 0xFE0F],
[0xFE20, 0xFE23], [0xFEFF, 0xFEFF], [0xFFF9, 0xFFFB], [0xFE20, 0xFE23], [0xFEFF, 0xFEFF], [0xFFF9, 0xFFFB]
]; ];
const COMBINING_HIGH = [ const COMBINING_HIGH = [
[0x10A01, 0x10A03], [0x10A05, 0x10A06], [0x10A0C, 0x10A0F], [0x10A01, 0x10A03], [0x10A05, 0x10A06], [0x10A0C, 0x10A0F],
+1 -1
View File
@@ -17,7 +17,7 @@ describe('CompositionHelper', () => {
compositionView = { compositionView = {
classList: { classList: {
add: () => {}, add: () => {},
remove: () => {}, remove: () => {}
}, },
getBoundingClientRect: () => { getBoundingClientRect: () => {
return { width: 0 }; return { width: 0 };
+1 -1
View File
@@ -132,7 +132,7 @@ export class CompositionHelper {
// fire before the setTimeout executes. // fire before the setTimeout executes.
const currentCompositionPosition = { const currentCompositionPosition = {
start: this._compositionPosition.start, start: this._compositionPosition.start,
end: this._compositionPosition.end, end: this._compositionPosition.end
}; };
// Since composition* events happen before the changes take place in the textarea on most // Since composition* events happen before the changes take place in the textarea on most
+1 -1
View File
@@ -118,7 +118,7 @@ const DEFAULT_OPTIONS: ITerminalOptions = {
allowTransparency: false, allowTransparency: false,
tabStopWidth: 8, tabStopWidth: 8,
theme: null, theme: null,
rightClickSelectsWord: Browser.isMac, rightClickSelectsWord: Browser.isMac
// programFeatures: false, // programFeatures: false,
// focusKeys: false, // focusKeys: false,
}; };
+3 -3
View File
@@ -33,7 +33,7 @@ export class CursorRenderLayer extends BaseRenderLayer {
y: null, y: null,
isFocused: null, isFocused: null,
style: null, style: null,
width: null, width: null
}; };
this._cursorRenderers = { this._cursorRenderers = {
'bar': this._renderBarCursor.bind(this), 'bar': this._renderBarCursor.bind(this),
@@ -51,7 +51,7 @@ export class CursorRenderLayer extends BaseRenderLayer {
y: null, y: null,
isFocused: null, isFocused: null,
style: null, style: null,
width: null, width: null
}; };
} }
@@ -183,7 +183,7 @@ export class CursorRenderLayer extends BaseRenderLayer {
y: null, y: null,
isFocused: null, isFocused: null,
style: null, style: null,
width: null, width: null
}; };
} }
} }
+12
View File
@@ -43,6 +43,18 @@
true, true,
"always" "always"
], ],
"trailing-comma": [
true,
{
"multiline": {
"objects": "never",
"arrays": "never",
"functions": "never",
"typeLiterals": "ignore"
},
"esSpecCompliant": true
}
],
"triple-equals": [ "triple-equals": [
true, true,
"allow-null-check" "allow-null-check"