Skip to content

多语言 Linter #8

@TechQuery

Description

@TechQuery

需求描述

定义一个名为 mobx-config.js 的根目录配置文件,然后让用户按语言 export 一个 linter() 函数,用户就可以 import 自己满意的工具,再配到 lint-staged 来自动检查、修复文本规范。

示例代码

mobx-config.js

import zhlint from 'zhlint';

export const linter = {
    'zh-CN': raw => zhlint(raw)
};

package.json

{
    "lint-staged": {
        "translation/*.ts": "mobx-i18n lint"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request
    No fields configured for Feature.

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions