Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor
  • Loading branch information
francoismassart committed Jul 18, 2025
commit 0605eeb93ab0cd31904f8f96161152f51d38455d
11 changes: 11 additions & 0 deletions docs/rules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Be careful when you edit the docs

## Each rule's documentation is partially generated

Running `pnpm docs:init` will create new files if needed.

Running `pnpm docs:update` will update the existing docs.

## Generated sections

The generated sections are surrounded by HTML comments mentioning "auto-generated".
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ module.exports = {
preset: "ts-jest",
testEnvironment: "node",
testMatch: ["**/*.spec.ts"],
// Jest running with imported vitest utils causes errors like:
// Vitest cannot be imported in a CommonJS module using require(). Please use "import" instead.
modulePathIgnorePatterns: ["<rootDir>/src/util/tailwindcss-api/worker/"],
};
4 changes: 2 additions & 2 deletions src/rules/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { myRule } from "./my-rule";
import { myRule, RULE_NAME as MY_RULE } from "./my-rule";

export const rules = {
"my-rule": myRule,
[MY_RULE]: myRule,
};
2 changes: 2 additions & 0 deletions src/util/tailwindcss-api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import { type Theme } from "./types";
export const loadThemeWorker: (cssConfigPath: string) => Theme = createSyncFn(
require.resolve("./worker/load-theme.mjs")
);

export const getSortedClassNamesWorker: (
cssConfigPath: string,
unorderedClassNames: Array<string>
) => Array<string> = createSyncFn(
require.resolve("./worker/get-sorted-class-names.mjs")
);

export const isValidClassNameWorker: (
cssConfigPath: string,
className: string
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"declaration": false,
"declarationMap": false,
"esModuleInterop": true,
"isolatedModules": true,
"module": "nodenext",
"moduleResolution": "nodenext",
"noFallthroughCasesInSwitch": true,
Expand Down