Skip to content

Commit

Permalink
fix(lint-package-json): fix config resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
dangreen committed Feb 15, 2022
1 parent 73907ba commit b8c4c9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/lint-package-json/src/configs.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* eslint-disable */
exports.base = require.resolve('@trigen/npm-package-json-lint-config')
exports.monorepo = require.resolve('@trigen/npm-package-json-lint-config/monorepo')
5 changes: 3 additions & 2 deletions packages/lint-package-json/src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env node
import NpmPackageJsonLint from 'npm-package-json-lint/src/NpmPackageJsonLint.js'
import Reporter from 'npm-package-json-lint/src/Reporter.js'
import configs from './configs.cjs'

const monorepo = process.argv.includes('--monorepo')
const config = {
extends: monorepo
? ['@trigen/npm-package-json-lint-config', '@trigen/npm-package-json-lint-config/monorepo']
: '@trigen/npm-package-json-lint-config'
? [configs.base, configs.monorepo]
: configs.base
}
const npmPackageJsonLint = new NpmPackageJsonLint({
cwd: process.cwd(),
Expand Down

0 comments on commit b8c4c9c

Please sign in to comment.