Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style(common, codemods, analytics, design-tokens): Fix docs by markdown linter #1804

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 0 additions & 9 deletions .remarkignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,7 @@ build

# Temporary disabled packages
# we will fix them incrementally
analytics
codemods
common
configs
design-tokens
demo
docs
examples
exporters
form-validations
icons
web-twig
web-react
15 changes: 14 additions & 1 deletion .remarkrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export default {
...config,
plugins: [
...config.plugins,
'remark-frontmatter',

// Values should increment by one from the first item
// @see: https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-ordered-list-marker-value
['remark-lint-ordered-list-marker-value', 'ordered'],
Expand Down Expand Up @@ -35,7 +37,18 @@ export default {
[
'remark-lint-heading-capitalization',
{
lowerCaseWords: ['eu/spirit', '@lmc', 'spirit/node', 'spirit/jsdom', 'v1', 'v2', 'v3'],
lowerCaseWords: [
'eu/spirit',
'@lmc',
'spirit/node',
'spirit/jsdom',
'analytics',
'codemods',
'common',
'v1',
'v2',
'v3',
literat marked this conversation as resolved.
Show resolved Hide resolved
],
},
],
],
Expand Down
11 changes: 10 additions & 1 deletion configs/jest-config-spirit/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

# jest-config-spirit

> Jest configuration and preset for Spirit Design System

## Getting started
## Getting Started

This preset is part of this monorepo only and thus it is accessible for every package.

Expand All @@ -14,10 +17,16 @@ yarn add jest-config-spirit

## ⚙️ Configurations

<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

### `jest-preset-spirit/node`

The default Jest configuration for Node.js projects.

<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

### `jest-preset-spirit/jsdom`

The extension of the default preset for projects that require a browser-like (DOM) environment.
Expand Down
5 changes: 4 additions & 1 deletion configs/prettier-config-spirit/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

# prettier-config-spirit

> Prettier configuration and preset for Spirit Design System

## Getting started
## Getting Started

This preset is part of this monorepo only and thus it is accessible for every package.

Expand Down
5 changes: 4 additions & 1 deletion configs/stylelint-config-spirit/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

# stylelint-config-spirit

> Stylelint configuration and preset for Spirit Design System

## Getting started
## Getting Started

This preset is part of this monorepo only and thus it is accessible for every package.

Expand Down
2 changes: 1 addition & 1 deletion docs/postmortems/0000-00-00-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ issues and Pull Requests in the "Bug" column with the appropriate owners -->
- Item B
- Item C

## Timeline (all times in CET/CEST)
## Timeline (all Times in CET/CEST)

2024-01-01

Expand Down
4 changes: 2 additions & 2 deletions docs/postmortems/2024-02-05-deprecated-icon-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This problem was detected multiple times by the developers and the support quest

Also, the message appeared in the browser console and the server logs:

```
```bash
Warning: Icon component is not supported in SSR without use of `html-react-parser`. Please install missing peer dependency.
```

Expand Down Expand Up @@ -88,7 +88,7 @@ issues and Pull Requests in the "Bug" column with the appropriate owners -->

- Usage of the `warning` utility everywhere the deprecation is raised and the condition about the `production` environment ensures that the deprecation messages are raised only in the development environment.

## Timeline (all times in CET/CEST)
## Timeline (all Times in CET/CEST)

2023-12-27

Expand Down
2 changes: 1 addition & 1 deletion examples/next-with-app-router/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Example Next.js application with app router
# Example Next.js Application with App Router

This application is used to demonstrate the configuration of a Next.js application with an App router for use with the Spirit Design System.

Expand Down
2 changes: 1 addition & 1 deletion examples/next-with-pages-router/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Example Next.js application with pages router
# Example Next.js Application with Pages Router

This application is used to demonstrate the configuration of a Next.js application with an App router for use with the Spirit Design System.

Expand Down
4 changes: 2 additions & 2 deletions exporters/assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

The Spirit Assets Exporter allows you to **export a list of images** in such a way that it can be immediately used in your production codebase. This specific exporter exports assets in generic fashion, as SVG format, without any additional formatting or generated support files.

### Exporter Output
## Exporter Output

This exporter will render image assets defined inside one specific brand and will produce flat structure:

⚠️ We only output assets from `icons` directory.

### Naming
## Naming

The names of icons will be constructed from the original name.

Expand Down
4 changes: 2 additions & 2 deletions exporters/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Supernova][supernova-studio] JS exporter made for Spirit Design System developed by [Alma Career (formerly LMC)][alma-career].

## Token operations
## Token Operations

This exported does several operations with tokens:

Expand All @@ -26,7 +26,7 @@ Font Family Ebony has a different font weight mapping in Figma and in Adobe Font

Tokens are sorted alphabetically by origin (Figma) name or by name (Supernova). Except Measures - sorted by name number and Other - sorted by value.

## Outputs:
## Outputs

- borders.ts
- colors.ts
Expand Down
4 changes: 2 additions & 2 deletions exporters/scss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Supernova][supernova-studio] SCSS exporter made for Spirit Design System developed by [Alma Career (formerly LMC)][alma-career].

## Token operations
## Token Operations

This exported does several operations with tokens:

Expand All @@ -26,7 +26,7 @@ Font Family Ebony has a different font weight mapping in Figma and in Adobe Font

Tokens are sorted alphabetically by origin (Figma) name or by name (Supernova). Except Measures - sorted by name number and Other - sorted by value.

## Outputs:
## Outputs

- \_borders.scss
- \_colors.scss
Expand Down
4 changes: 2 additions & 2 deletions exporters/tokens/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Supernova][supernova-studio] tokens exporter made for Spirit Design System developed by [Alma Career (formerly LMC)][alma-career].

## Token operations
## Token Operations

This exported does several operations with tokens:

Expand All @@ -26,7 +26,7 @@ Font Family Ebony has a different font weight mapping in Figma and in Adobe Font

Tokens are sorted alphabetically by origin (Figma) name or by name (Supernova). Except Measures - sorted by name number and Other - sorted by value.

## Outputs:
## Outputs

- \_borders.scss
- \_colors.scss
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"remark-cli": "12.0.1",
"remark-frontmatter": "^5.0.0",
"remark-lint-heading-capitalization": "1.2.0",
"sass-loader": "14.2.1",
"style-loader": "4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ By default, the output will be saved into the `.scanner` directory, but you can
spirit-analytics --output path/to/folder
```

The [react-scanner] requires a [config file][react-scanner-config] to make it work, `spirit-analytics` has a default config inside, but if you need to, you can use your own config:
The [react-scanner][react-scanner] requires a [config file][react-scanner-config] to make it work, `spirit-analytics` has a default config inside, but if you need to, you can use your own config:

```shell
spirit-analytics --config path/to/config
Expand Down
6 changes: 3 additions & 3 deletions packages/codemods/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Codemods adhere to a clear and organized naming convention, following the kebab

This naming convention ensures consistency and ease of understanding, facilitating seamless integration and maintenance of codemods within the project.

### Example naming
### Example Naming

```
```text
<component-name>-<purpose-of-codemod>.ts
| |
| └─⫸ Codemod purpose
Expand All @@ -29,7 +29,7 @@ This naming convention ensures consistency and ease of understanding, facilitati

The file structure below outlines a standard organization for codemods within the project:

```
```text
─── src
└── transforms
└── v2
Expand Down
3 changes: 3 additions & 0 deletions packages/demo/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

# @lmc-eu/spirit-demo

> Scripts, Styles and Partials for showcase apps of Spirit Design System.
Expand Down
12 changes: 10 additions & 2 deletions packages/design-tokens/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

# @lmc-eu/spirit-design-tokens

> Design tokens for Spirit Design System.
Expand Down Expand Up @@ -154,9 +157,12 @@ module: {

</details>

##### Using the sass-embedded Library
<!-- https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

#### Using the `sass-embedded` Library

If you're using `sass-embedded`, you can specify the API as `legacy`, `modern`, or `modern-compiler`. More information can be found in [sass documentation](sass-embedded).
If you're using `sass-embedded`, you can specify the API as `legacy`, `modern`, or `modern-compiler`. More information can be found in [sass documentation][sass-embedded].

We recommend using the `modern-compiler` option.
Please note that this change also requires updating `includePaths` to `loadPaths`.
Expand Down Expand Up @@ -300,6 +306,8 @@ With `@` prefix:
<details>
<summary>How do I derive design tokens for my own design system?</summary>

<!--lint ignore no-emphasis-as-heading-->

**Creating a custom design system derived from Spirit? Great to hear that! 🎉**

While it's perfectly OK to develop custom components that may not find their way
Expand Down
20 changes: 12 additions & 8 deletions packages/icons/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

# @lmc-eu/spirit-icons

> Icons of Spirit Design System.

## Install

🙋🏻‍♂️ **Hold on! Do you already use [`spirit-web`]?** Then you don't need to
🙋🏻‍♂️ **Hold on! Do you already use [`spirit-web`][spirit-web]?** Then you don't need to
install this package because `spirit-icons` is installed automatically
as a dependency of [`spirit-web`].
as a dependency of [`spirit-web`][spirit-web].

If you want to use just `spirit-icons` alone in your project, run:

Expand All @@ -28,13 +31,13 @@ or themself.

## Usage

### SVG files
### SVG Files

You can use SVG files directly from `@lmc-eu/spirit-icons/svg` directory by importing them or copying them to your app structure.

### React

You can import SVG files directly from `@lmc-eu/spirit-icons/svg` directory in React components using a library like [React SVGR](https://react-svgr.com/).
You can import SVG files directly from `@lmc-eu/spirit-icons/svg` directory in React components using a library like [React SVGR][react-svgr].

Example configuration for Webpack:

Expand Down Expand Up @@ -64,7 +67,7 @@ import WarningIcon from '@lmc-eu/spirit-icons/react/WarningIcon';
<WarningIcon />;
```

### Icons paths
### Icons Paths

Alternatively you can use an `icons` object which consists of an icon name and SVG content. Thus you can fabricate your icon yourself.

Expand Down Expand Up @@ -99,7 +102,8 @@ export default nextConfig;

This configuration is not required if you are using the Next.js App Router.

For more information, please see the [Next.js documentation][nextjs-transpilePackages].
For more information, please see the [Next.js documentation][nextjs-transpile-packages].

[`spirit-web`]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web
[nextjs-transpilePackages]: https://nextjs.org/docs/pages/api-reference/next-config-js/transpilePackages
[spirit-web]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web
[nextjs-transpile-packages]: https://nextjs.org/docs/pages/api-reference/next-config-js/transpilePackages
[react-svgr]: https://react-svgr.com/
3 changes: 3 additions & 0 deletions packages/web/DEPRECATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ This document lists all deprecations that will be removed in the next major vers

## Deprecations

<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

### Collapse `data-spirit-is-disposable`
literat marked this conversation as resolved.
Show resolved Hide resolved

The `data-spirit-more` attribute was removed, please use `data-spirit-is-disposable` instead.
Expand Down
7 changes: 2 additions & 5 deletions packages/web/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<!-- @see: https://github.com/ilyatitovich/remark-lint-heading-capitalization/issues/13 -->
<!--lint disable heading-capitalization -->
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization -->

# @lmc-eu/spirit-web

<!--lint enable heading-capitalization -->

> CSS implementation of Spirit Design System.

## Install
Expand Down Expand Up @@ -260,7 +258,6 @@ Check your browser console to see if you are using any of the deprecated functio
See the [LICENSE][license] file for information.

[all-deprecations]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web/DEPRECATIONS.md
[configuring-load-path]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/design-tokens#configuring-load-path
[deprecations]: https://github.com/lmc-eu/spirit-design-system/blob/main/static/deprecations-browser-console.png?raw=true
[design-tokens-usage]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/design-tokens#basic-usage
[design-tokens-load-path]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/design-tokens#in-sass
Expand Down
Loading
Loading