Skip to main content

语义版本控制

¥Semantic versioning

由于 Stylelint 作为代码质量工具的性质,我们遵循 语义版本控制 的特定风格。

¥Due to the nature of Stylelint as a code quality tool, we follow a specific flavor of semantic versioning.

任何次要更新都可能报告比以前版本更多的错误。因此,我们建议在 package.json 中使用波形符 (~),例如 "stylelint": "~7.2.0" 保证你的构建结果。

¥Any minor update may report more errors than the previous release. As such, we recommend using the tilde (~) in package.json e.g. "stylelint": "~7.2.0" to guarantee the results of your builds.

补丁发布

¥Patch release

不打算破坏你的 lint 构建:

¥Intended not to break your lint build:

  • 规则中的错误修复,导致 Stylelint 报告的错误更少

    ¥a bug fix in a rule that results in Stylelint reporting fewer errors

  • CLI 或核心(包括格式化程序)的错误修复

    ¥a bug fix to the CLI or core (including formatters)

  • 文档的改进

    ¥improvements to documentation

  • 非面向用户的更改,例如重构代码或修改测试

    ¥non-user-facing changes such as refactoring code or modifying tests

  • 发布失败后重新发布(即发布对任何人都不起作用的版本)

    ¥re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone)

次要版本

¥Minor release

可能会破坏你的 lint 构建:

¥Might break your lint build:

  • 规则中的错误修复导致 Stylelint 报告更多错误

    ¥a bug fix in a rule that results in Stylelint reporting more errors

  • 创建了一条新规则

    ¥a new rule is created

  • 现有规则的新选项,默认情况下不会导致 Stylelint 报告更多错误

    ¥a new option to an existing rule that does not result in Stylelint reporting more errors by default

  • 创建了新的 CLI 功能

    ¥a new CLI capability is created

  • 创建了新的公共 API 功能

    ¥a new public API capability is created

  • 创建了一个新的格式化程序

    ¥a new formatter is created

  • 引入了新的弃用

    ¥a new deprecation is introduced

主要版本

¥Major release

可能会破坏你的 lint 构建:

¥Likely to break your lint build:

  • 现有规则记录行为的更改会导致 Stylelint 默认报告更多错误

    ¥a change in the documented behavior of an existing rule results in Stylelint reporting more errors by default

  • 现有规则被删除

    ¥an existing rule is removed

  • 现有格式化程序被删除

    ¥an existing formatter is removed

  • 部分 CLI 被删除或以不兼容的方式更改

    ¥part of the CLI is removed or changed in an incompatible way

  • 部分公共 API 被删除或以不兼容的方式更改

    ¥part of the public API is removed or changed in an incompatible way