mirror of
https://github.com/yashgo0018/maci-wrapper.git
synced 2026-01-10 12:07:56 -05:00
22 lines
641 B
JavaScript
22 lines
641 B
JavaScript
const path = require("path");
|
|
|
|
const buildNextEslintCommand = (filenames) =>
|
|
`yarn next:lint --fix --file ${filenames
|
|
.map((f) => path.relative(path.join("packages", "nextjs"), f))
|
|
.join(" --file ")}`;
|
|
|
|
const checkTypesNextCommand = () => "yarn next:check-types";
|
|
|
|
const buildHardhatEslintCommand = (filenames) =>
|
|
`yarn hardhat:lint-staged --fix ${filenames
|
|
.map((f) => path.relative(path.join("packages", "hardhat"), f))
|
|
.join(" ")}`;
|
|
|
|
module.exports = {
|
|
"packages/nextjs/**/*.{ts,tsx}": [
|
|
buildNextEslintCommand,
|
|
checkTypesNextCommand,
|
|
],
|
|
"packages/hardhat/**/*.{ts,tsx}": [buildHardhatEslintCommand],
|
|
};
|