diff --git a/clean-scripts.config.js b/clean-scripts.config.js index fe6cb89..e7287b1 100644 --- a/clean-scripts.config.js +++ b/clean-scripts.config.js @@ -41,7 +41,7 @@ module.exports = { ts: `tslint ${tsFiles}`, js: `standard ${jsFiles}`, less: `stylelint ${lessFiles}`, - export: `no-unused-export ${tsFiles} ${lessFiles}`, + export: `no-unused-export "src/**/*.ts" ${lessFiles} --strict --need-module tslib`, commit: `commitlint --from=HEAD~1`, markdown: `markdownlint README.md`, typeCoverage: 'type-coverage -p src --strict --ignore-catch', diff --git a/package.json b/package.json index f00ebae..636e123 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "jasmine": "3.4.0", "less": "3.9.0", "markdownlint-cli": "0.17.0", - "no-unused-export": "1.7.0", + "no-unused-export": "1.8.0-alpha.3", "postcss-cli": "6.1.2", "puppeteer": "1.18.1", "rev-static": "3.4.3", diff --git a/src/lib.d.ts b/src/lib.d.ts index 36dff79..7a2a973 100644 --- a/src/lib.d.ts +++ b/src/lib.d.ts @@ -1,3 +1,8 @@ declare module '*.json' { export const version: string } + +declare module 'lodash.snakecase' { + const snakeCase: (name: string) => string + export = snakeCase +} diff --git a/src/rust-type-generator.ts b/src/rust-type-generator.ts index 766d596..b5ee22c 100644 --- a/src/rust-type-generator.ts +++ b/src/rust-type-generator.ts @@ -1,5 +1,5 @@ import { Type, TypeDeclaration, toUpperCase, ReferenceType, EnumDeclaration, NumberType, ObjectDeclaration, UnionDeclaration, ReferenceDeclaration } from './utils' -const snakeCase: (name: string) => string = require('lodash.snakecase') +import snakeCase = require('lodash.snakecase') export function generateRustTypes(typeDeclarations: TypeDeclaration[]) { const messages: string[] = [] diff --git a/yarn.lock b/yarn.lock index 0d44511..7834843 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4487,15 +4487,15 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" -no-unused-export@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/no-unused-export/-/no-unused-export-1.7.0.tgz#d4026b972521670e487999de3f88baff0fe41f9e" - integrity sha512-wYKTccAiPvFfKcZ3ftUaoT6soZDxFL65iUVNPFWYxw7u8wYLf4Tqo5BSkWpklvDoirOe6UfE3ezW/NNzFCNTiQ== +no-unused-export@1.8.0-alpha.3: + version "1.8.0-alpha.3" + resolved "https://registry.yarnpkg.com/no-unused-export/-/no-unused-export-1.8.0-alpha.3.tgz#3dd1d3aef38db45025cc0d50ea390ba7f0a1a6b0" + integrity sha512-ORSGXWEKOZL+JT1Z97I0gU2mH9MZMQycV+nQKXDmDuKc2b4LBVNf4bYFcRm9Sb9743P5FF6maGuTsrEt0P2QnA== dependencies: - glob "7.1.3" + glob "7.1.4" minimist "1.2.0" parse5 "5.1.0" - postcss-less "3.1.0" + postcss-less "3.1.4" postcss-scss "2.0.0" tslib "1" typescript "3" @@ -5091,14 +5091,7 @@ postcss-jsx@^0.36.1: dependencies: "@babel/core" ">=7.2.2" -postcss-less@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/postcss-less/-/postcss-less-3.1.0.tgz#0e14a80206b452f44d3a09d082fa72645e8168cc" - integrity sha512-+fDH2A9zV8B4gFu3Idhq8ma09/mMBXXc03T2lL9CHjBQqKrfUit+TrQrnojc6Y4k7N4E+tyE1Uj5U1tcoKtXLQ== - dependencies: - postcss "^7.0.3" - -postcss-less@^3.1.4: +postcss-less@3.1.4, postcss-less@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/postcss-less/-/postcss-less-3.1.4.tgz#369f58642b5928ef898ffbc1a6e93c958304c5ad" integrity sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA== @@ -5182,7 +5175,7 @@ postcss-value-parser@^3.3.1: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.2, postcss@^7.0.3, postcss@^7.0.7: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.2, postcss@^7.0.7: version "7.0.17" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f" integrity sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==