forked from elegantShock2258/trinit-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.lintstagedrc.js
38 lines (35 loc) · 1.03 KB
/
.lintstagedrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module.exports = {
// Type check TypeScript files
"**/*.(ts|tsx)": () => "yarn tsc",
// Compile sass files
"**/*.(sass|scss)": (filenames) => [
`sass ${filenames
.map((e) => {
return `${e}:${e.replaceAll("sass", "css")}`;
})
.join(" ")}`,
],
// Lint & Prettify TS and JS files
"**/*.(ts|tsx|js)": (filenames) => [
// `yarn eslint ${filenames.join(" ")}`,
`yarn prettier --write ${filenames.join(" ")}`,
"yarn run lint",
"yarn run build",
],
// Build docker files
"docker-compose.example.yml": (filenames) => [
"cp docker-compose.example.yml docker-compose.yml",
"docker compose build",
],
Dockerfile: (filenames) => [
"cp docker-compose.example.yml docker-compose.yml",
"docker compose build",
],
".dockerignore": (filenames) => [
"cp docker-compose.example.yml docker-compose.yml",
"docker compose build",
],
// Prettify only Markdown and JSON files
"**/*.(md|json)": (filenames) =>
`yarn prettier --write ${filenames.join(" ")}`,
};