Skip to content

Commit

Permalink
Added lint-staged lib
Browse files Browse the repository at this point in the history
  • Loading branch information
devitq committed May 11, 2024
1 parent 50e0fee commit adc27dc
Show file tree
Hide file tree
Showing 3 changed files with 666 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-env node */
const path = require("path")

const eslintCommand = (filenames) =>
`next lint --file ${filenames
.map((f) => path.relative(process.cwd(), f))
.join(" --file ")}`

const formatCommand = "prettier --write"

module.exports = {
"*.{js,jsx,ts,tsx}": [formatCommand, eslintCommand],
"*.{css,scss}": [formatCommand],
"!*.{js,jsx,ts,tsx,css,scss}": [formatCommand],
}
Loading

1 comment on commit adc27dc

@vercel
Copy link

@vercel vercel bot commented on adc27dc May 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pindie – ./

pindie-itqdev.vercel.app
pindie-git-main-itqdev.vercel.app
pindie.vercel.app

Please sign in to comment.