Skip to content

Commit 40efd1b

Browse files
author
Andy
authored
Apply 'object-literal-key-quotes' tslint rule (microsoft#19737)
* Apply 'object-literal-key-quotes' tslint rule * Convert to "consistent-as-needed"
1 parent 3e7af1c commit 40efd1b

18 files changed

Lines changed: 556 additions & 556 deletions

Gulpfile.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ const cmdLineOptions = minimist(process.argv.slice(2), {
4646
boolean: ["debug", "inspect", "light", "colors", "lint", "soft"],
4747
string: ["browser", "tests", "host", "reporter", "stackTraceLimit", "timeout"],
4848
alias: {
49-
b: "browser",
50-
d: "debug", "debug-brk": "debug",
51-
i: "inspect", "inspect-brk": "inspect",
52-
t: "tests", test: "tests",
53-
ru: "runners", runner: "runners",
54-
r: "reporter",
55-
c: "colors", color: "colors",
56-
f: "files", file: "files",
57-
w: "workers",
49+
"b": "browser",
50+
"d": "debug", "debug-brk": "debug",
51+
"i": "inspect", "inspect-brk": "inspect",
52+
"t": "tests", "test": "tests",
53+
"ru": "runners", "runner": "runners",
54+
"r": "reporter",
55+
"c": "colors", "color": "colors",
56+
"f": "files", "file": "files",
57+
"w": "workers",
5858
},
5959
default: {
6060
soft: false,
@@ -1034,7 +1034,7 @@ gulp.task("update-sublime", "Updates the sublime plugin's tsserver", ["local", s
10341034
});
10351035

10361036
gulp.task("build-rules", "Compiles tslint rules to js", () => {
1037-
const settings: tsc.Settings = getCompilerSettings({ module: "commonjs", "lib": ["es6"] }, /*useBuiltCompiler*/ false);
1037+
const settings: tsc.Settings = getCompilerSettings({ module: "commonjs", lib: ["es6"] }, /*useBuiltCompiler*/ false);
10381038
const dest = path.join(builtLocalDirectory, "tslint");
10391039
return gulp.src("scripts/tslint/**/*.ts")
10401040
.pipe(newer({

src/compiler/checker.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -455,29 +455,29 @@ namespace ts {
455455
}
456456

457457
const typeofEQFacts = createMapFromTemplate({
458-
"string": TypeFacts.TypeofEQString,
459-
"number": TypeFacts.TypeofEQNumber,
460-
"boolean": TypeFacts.TypeofEQBoolean,
461-
"symbol": TypeFacts.TypeofEQSymbol,
462-
"undefined": TypeFacts.EQUndefined,
463-
"object": TypeFacts.TypeofEQObject,
464-
"function": TypeFacts.TypeofEQFunction
458+
string: TypeFacts.TypeofEQString,
459+
number: TypeFacts.TypeofEQNumber,
460+
boolean: TypeFacts.TypeofEQBoolean,
461+
symbol: TypeFacts.TypeofEQSymbol,
462+
undefined: TypeFacts.EQUndefined,
463+
object: TypeFacts.TypeofEQObject,
464+
function: TypeFacts.TypeofEQFunction
465465
});
466466
const typeofNEFacts = createMapFromTemplate({
467-
"string": TypeFacts.TypeofNEString,
468-
"number": TypeFacts.TypeofNENumber,
469-
"boolean": TypeFacts.TypeofNEBoolean,
470-
"symbol": TypeFacts.TypeofNESymbol,
471-
"undefined": TypeFacts.NEUndefined,
472-
"object": TypeFacts.TypeofNEObject,
473-
"function": TypeFacts.TypeofNEFunction
467+
string: TypeFacts.TypeofNEString,
468+
number: TypeFacts.TypeofNENumber,
469+
boolean: TypeFacts.TypeofNEBoolean,
470+
symbol: TypeFacts.TypeofNESymbol,
471+
undefined: TypeFacts.NEUndefined,
472+
object: TypeFacts.TypeofNEObject,
473+
function: TypeFacts.TypeofNEFunction
474474
});
475475
const typeofTypesByName = createMapFromTemplate<Type>({
476-
"string": stringType,
477-
"number": numberType,
478-
"boolean": booleanType,
479-
"symbol": esSymbolType,
480-
"undefined": undefinedType
476+
string: stringType,
477+
number: numberType,
478+
boolean: booleanType,
479+
symbol: esSymbolType,
480+
undefined: undefinedType
481481
});
482482
const typeofType = createTypeofType();
483483

src/compiler/commandLineParser.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ namespace ts {
7676
name: "target",
7777
shortName: "t",
7878
type: createMapFromTemplate({
79-
"es3": ScriptTarget.ES3,
80-
"es5": ScriptTarget.ES5,
81-
"es6": ScriptTarget.ES2015,
82-
"es2015": ScriptTarget.ES2015,
83-
"es2016": ScriptTarget.ES2016,
84-
"es2017": ScriptTarget.ES2017,
85-
"esnext": ScriptTarget.ESNext,
79+
es3: ScriptTarget.ES3,
80+
es5: ScriptTarget.ES5,
81+
es6: ScriptTarget.ES2015,
82+
es2015: ScriptTarget.ES2015,
83+
es2016: ScriptTarget.ES2016,
84+
es2017: ScriptTarget.ES2017,
85+
esnext: ScriptTarget.ESNext,
8686
}),
8787
paramType: Diagnostics.VERSION,
8888
showInSimplifiedHelpView: true,
@@ -93,14 +93,14 @@ namespace ts {
9393
name: "module",
9494
shortName: "m",
9595
type: createMapFromTemplate({
96-
"none": ModuleKind.None,
97-
"commonjs": ModuleKind.CommonJS,
98-
"amd": ModuleKind.AMD,
99-
"system": ModuleKind.System,
100-
"umd": ModuleKind.UMD,
101-
"es6": ModuleKind.ES2015,
102-
"es2015": ModuleKind.ES2015,
103-
"esnext": ModuleKind.ESNext
96+
none: ModuleKind.None,
97+
commonjs: ModuleKind.CommonJS,
98+
amd: ModuleKind.AMD,
99+
system: ModuleKind.System,
100+
umd: ModuleKind.UMD,
101+
es6: ModuleKind.ES2015,
102+
es2015: ModuleKind.ES2015,
103+
esnext: ModuleKind.ESNext
104104
}),
105105
paramType: Diagnostics.KIND,
106106
showInSimplifiedHelpView: true,
@@ -326,8 +326,8 @@ namespace ts {
326326
{
327327
name: "moduleResolution",
328328
type: createMapFromTemplate({
329-
"node": ModuleResolutionKind.NodeJs,
330-
"classic": ModuleResolutionKind.Classic,
329+
node: ModuleResolutionKind.NodeJs,
330+
classic: ModuleResolutionKind.Classic,
331331
}),
332332
paramType: Diagnostics.STRATEGY,
333333
category: Diagnostics.Module_Resolution_Options,
@@ -522,8 +522,8 @@ namespace ts {
522522
{
523523
name: "newLine",
524524
type: createMapFromTemplate({
525-
"crlf": NewLineKind.CarriageReturnLineFeed,
526-
"lf": NewLineKind.LineFeed
525+
crlf: NewLineKind.CarriageReturnLineFeed,
526+
lf: NewLineKind.LineFeed
527527
}),
528528
paramType: Diagnostics.NEWLINE,
529529
category: Diagnostics.Advanced_Options,

0 commit comments

Comments
 (0)