mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 21:24:26 +08:00
This CL adds the eslint-plugin-jsdoc plugin and enables just one rule, `jsdoc/check-alignment`, which ensures that all the lines in a comment are correctly aligned. For example: ``` /** * foo * bar */ ``` Would fail the check and be corrected to: ``` /** * foo * bar */ ``` DISABLE_THIRD_PARTY_CHECK=deliberate install + use of eslint-plugin-jsdoc node_module Bug: none Change-Id: I969983cd550653654a334ede3409b8c850467245 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4110906 Commit-Queue: Andres Olivares <andoli@chromium.org> Reviewed-by: Andres Olivares <andoli@chromium.org> Auto-Submit: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
31 lines
1.2 KiB
JavaScript
31 lines
1.2 KiB
JavaScript
import getParser from './parser/index.js';
|
|
import descriptionTokenizer from './parser/tokenizers/description.js';
|
|
import nameTokenizer from './parser/tokenizers/name.js';
|
|
import tagTokenizer from './parser/tokenizers/tag.js';
|
|
import typeTokenizer from './parser/tokenizers/type.js';
|
|
import getStringifier from './stringifier/index.js';
|
|
import alignTransform from './transforms/align.js';
|
|
import indentTransform from './transforms/indent.js';
|
|
import crlfTransform from './transforms/crlf.js';
|
|
import { flow as flowTransform } from './transforms/index.js';
|
|
import { rewireSpecs, rewireSource, seedBlock, seedTokens } from './util.js';
|
|
export * from './primitives.js';
|
|
export function parse(source, options = {}) {
|
|
return getParser(options)(source);
|
|
}
|
|
export const stringify = getStringifier();
|
|
export { default as inspect } from './stringifier/inspect.js';
|
|
export const transforms = {
|
|
flow: flowTransform,
|
|
align: alignTransform,
|
|
indent: indentTransform,
|
|
crlf: crlfTransform,
|
|
};
|
|
export const tokenizers = {
|
|
tag: tagTokenizer,
|
|
type: typeTokenizer,
|
|
name: nameTokenizer,
|
|
description: descriptionTokenizer,
|
|
};
|
|
export const util = { rewireSpecs, rewireSource, seedBlock, seedTokens };
|