stay-gold 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bang.js CHANGED
@@ -6,7 +6,7 @@ import { resolve } from "node:path";
6
6
  import { walk } from "./walk.js";
7
7
  const exts = [".js", ".ts", ".astro", ".css", ".tsx"];
8
8
  const rootDir = resolve(process.cwd(), "src");
9
- const publicDir = resolve(process.cwd(), "public");
9
+ // const publicDir = resolve(process.cwd(), "public");
10
10
  function checkFiles(files) {
11
11
  let found = false;
12
12
  files.forEach((file) => {
@@ -21,9 +21,10 @@ function checkFiles(files) {
21
21
  return found;
22
22
  }
23
23
  const srcFiles = walk(rootDir, exts);
24
- const publicFiles = walk(publicDir, exts);
25
- const allFiles = srcFiles.concat(publicFiles);
26
- if (checkFiles(allFiles)) {
24
+ // const publicFiles = walk(publicDir, exts);
25
+ // const allFiles = srcFiles.concat(publicFiles);
26
+ if (checkFiles(srcFiles)) {
27
+ // console.error(`Total ! found: ${namedStringCount}`);
27
28
  process.exit(1);
28
29
  }
29
30
  else {
package/dist/index.js CHANGED
@@ -6,14 +6,14 @@ const checks = [
6
6
  { name: "Bang Check", script: "./dist/bang.js" },
7
7
  { name: "TODO Check", script: "./dist/todos.js" },
8
8
  { name: "CSS Variables Check", script: "./dist/css-vars.js" },
9
- { name: "CSS Named Colors Check", script: "./dist/css-named-colors.js" }
9
+ { name: "CSS Named Colors Check", script: "./dist/css-named-colors.js" },
10
10
  ];
11
11
  async function runCheck(script, name) {
12
12
  return new Promise((resolve) => {
13
13
  console.log(`\n--- Running ${name} ---`);
14
14
  const child = spawn("node", [script], {
15
15
  stdio: "inherit",
16
- cwd: process.cwd()
16
+ cwd: process.cwd(),
17
17
  });
18
18
  child.on("close", (code) => {
19
19
  if (code === 0) {
@@ -36,7 +36,7 @@ async function runAllChecks() {
36
36
  allPassed = false;
37
37
  }
38
38
  }
39
- console.log("\n" + "=".repeat(50));
39
+ console.log(`\n${"=".repeat(50)}`);
40
40
  if (allPassed) {
41
41
  console.log("🎉 All checks passed! Your code stays gold! ✨");
42
42
  process.exit(0);
package/dist/todos.js CHANGED
@@ -6,7 +6,7 @@ import { resolve } from "node:path";
6
6
  import { walk } from "./walk.js";
7
7
  const exts = [".js", ".ts", ".astro", ".css", ".tsx"];
8
8
  const rootDir = resolve(process.cwd(), "src");
9
- const publicDir = resolve(process.cwd(), "public");
9
+ // const publicDir = resolve(process.cwd(), "public");
10
10
  function checkTodos(files) {
11
11
  let totalCount = 0;
12
12
  files.forEach((file) => {
@@ -20,9 +20,9 @@ function checkTodos(files) {
20
20
  return totalCount;
21
21
  }
22
22
  const srcFiles = walk(rootDir, exts);
23
- const publicFiles = walk(publicDir, exts);
24
- const allFiles = srcFiles.concat(publicFiles);
25
- const todoCount = checkTodos(allFiles);
23
+ // const publicFiles = walk(publicDir, exts);
24
+ // const allFiles = srcFiles.concat(publicFiles);
25
+ const todoCount = checkTodos(srcFiles);
26
26
  if (todoCount > 0) {
27
27
  console.warn(`Total TODOs found: ${todoCount}`);
28
28
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stay-gold",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "description": "Checks and balances for code quality. Run as a dev dependency in any project.",
6
6
  "main": "dist/index.js",