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

Lint Markdown of the form-validations package #1819

Merged
merged 7 commits into from
Dec 19, 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
7 changes: 2 additions & 5 deletions .remarkignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@ dist
build
.github

# Temporary disabled packages
# we will fix them incrementally
form-validations
# Codemods transforms directory
transforms
# Fix case of the files
MIGRATION-*
17 changes: 3 additions & 14 deletions .remarkrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,9 @@ export default {
[
'remark-lint-heading-capitalization',
{
lowerCaseWords: [
'eu/spirit',
'@lmc',
'spirit/node',
'spirit/jsdom',
'analytics',
'codemods',
'common',
'v1',
'v2',
'v3',
'v4',
'vs',
],
lowerCaseWords: ['v1', 'v2', 'v3', 'v4', 'vs'],
exclude: ['`web`', '`web-react`'],
ignorePattern: ['^@lmc-eu/spirit-.*', '^spirit-.*', '`.*`', '.*-config-spirit'],
},
],

Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Here are some tips how to make your contributing efforts efficient and eventuall

This project uses `makefile` for managing various chores, like dependency installation, testing, linting etc. Make sure you run `make` right after you clone the repository - it will set you up with everything needed to get started. Once you are done with that, have a look at what commands (targets) are available for you to run using `make` - `make install` etc.

## [Decisions](https://github.com/lmc-eu/spirit-design-system/blob/main/docs/decisions/README.md)
## Decisions

The reasoning behind various decisions made for the Spirit Design System. A good historical record.
The reasoning behind various [decisions][decisions] made for the Spirit Design System. A good historical record.

## Project Structure

Expand Down Expand Up @@ -278,8 +278,9 @@ PR can be merged only by the appropriate group of maintainers.
[act-article]: https://www.freecodecamp.org/news/how-to-run-github-actions-locally/
[conventional-commits]: https://www.conventionalcommits.org
[commitlint-config]: https://github.com/lmc-eu/code-quality-tools/tree/main/packages/commitlint-config
[dictionary]: https://github.com/lmc-eu/spirit-design-system/tree/main/docs/DICTIONARIES.md
[decisions]: https://github.com/lmc-eu/spirit-design-system/blob/main/docs/decisions/README.md
[developer-handbook]: https://github.com/lmc-eu/spirit-design-system/tree/main/docs/contribution/development.md
[dictionary]: https://github.com/lmc-eu/spirit-design-system/tree/main/docs/DICTIONARIES.md
[docker]: https://www.docker.com/
[eslint]: https://eslint.org/
[jest]: https://jestjs.io/
Expand Down
5 changes: 0 additions & 5 deletions DEPRECATIONS-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ Introducing deprecations and feature flags to be removed in the version 2 lists.

💁 Please follow these steps to safely upgrade your Design System to Spirit Design System v2 components.

<!-- @see: https://github.com/ilyatitovich/remark-lint-heading-capitalization/issues/13 -->
<!--lint disable heading-capitalization -->

## @lmc-eu/spirit-web v2

- [Deprecations][web-deprecations-v2]
Expand All @@ -19,8 +16,6 @@ Introducing deprecations and feature flags to be removed in the version 2 lists.

## @lmc-eu/spirit-web-twig v2

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

- _spirit-web-twig_ was released as version 2 already. See the [CHANGELOG][twig-changelog] for more details or refer to the [migration guide][twig-migration-v2].

---
Expand Down
5 changes: 0 additions & 5 deletions DEPRECATIONS-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ Introducing deprecations and feature flags to be removed in the version 3 lists.

💁 Please follow these steps to safely upgrade your Design System to Spirit Design System v3 components.

<!-- @see: https://github.com/ilyatitovich/remark-lint-heading-capitalization/issues/13 -->
<!--lint disable heading-capitalization -->

## @lmc-eu/spirit-web-twig v3

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

- [Deprecations][web-twig-deprecations]

---
Expand Down
9 changes: 0 additions & 9 deletions configs/jest-config-spirit/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

# jest-config-spirit

> Jest configuration and preset for Spirit Design System
Expand All @@ -17,16 +14,10 @@ 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
3 changes: 0 additions & 3 deletions configs/prettier-config-spirit/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

# prettier-config-spirit

> Prettier configuration and preset for Spirit Design System
Expand Down
3 changes: 0 additions & 3 deletions configs/stylelint-config-spirit/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint ignore heading-capitalization-->

# stylelint-config-spirit

> Stylelint configuration and preset for Spirit Design System
Expand Down
7 changes: 1 addition & 6 deletions docs/contribution/experimental-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ documented in each package's main README file in the section `Feature Flags`.

All feature flags follow a prefix naming convention that indicates status.

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

#### Flags Prefixed with `enable-*`

- Contain new features that we'd like consuming projects to test
Expand All @@ -95,9 +92,6 @@ All feature flags follow a prefix naming convention that indicates status.
If you use these flags, make sure to check our release notes where we'll outline
any changes to them across our releases.

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

#### Flags Prefixed with `enable-v#-*`

As the usage of an existing flag increases or we determine a feature to be of high
Expand Down Expand Up @@ -153,6 +147,7 @@ if it can be moved (most of the time the team will initiate this move).
The issue should contain the following criteria that need to
be met to move a component from experimental to stable:

<!-- Because of the GitHub syntax for the checkboxes -->
<!--lint disable no-undefined-references-->

- [ ] All components are exported through main package export file and should not be `UNSTABLE_`
Expand Down
2 changes: 1 addition & 1 deletion docs/contribution/release-schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ To get support for a specific version, please refer to the [support Slack channe

## Release Names

To get more information about the release names, please refer to the [Release Namse Decision][release-name-decision].
To get more information about the release names, please refer to the [Release Names Decision][release-names-decision].

## Assets Managed Under This Release Schedule

Expand Down
3 changes: 0 additions & 3 deletions docs/migrations/web-react/MIGRATION-v1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint disable heading-capitalization-->

# Migration Guide

Introducing version 1 of the _spirit-web-react_ package
Expand Down
3 changes: 0 additions & 3 deletions docs/migrations/web-react/MIGRATION-v2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint disable heading-capitalization-->

# Migration Guide

Introducing version 2 of the _spirit-web-react_ package.
Expand Down
3 changes: 0 additions & 3 deletions docs/migrations/web-react/MIGRATION-v3.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint disable heading-capitalization-->

# Migration Guide

Introducing version 3 of the _spirit-web-react_ package.
Expand Down
3 changes: 0 additions & 3 deletions docs/migrations/web-twig/MIGRATION-v2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint disable heading-capitalization-->

# Migration Guide

Introducing version 2 of the _spirit-web-twig_ package
Expand Down
3 changes: 0 additions & 3 deletions docs/migrations/web-twig/MIGRATION-v3.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint disable heading-capitalization-->

# Migration Guide

Introducing version 3 of the _spirit-web-twig_ package.
Expand Down
3 changes: 0 additions & 3 deletions docs/migrations/web-twig/MIGRATION-v4.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint disable heading-capitalization-->

# Migration Guide

Introducing version 4 of the _spirit-web-twig_ package.
Expand Down
3 changes: 0 additions & 3 deletions docs/migrations/web/MIGRATION-v1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint disable heading-capitalization-->

# Migration Guide

Introducing version 1 of the _spirit-web_ package
Expand Down
3 changes: 0 additions & 3 deletions docs/migrations/web/MIGRATION-v2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint disable heading-capitalization-->

# Migration Guide

Introducing version 2 of the _spirit-web_ package.
Expand Down
3 changes: 0 additions & 3 deletions docs/migrations/web/MIGRATION-v3.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @see: https://jira.almacareer.tech/browse/DS-1604 -->
<!--lint disable heading-capitalization-->

# Migration Guide

Introducing version 3 of the _spirit-web_ package.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"react-dom": "18.3.1",
"remark-cli": "12.0.1",
"remark-frontmatter": "5.0.0",
"remark-lint-heading-capitalization": "1.2.0",
"remark-lint-heading-capitalization": "https://github.com/literat/remark-lint-heading-capitalization.git",
"sass-loader": "14.2.1",
"style-loader": "4.0.0",
"typescript": "4.7.4",
Expand Down
10 changes: 5 additions & 5 deletions packages/codemods/src/transforms/v2/web-react/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Web-React v2 Codemods
# `web-react` v2 Codemods

This is a collection of codemods for updating Web-React v2 components.

You can find instructions on how to run these codemods in the main package [README](https://github.com/lmc-eu/spirit-design-system/blob/main/packages/codemods/README.md).

## Included Scripts

### `v2/web-react/dropdown-tooltip-flow-placement` — Dropdown & Tooltip Flow placements
### `v2/web-react/dropdown-tooltip-flow-placement` — Dropdown & Tooltip Flow Placements

This codemod updates the placement props in `Dropdown` and `Tooltip` components.
It transforms removed non-flow-related placements to their flow-related counterparts.
Expand Down Expand Up @@ -102,7 +102,7 @@ npx @lmc-eu/spirit-codemods -p <path> -t v2/web-react/grid-gridspan
+ <GridItem columnStart={5} columnEnd="span 4" … />
```

### `v2/web-react/header-headerdesktopactions-isatend` — HeaderDesktopActions isAtEnd Prop
### `v2/web-react/header-headerdesktopactions-isatend` — HeaderDesktopActions `isAtEnd` Prop

This codemod sets the `isAtEnd` prop instead of the removed `color="secondary"` prop.
Also it removes the `color="primary"` prop from the `HeaderDesktopActions` component
Expand Down Expand Up @@ -143,7 +143,7 @@ npx @lmc-eu/spirit-codemods -p <path> -t v2/web-react/modal-custom-height
+ <ModalDialog height={{ mobile: "300px", tablet: "400px" }} maxHeight={{ tablet: "500px" }} … />
```

### `v2/web-react/modal-isdockedonmobile-prop` — Modal isDockedOnMobile Prop
### `v2/web-react/modal-isdockedonmobile-prop` — Modal `isDockedOnMobile` Prop

This codemod adds the `isDockedOnMobile` prop to the `ModalDialog` component,
if it is missing. The purpose of this is to maintain the same behaviour as
Expand All @@ -162,7 +162,7 @@ npx @lmc-eu/spirit-codemods -p <path> -t v2/web-react/modal-isdockedonmobile-pro
+ <ModalDialog isDockedOnMobile … />
```

### `v2/web-react/modal-isscrollable-prop` — Modal isScrollable Prop
### `v2/web-react/modal-isscrollable-prop` — Modal `isScrollable` Prop

This codemod adds the `isScrollable` prop to the `ModalDialog` component,
if it is missing. The purpose of this is to maintain the same behaviour as
Expand Down
14 changes: 7 additions & 7 deletions packages/codemods/src/transforms/v3/web-react/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Web-React v3 Codemods
# `web-react` v3 Codemods

This is a collection of codemods for updating Web-React v3 components.

You can find instructions on how to run these codemods in the main package [README](https://github.com/lmc-eu/spirit-design-system/blob/main/packages/codemods/README.md).

## Included Scripts

### `v3/web-react/link-underlined-prop` — Link `isUnderlined` to `underlined` prop change
### `v3/web-react/link-underlined-prop` — Link `isUnderlined` to `underlined` Prop Change

This codemod updates the `Link` component by replacing the `isUnderlined` prop with a new `underlined` prop, setting it to "always".

Expand All @@ -23,7 +23,7 @@ npx @lmc-eu/spirit-codemods -p <path> -t v3/web-react/link-underlined-prop
+ <Link underlined="always" … />
```

### `v3/web-react/button-isSquare-prop-name` — Button `isSquare` to `isSymmetrical` prop change
### `v3/web-react/button-isSquare-prop-name` — Button `isSquare` to `isSymmetrical` Prop Change

This codemod updates the `Button` component by replacing the `isSquare` prop with a `isSymmetrical` prop.

Expand All @@ -38,7 +38,7 @@ npx @lmc-eu/spirit-codemods -p <path> -t v3/web-react/button-isSquare-prop-name
+ <Button isSymmetrical … />
```

### `v3/web-react/buttonLink-isSquare-prop-name` — ButtonLink `isSquare` to `isSymmetrical` prop change
### `v3/web-react/buttonLink-isSquare-prop-name` — ButtonLink `isSquare` to `isSymmetrical` Prop Change

This codemod updates the `ButtonLink` component by replacing the `isSquare` prop with a `isSymmetrical` prop.

Expand All @@ -53,7 +53,7 @@ npx @lmc-eu/spirit-codemods -p <path> -t v3/web-react/buttonLink-isSquare-prop-n
+ <ButtonLink isSymmetrical … />
```

### `v3/web-react/heading-elementType-prop` — Add `elementType="div"` to Heading component
### `v3/web-react/heading-elementType-prop` — Add `elementType="div"` to Heading Component

The `elementType` prop is now mandatory in the `Heading` component.
This codemod updates the `Heading` component by adding `elementType="div"` if the `elementType` prop is missing.
Expand All @@ -69,7 +69,7 @@ npx @lmc-eu/spirit-codemods -p <path> -t v3/web-react/heading-elementType-prop
+ <Heading elementType="div" … />
```

### `v3/web-react/link-hasVisitedStyleAllowed-prop` — Add `hasVisitedStyleAllowed` to Link component inside Heading component
### `v3/web-react/link-hasVisitedStyleAllowed-prop` — Add `hasVisitedStyleAllowed` to Link Component Inside Heading Component

The Link component now allows to have visited state style. The `Heading` component had previously set visited state styling by default.
This codemod updates the `Link` component inside the `Heading` component by adding `hasVisitedStyleAllowed`.
Expand All @@ -88,7 +88,7 @@ npx @lmc-eu/spirit-codemods -p <path> -t v3/web-react/link-hasVisitedStyleAllowe
+ <Heading><Link hasVisitedStyleAllowed … /></Heading>
```

### `v3/web-react/toastbar-inverted-neutral` — Replace `inverted` with `neutral` in ToastBar component `color` prop
### `v3/web-react/toastbar-inverted-neutral` — Replace `inverted` with `neutral` in ToastBar Component `color` Prop

The `inverted` variant was removed from the `ToastBar` component.
This codemod updates the `ToastBar` component by replacing the `inverted` value with `neutral` in the `color` prop.
Expand Down
4 changes: 2 additions & 2 deletions packages/codemods/src/transforms/v4/web-react/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Web-React v4 Codemods
# `web-react` v4 Codemods

This is a collection of codemods for updating Web-React v4 components.

You can find instructions on how to run these codemods in the main package [README](https://github.com/lmc-eu/spirit-design-system/blob/main/packages/codemods/README.md).

## Included Scripts

### `v4/web-react/collapse-isDisposable-prop` — UncontrolledCollapse `hideOnCollapse` to `isDisposable` prop change
### `v4/web-react/collapse-isDisposable-prop` — UncontrolledCollapse `hideOnCollapse` to `isDisposable` Prop Change

This codemod updates the `UncontrolledCollapse` component by replacing the `hideOnCollapse` prop with a new `isDisposable` prop.

Expand Down
3 changes: 0 additions & 3 deletions packages/demo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @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
6 changes: 0 additions & 6 deletions packages/design-tokens/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- @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 @@ -157,9 +154,6 @@ module: {

</details>

<!-- 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].
Expand Down
Loading
Loading