mongoose-tsgen
Advanced tools
Comparing version 7.0.8 to 7.0.9
@@ -7,3 +7,6 @@ "use strict"; | ||
const prettier_1 = tslib_1.__importDefault(require("prettier")); | ||
const eslint_1 = require("eslint"); | ||
// I removed ESLINT usage since it doesnt seem to add much value and adds room for bugs. | ||
// If we want to re-add it, we need to add a check to ensure someone has an eslint config before linting files | ||
// and set eslint as an optional dependency | ||
// import { ESLint } from "eslint"; | ||
// NOTE: this could be sped up by formatting the generated file string prior to writing (no need to write file then read it again here and re-write it) | ||
@@ -19,10 +22,10 @@ const prettifyFiles = (filePaths) => { | ||
}; | ||
const fixFiles = async (filePaths) => { | ||
const eslint = new eslint_1.ESLint({ fix: true }); | ||
const results = await eslint.lintFiles(filePaths); | ||
await eslint_1.ESLint.outputFixes(results); | ||
}; | ||
// const fixFiles = async (_filePaths: string[]) => { | ||
// const eslint = new ESLint({ fix: true }); | ||
// const results = await eslint.lintFiles(filePaths); | ||
// await ESLint.outputFixes(results); | ||
// }; | ||
exports.format = async (filePaths) => { | ||
prettifyFiles(filePaths); | ||
await fixFiles(filePaths); | ||
// await fixFiles(filePaths); | ||
}; |
@@ -476,3 +476,5 @@ "use strict"; | ||
// custom, user-defined imports | ||
fullTemplate += imports.join("\n") + "\n"; | ||
if (imports.length > 0) | ||
fullTemplate += imports.join("\n") + "\n"; | ||
fullTemplate += "\n"; | ||
if (isAugmented) | ||
@@ -479,0 +481,0 @@ fullTemplate += MODULE_DECLARATION_HEADER; |
@@ -98,3 +98,3 @@ "use strict"; | ||
"no-format": command_1.flags.boolean({ | ||
description: "Disable formatting generated files with prettier and fixing with eslint." | ||
description: "Disable formatting generated files with prettier." | ||
}), | ||
@@ -101,0 +101,0 @@ "no-func-types": command_1.flags.boolean({ |
{ | ||
"name": "mongoose-tsgen", | ||
"description": "A Typescript interface generator for Mongoose that works out of the box.", | ||
"version": "7.0.8", | ||
"version": "7.0.9", | ||
"author": "Francesco Virga @francescov1", | ||
@@ -20,3 +20,2 @@ "bin": { | ||
"cli-ux": "^5.5.0", | ||
"eslint": "^7.13.0", | ||
"flat": "^5.0.2", | ||
@@ -42,2 +41,3 @@ "glob": "^7.1.6", | ||
"@types/node": "^10.17.35", | ||
"eslint": "^7.13.0", | ||
"eslint-config-oclif": "^3.1.0", | ||
@@ -44,0 +44,0 @@ "eslint-config-oclif-typescript": "^0.1.0", |
@@ -142,3 +142,3 @@ # mongoose-tsgen | ||
--no-format Disable formatting generated files with prettier and fixing with eslint. | ||
--no-format Disable formatting generated files with prettier. | ||
@@ -281,3 +281,3 @@ --no-func-types Disable using TS compiler API for method, static and query typings. | ||
### generated typings file ./src/interfaces/mongoose.gen.ts | ||
<!-- TODO: generate test file and replace with this --> | ||
```typescript | ||
@@ -284,0 +284,0 @@ /* tslint:disable */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59895
15
924
17
- Removedeslint@^7.13.0
- Removed@babel/code-frame@7.12.11(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@babel/highlight@7.25.9(transitive)
- Removed@eslint/eslintrc@0.4.3(transitive)
- Removed@humanwhocodes/config-array@0.5.0(transitive)
- Removed@humanwhocodes/object-schema@1.2.1(transitive)
- Removedacorn@7.4.1(transitive)
- Removedacorn-jsx@5.3.2(transitive)
- Removedajv@6.12.68.17.1(transitive)
- Removedansi-colors@4.1.3(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedastral-regex@2.0.0(transitive)
- Removedcallsites@3.1.0(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removeddeep-is@0.1.4(transitive)
- Removeddoctrine@3.0.0(transitive)
- Removedenquirer@2.4.1(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedeslint@7.32.0(transitive)
- Removedeslint-scope@5.1.1(transitive)
- Removedeslint-utils@2.1.0(transitive)
- Removedeslint-visitor-keys@1.3.02.1.0(transitive)
- Removedespree@7.3.1(transitive)
- Removedesquery@1.6.0(transitive)
- Removedesrecurse@4.3.0(transitive)
- Removedestraverse@4.3.05.3.0(transitive)
- Removedesutils@2.0.3(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedfast-levenshtein@2.0.6(transitive)
- Removedfast-uri@3.0.3(transitive)
- Removedfile-entry-cache@6.0.1(transitive)
- Removedflat-cache@3.2.0(transitive)
- Removedflatted@3.3.2(transitive)
- Removedfunctional-red-black-tree@1.0.1(transitive)
- Removedglobals@13.24.0(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedignore@4.0.6(transitive)
- Removedimport-fresh@3.3.0(transitive)
- Removedimurmurhash@0.1.4(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjson-buffer@3.0.1(transitive)
- Removedjson-schema-traverse@0.4.11.0.0(transitive)
- Removedjson-stable-stringify-without-jsonify@1.0.1(transitive)
- Removedkeyv@4.5.4(transitive)
- Removedlevn@0.4.1(transitive)
- Removedlodash.merge@4.6.2(transitive)
- Removedlodash.truncate@4.4.2(transitive)
- Removednatural-compare@1.4.0(transitive)
- Removedoptionator@0.9.4(transitive)
- Removedparent-module@1.0.1(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedprelude-ls@1.2.1(transitive)
- Removedprogress@2.0.3(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedregexpp@3.2.0(transitive)
- Removedrequire-from-string@2.0.2(transitive)
- Removedresolve-from@4.0.0(transitive)
- Removedrimraf@3.0.2(transitive)
- Removedslice-ansi@4.0.0(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedtable@6.9.0(transitive)
- Removedtext-table@0.2.0(transitive)
- Removedtype-check@0.4.0(transitive)
- Removedtype-fest@0.20.2(transitive)
- Removeduri-js@4.4.1(transitive)
- Removedv8-compile-cache@2.4.0(transitive)
- Removedword-wrap@1.2.5(transitive)