From f33e17789a95ee8e03199290833fe7decdf15998 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Mon, 11 Nov 2019 09:57:36 -0800 Subject: [PATCH] Merge pull request #699 from ffflorian/fix/whitespace fix: LF newlines, remove trailing whitespace --- packages/types-publisher/.editorconfig | 9 ++++++ packages/types-publisher/jest.config.js | 30 +++++++++---------- .../src/lib/definition-parser.ts | 2 +- 3 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 packages/types-publisher/.editorconfig diff --git a/packages/types-publisher/.editorconfig b/packages/types-publisher/.editorconfig new file mode 100644 index 00000000..677e36e2 --- /dev/null +++ b/packages/types-publisher/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/packages/types-publisher/jest.config.js b/packages/types-publisher/jest.config.js index 93995e6f..e5b526f9 100644 --- a/packages/types-publisher/jest.config.js +++ b/packages/types-publisher/jest.config.js @@ -1,17 +1,17 @@ module.exports = { - "roots": [ - "src" - ], - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, - "testRegex": "(/__tests__/.*|\\.(test|spec))\\.tsx?$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json", - "node" - ], + "roots": [ + "src" + ], + "transform": { + "^.+\\.tsx?$": "ts-jest" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.tsx?$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "jsx", + "json", + "node" + ], } diff --git a/packages/types-publisher/src/lib/definition-parser.ts b/packages/types-publisher/src/lib/definition-parser.ts index 127f3da6..e61b937e 100644 --- a/packages/types-publisher/src/lib/definition-parser.ts +++ b/packages/types-publisher/src/lib/definition-parser.ts @@ -201,7 +201,7 @@ to refer to @types/P if it relies on old versions of P's types. In this case, please make a pull request to types-publisher adding @types/P to \`dependenciesWhitelist.txt\`.` : `Dependency ${dependencyName} not in whitelist. If you are depending on another \`@types\` package, do *not* add it to a \`package.json\`. Path mapping should make the import work. -For namespaced dependencies you then have to add a \`paths\` mapping from \`@namespace/library\` to \`namespace__library\` in \`tsconfig.json\`. +For namespaced dependencies you then have to add a \`paths\` mapping from \`@namespace/library\` to \`namespace__library\` in \`tsconfig.json\`. If this is an external library that provides typings, please make a pull request to types-publisher adding it to \`dependenciesWhitelist.txt\`.`; throw new Error(`In ${path}: ${msg}`); }