forked from Azure/azure-sdk-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Azure#1 from arpanlaha/ts
Port to TypeScript
- Loading branch information
Showing
34 changed files
with
367 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,6 @@ | |
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"rules": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules | ||
dist | ||
package-lock.json | ||
yarn.lock | ||
.DS_Store | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export const configs = { | ||
recommended: { | ||
plugins: ["azure"], | ||
env: ["node"], | ||
parser: "@typescript-eslint/parser", | ||
rules: { | ||
"azure/ts-config-allowsyntheticdefaultimports": "error", | ||
"azure/ts-config-declaration": "error", | ||
"azure/ts-config-esmoduleinterop": "error", | ||
"azure/ts-config-forceconsistentcasinginfilenames": "error", | ||
"azure/ts-config-importhelpers": "error", | ||
"azure/ts-config-isolatedmodules": "warning", | ||
"azure/ts-config-module": "error", | ||
"azure/ts-config-no-experimentaldecorators": "error", | ||
"azure/ts-config-strict": "error", | ||
"azure/ts-package-json-repo": "error", | ||
"azure/ts-package-json-bugs": "error" | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* @fileoverview Linting rules for the JavaScript/TypeScript Azure SDK | ||
* @author Arpan Laha | ||
*/ | ||
|
||
//------------------------------------------------------------------------------ | ||
// Requirements | ||
//------------------------------------------------------------------------------ | ||
|
||
import { rules } from "./rules"; | ||
import { processors } from "./processors"; | ||
import { configs } from "./configs"; | ||
|
||
//------------------------------------------------------------------------------ | ||
// Plugin Definition | ||
//------------------------------------------------------------------------------ | ||
|
||
export { rules, processors, configs }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* @fileoverview Definition of processors | ||
* @author Arpan Laha | ||
*/ | ||
|
||
export const processors = { | ||
".json": { | ||
preprocess: function(text: string): string[] { | ||
const code = "const json = " + text; | ||
return [code]; | ||
}, | ||
postprocess: function(messages: string[][]): string[] { | ||
return messages[0]; | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* @fileoverview All rules | ||
* @author Arpan Laha | ||
*/ | ||
|
||
import { rule as tsConfigAllowSyntheticDefaultImports } from "./ts-config-allowsyntheticdefaultimports"; | ||
import { rule as tsConfigDeclaration } from "./ts-config-declaration"; | ||
import { rule as tsConfigEsModuleInterop } from "./ts-config-esmoduleinterop"; | ||
import { rule as tsConfigForceConsistentCasingInFileNames } from "./ts-config-forceconsistentcasinginfilenames"; | ||
import { rule as tsConfigImportHelpers } from "./ts-config-importhelpers"; | ||
import { rule as tsConfigIsolatedModules } from "./ts-config-isolatedmodules"; | ||
import { rule as tsConfigModule } from "./ts-config-module"; | ||
import { rule as tsConfigNoExperimentalDecorators } from "./ts-config-no-experimentaldecorators"; | ||
import { rule as tsConfigStrict } from "./ts-config-strict"; | ||
import { rule as tsPackageJsonBugs } from "./ts-package-json-bugs"; | ||
import { rule as tsPackageJsonRepo } from "./ts-package-json-repo"; | ||
|
||
export const rules = { | ||
"ts-config-allowsyntheticdefaultimports": tsConfigAllowSyntheticDefaultImports, | ||
"ts-config-declaration": tsConfigDeclaration, | ||
"ts-config-esmoduleinterop": tsConfigEsModuleInterop, | ||
"ts-config-forceconsistentcasinginfilenames": tsConfigForceConsistentCasingInFileNames, | ||
"ts-config-importhelpers": tsConfigImportHelpers, | ||
"ts-config-isolatedmodules": tsConfigIsolatedModules, | ||
"ts-config-module": tsConfigModule, | ||
"ts-config-noexperimentaldecorators": tsConfigNoExperimentalDecorators, | ||
"ts-config-strict": tsConfigStrict, | ||
"ts-package-json-bugs": tsPackageJsonBugs, | ||
"ts-package-json-repo": tsPackageJsonRepo | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.