1.2.1 • Published 1 year ago

@devtools-ds/diagnostic v1.2.1

Weekly downloads
35
License
MIT
Repository
github
Last release
1 year ago

@devtools-ds/diagnostic

The Diagnostic component displays errors and warnings from code, similar to errors produced by tools like webpack. It can also be used to display errors produced by a Language Server.

Installation

npm i @devtools-ds/diagnostic
# or with yarn
yarn add @devtools-ds/diagnostic

Accessibility Approach

The Diagnostic is a block of preformatted text that can be difficult for screen readers to read. Based on this, we followed the MDN suggestion to treat the component as a figure. There is an auto-generated caption describing the error in a screen-reader friendly way.

Usage

import { Diagnostic } from "@devtools-ds/diagnostic";

Basic Diagnostic

<Diagnostic message={message} lines={lines} severity={severity} />

Diagnostic Using Language Server

import { DiagnosticSeverity } from "vscode-languageserver-types";

<Diagnostic
  message={message}
  lines={lines}
  severity={transformLanguageServer(DiagnosticSeverity.Error)}
/>;

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

1.2.1

1 year ago

1.2.0

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.1.2

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.133.0

3 years ago

0.132.3

3 years ago

0.132.2

3 years ago

0.132.1

3 years ago

0.132.0

3 years ago

0.131.0

3 years ago

0.130.5

3 years ago

0.130.4

3 years ago

0.130.3

3 years ago

0.130.2

3 years ago