Skip to content

Commit

Permalink
fix: revert to having default config for lint-staged-def
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Jul 21, 2024
1 parent 448aa5d commit 189c5b9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/bin/lint-staged-def.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

import fs from 'node:fs'
import { runScript } from '@naturalcycles/nodejs-lib'
import { cfgDir } from '../cnst/paths.cnst'

runScript(async () => {
// const cwd = process.cwd()
const localConfig = `./lint-staged.config.js`
// const sharedConfig = `${cfgDir}/lint-staged.config.js`
const config = fs.existsSync(localConfig) ? localConfig : undefined
if (!config) {
console.log(`lint-staged is skipped, because no ${localConfig} is found`)
return
}
const sharedConfig = `${cfgDir}/lint-staged.config.js`
const config = fs.existsSync(localConfig) ? localConfig : sharedConfig
// if (!config) {
// console.log(`lint-staged is skipped, because no ${localConfig} is found`)
// return
// }

// await execWithArgs(`lint-staged`, [`--config`, config])
// const lintStaged = require('lint-staged')
Expand Down

0 comments on commit 189c5b9

Please sign in to comment.