diff --git a/.eslintrc b/.eslintrc index 87c93f7030b..feb8cd9754a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -67,7 +67,7 @@ "complexity": "off", "constructor-super": "error", "curly": ["error", "multi-line"], - "dot-notation": "off", + "dot-notation": "error", "eol-last": "off", "eqeqeq": "error", "guard-for-in": "off", diff --git a/scripts/authors.ts b/scripts/authors.ts index c05d7106913..34b7ab766b5 100644 --- a/scripts/authors.ts +++ b/scripts/authors.ts @@ -169,7 +169,7 @@ var args = process.argv.slice(2); if (args.length < 1) { console.log('Usage: node authors.js [command]'); console.log('List of commands: '); - Object.keys(Commands).forEach(k => console.log(` ${k}: ${(Commands as any)[k]['description']}`)); + Object.keys(Commands).forEach(k => console.log(` ${k}: ${(Commands as any)[k].description}`)); } else { var cmd: Function = (Commands as any)[args[0]]; if (cmd === undefined) { diff --git a/scripts/errorCheck.ts b/scripts/errorCheck.ts index a5cb27417f1..92e738c00ba 100644 --- a/scripts/errorCheck.ts +++ b/scripts/errorCheck.ts @@ -13,7 +13,7 @@ fs.readFile('src/compiler/diagnosticMessages.json', 'utf-8', (err, data) => { console.log('Loaded ' + keys.length + ' errors'); for (let k of keys) { - messages[k]['seen'] = false; + messages[k].seen = false; } let errRegex = /\(\d+,\d+\): error TS([^:]+):/g; @@ -30,7 +30,7 @@ fs.readFile('src/compiler/diagnosticMessages.json', 'utf-8', (err, data) => { while (g = errRegex.exec(baseline)) { var errCode = +g[1]; let msg = keys.filter(k => messages[k].code === errCode)[0]; - messages[msg]['seen'] = true; + messages[msg].seen = true; } done(); @@ -41,7 +41,7 @@ fs.readFile('src/compiler/diagnosticMessages.json', 'utf-8', (err, data) => { console.log('== List of errors not present in baselines =='); let count = 0; for (let k of keys) { - if (messages[k]['seen'] !== true) { + if (messages[k].seen !== true) { console.log(k); count++; } diff --git a/scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts b/scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts index 3fa36faab2f..f14eff609b1 100644 --- a/scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts +++ b/scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts @@ -53,7 +53,7 @@ function importDefinitelyTypedTest(tscPath: string, rwcTestPath: string, testCas } let testDirectoryName = testCaseName + "_" + Math.floor((Math.random() * 10000) + 1); - let testDirectoryPath = path.join(process.env["temp"], testDirectoryName); + let testDirectoryPath = path.join(process.env.temp, testDirectoryName); if (fs.existsSync(testDirectoryPath)) { throw new Error("Could not create test directory"); }