Skip to content

Commit

Permalink
fix(monorepo): Resolve issue with markdown across entire monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
sullivanpj committed Oct 8, 2024
1 parent 6822f77 commit ee6720c
Show file tree
Hide file tree
Showing 27 changed files with 90 additions and 720 deletions.
34 changes: 4 additions & 30 deletions apps/nx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,44 +38,18 @@ This package is part of the ⚡<b>Storm Stack</b> monorepo. Storm Stack packages

<br />

<!-- START doctoc -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [Storm-Stack Nx Tools](#storm-stack-nx-tools)
- [Installing](#installing)
- [Executors](#executors)
- [Storm-Stack Tamagui Compiler](#storm-stack-tamagui-compiler)
- [Example](#example)
- [Generators](#generators)
- [Building](#building)
- [Running unit tests](#running-unit-tests)
- [Storm Workspaces](#storm-workspaces)
- [Roadmap](#roadmap)
- [Support](#support)
- [License](#license)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Contributors](#contributors)

<!-- END doctoc -->

<br />

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- END header -->

# Storm-Stack Nx Tools

A package containing tools for managing a Storm workspace. It includes various
[Nx](https://nx.dev) generators and executors for common development tasks.

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- START doctoc -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- END doctoc -->

<br />

This library was generated with [Nx](https://nx.dev).

Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default getStormConfig({
"function-paren-newline": 0,
"space-before-function-paren": 0
},
markdown: false,
markdown: true,
react: false,
tsConfigType: "recommended",
useUnicorn: true
Expand Down
42 changes: 2 additions & 40 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,6 @@ This package is part of the ⚡<b>Storm Stack</b> monorepo. Storm Stack packages

<br />

<!-- START doctoc -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [Command Line Utility Library](#command-line-utility-library)
- [Table of Contents](#table-of-contents)
- [Installing](#installing)
- [Reduced Package Size](#reduced-package-size)
- [Development](#development)
- [Building](#building)
- [Running unit tests](#running-unit-tests)
- [Linting](#linting)
- [Storm Workspaces](#storm-workspaces)
- [Roadmap](#roadmap)
- [Support](#support)
- [License](#license)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Contributors](#contributors)

<!-- END doctoc -->

<br />

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
Expand All @@ -74,25 +51,10 @@ A collection of CLI utilities to assist in creating command line applications
<!-- START doctoc -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

## Table of Contents

- [Installing](#installing)
- [Reduced Package Size](#reduced-package-size)
- [Development](#development)
- [Building](#building)
- [Running unit tests](#running-unit-tests)
- [Linting](#linting)
- [Storm Workspaces](#storm-workspaces)
- [Roadmap](#roadmap)
- [Support](#support)
- [License](#license)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Contributors](#contributors)
- [💻 Visit stormsoftware.org to stay up to date with this developer](#-visit-stormsoftwareorg-to-stay-up-to-date-with-this-developer)

<!-- END doctoc -->

<br />

## Installing

Using [pnpm](http://pnpm.io):
Expand Down
43 changes: 2 additions & 41 deletions packages/date-time/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,6 @@ This package is part of the ⚡<b>Storm Stack</b> monorepo. Storm Stack packages

<br />

<!-- START doctoc -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [Storm Date-Time Package](#storm-date-time-package)
- [Table of Contents](#table-of-contents)
- [Installing](#installing)
- [Reduced Package Size](#reduced-package-size)
- [Development](#development)
- [Building](#building)
- [Running unit tests](#running-unit-tests)
- [Linting](#linting)
- [Storm Workspaces](#storm-workspaces)
- [Roadmap](#roadmap)
- [Support](#support)
- [License](#license)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Contributors](#contributors)

<!-- END doctoc -->

<br />

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

Expand All @@ -77,25 +53,10 @@ environment.
<!-- START doctoc -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

## Table of Contents

- [Installing](#installing)
- [Reduced Package Size](#reduced-package-size)
- [Development](#development)
- [Building](#building)
- [Running unit tests](#running-unit-tests)
- [Linting](#linting)
- [Storm Workspaces](#storm-workspaces)
- [Roadmap](#roadmap)
- [Support](#support)
- [License](#license)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Contributors](#contributors)
- [💻 Visit stormsoftware.org to stay up to date with this developer](#-visit-stormsoftwareorg-to-stay-up-to-date-with-this-developer)

<!-- END doctoc -->

<br />

## Installing

Using [pnpm](http://pnpm.io):
Expand Down
43 changes: 2 additions & 41 deletions packages/errors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,6 @@ This package is part of the ⚡<b>Storm Stack</b> monorepo. Storm Stack packages

<br />

<!-- START doctoc -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [Storm Errors Package](#storm-errors-package)
- [Table of Contents](#table-of-contents)
- [Installing](#installing)
- [Reduced Package Size](#reduced-package-size)
- [Development](#development)
- [Building](#building)
- [Running unit tests](#running-unit-tests)
- [Linting](#linting)
- [Storm Workspaces](#storm-workspaces)
- [Roadmap](#roadmap)
- [Support](#support)
- [License](#license)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Contributors](#contributors)

<!-- END doctoc -->

<br />

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

Expand All @@ -76,25 +52,10 @@ throughout your application.
<!-- START doctoc -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

## Table of Contents

- [Installing](#installing)
- [Reduced Package Size](#reduced-package-size)
- [Development](#development)
- [Building](#building)
- [Running unit tests](#running-unit-tests)
- [Linting](#linting)
- [Storm Workspaces](#storm-workspaces)
- [Roadmap](#roadmap)
- [Support](#support)
- [License](#license)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Contributors](#contributors)
- [💻 Visit stormsoftware.org to stay up to date with this developer](#-visit-stormsoftwareorg-to-stay-up-to-date-with-this-developer)

<!-- END doctoc -->

<br />

## Installing

Using [pnpm](http://pnpm.io):
Expand Down
43 changes: 2 additions & 41 deletions packages/file-system/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,6 @@ This package is part of the ⚡<b>Storm Stack</b> monorepo. Storm Stack packages

<br />

<!-- START doctoc -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [file-system](#file-system)
- [Table of Contents](#table-of-contents)
- [Installing](#installing)
- [Reduced Package Size](#reduced-package-size)
- [Development](#development)
- [Building](#building)
- [Running unit tests](#running-unit-tests)
- [Linting](#linting)
- [Storm Workspaces](#storm-workspaces)
- [Roadmap](#roadmap)
- [Support](#support)
- [License](#license)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Contributors](#contributors)

<!-- END doctoc -->

<br />

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

Expand All @@ -74,25 +50,10 @@ A utility package containing various methods used to manipulate files
<!-- START doctoc -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

## Table of Contents

- [Installing](#installing)
- [Reduced Package Size](#reduced-package-size)
- [Development](#development)
- [Building](#building)
- [Running unit tests](#running-unit-tests)
- [Linting](#linting)
- [Storm Workspaces](#storm-workspaces)
- [Roadmap](#roadmap)
- [Support](#support)
- [License](#license)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Contributors](#contributors)
- [💻 Visit stormsoftware.org to stay up to date with this developer](#-visit-stormsoftwareorg-to-stay-up-to-date-with-this-developer)

<!-- END doctoc -->

<br />

## Installing

Using [pnpm](http://pnpm.io):
Expand Down
4 changes: 2 additions & 2 deletions packages/file-system/src/files/file-path-fns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function hasFilePath(filePath: string): boolean {
*/
export function resolvePath(
filePath: string,
basePath: string = getWorkspaceRoot()
basePath: string = getWorkspaceRoot() as string
) {
if (isAbsolute(filePath)) {
return filePath;
Expand All @@ -129,7 +129,7 @@ export function resolvePath(
* @returns The resolved file path
*/
export function relativeToWorkspaceRoot(filePath: string) {
return relative(filePath, getWorkspaceRoot());
return relative(filePath, getWorkspaceRoot() as string);
}

/**
Expand Down
16 changes: 11 additions & 5 deletions packages/file-system/src/package-management/get-tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const stripJsonComments = (
}
}
if (isInsideString) {
// eslint-disable-next-line no-continue
continue;
}
if (
Expand Down Expand Up @@ -113,6 +114,7 @@ const stripJsonComments = (
commaIndex = -1;
} else if (
currentCharacter !== " " &&
// eslint-disable-next-line no-tabs
currentCharacter !== " " &&
currentCharacter !== "\r" &&
currentCharacter !== "\n"
Expand Down Expand Up @@ -140,6 +142,7 @@ const stripJsonComments = (

const jsoncParse = (data: string) => {
try {
// eslint-disable-next-line no-new-func
return new Function(`return ${stripJsonComments(data).trim()}`)();
} catch {
return {};
Expand All @@ -166,8 +169,9 @@ const findUp = (
};

const resolveTsConfigFromFile = (cwd: string, filename: string) => {
if (path.isAbsolute(filename))
if (path.isAbsolute(filename)) {
return fs.existsSync(filename) ? filename : null;
}
return findUp(filename, cwd);
};

Expand Down Expand Up @@ -197,7 +201,7 @@ const loadTsConfigInternal = (

const data = jsoncParse(fs.readFileSync(id, "utf8"));
const configDir = path.dirname(id);
// biome-ignore lint/suspicious/noAssignInExpressions: <explanation>
// eslint-disable-next-line no-cond-assign
if ((_a = data.compilerOptions) === null ? void 0 : _a.baseUrl) {
data.compilerOptions.baseUrl = path.join(
configDir,
Expand All @@ -214,11 +218,13 @@ const loadTsConfigInternal = (
const parentConfig: any = loadTsConfigInternal(configDir, name2, true);
if (parentConfig) {
Object.assign(extendsData, {
...(parentConfig == null ? void 0 : parentConfig.data),
...(parentConfig === null ? void 0 : parentConfig.data),
compilerOptions: {
...extendsData.compilerOptions,
// biome-ignore lint/suspicious/noAssignInExpressions: <explanation>
...((_b = parentConfig == null ? void 0 : parentConfig.data) == null

// eslint-disable-next-line no-cond-assign
...((_b = parentConfig === null ? void 0 : parentConfig.data) ===
null
? void 0
: _b.compilerOptions)
}
Expand Down
1 change: 1 addition & 0 deletions packages/file-system/src/package-management/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
-------------------------------------------------------------------*/

export * from "./chmod";
export * from "./get-tsconfig";
export * from "./package-fns";
export * from "./semver-fns";
4 changes: 3 additions & 1 deletion packages/file-system/src/package-management/package-fns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const PackageManagers = {

function findUp(names: string[], cwd: string): string | undefined {
let dir = cwd;
// eslint-disable-next-line no-constant-condition

while (true) {
const target = names.find(name => exists(joinPaths(dir, name)));
if (target) return target;
Expand Down Expand Up @@ -77,7 +77,9 @@ export function installPackage(
exactVersion = true
) {
const manager = pkgManager ?? getPackageManager(projectPath);
// eslint-disable-next-line no-console
console.log(`Installing package "${pkg}@${tag}" with ${manager}`);

switch (manager) {
case "yarn": {
execute(
Expand Down
Loading

0 comments on commit ee6720c

Please sign in to comment.