Inline repo
This commit is contained in:
24
packages/eslint-define-config/scripts/utils.ts
Normal file
24
packages/eslint-define-config/scripts/utils.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import type { Rule } from 'eslint';
|
||||
import type { Config } from 'prettier';
|
||||
|
||||
export function buildJSDoc(content: string[]) {
|
||||
return ['/**', ...content.filter(Boolean).map(line => ` * ${line}`), ' */'].join('\n');
|
||||
}
|
||||
|
||||
export const prettierConfig: Config = {
|
||||
plugins: ['prettier-plugin-organize-imports'],
|
||||
parser: 'typescript',
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
};
|
||||
|
||||
export type MaybeArray<T> = T | T[];
|
||||
export type PluginRules = Record<string, Rule.RuleModule>;
|
||||
|
||||
export interface Plugin {
|
||||
id: string;
|
||||
name: string;
|
||||
prefix?: string;
|
||||
module: () => Promise<any>;
|
||||
rules?: PluginRules;
|
||||
}
|
Reference in New Issue
Block a user