From 2a7b9b52673b62f393ce88f1ad130a14f6cad50b Mon Sep 17 00:00:00 2001 From: Maciej Jastrzebski Date: Wed, 6 Dec 2023 17:47:01 +0100 Subject: [PATCH 1/2] docs: project guidelines. --- GUIDELINES.md | 11 +++++++++++ README.md | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 GUIDELINES.md diff --git a/GUIDELINES.md b/GUIDELINES.md new file mode 100644 index 0000000..5ed8fdd --- /dev/null +++ b/GUIDELINES.md @@ -0,0 +1,11 @@ +# Project Guidelines + +## Core principles + +1. We strive to create API that is easy & intuitive to use, helps users avoid making mistakes and exposes 95%+ power of regular expressions +2. We strive balance replicating the [Swift Regex Builder API](https://developer.apple.com/documentation/regexbuilder) and creating API that feels native to TypeScript/JavaScript users. +3. We should adjust our API where there are discrepancies between Swift and JavaScript regex behavior. + +## Implementation guidelines + +1. When user passes text to any regex component, it should be treated as exact string to match and not as a regex string. We might provide an escape hatch for providing raw regex string through, but that should be clearly invoked by the user. diff --git a/README.md b/README.md index 0ed2c5a..b45f66a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ const regex = buildRegex(oneOrMore('Hello '), 'World'); See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. +See the [project guidelines](GUIDELINES.md) to understand our core principles. + ## License MIT From 0b26c8a4a6000485eff82933e0526c37b0d2d71b Mon Sep 17 00:00:00 2001 From: Maciej Jastrzebski Date: Wed, 6 Dec 2023 21:27:17 +0100 Subject: [PATCH 2/2] chore: spellcheck --- GUIDELINES.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GUIDELINES.md b/GUIDELINES.md index 5ed8fdd..181a949 100644 --- a/GUIDELINES.md +++ b/GUIDELINES.md @@ -2,10 +2,10 @@ ## Core principles -1. We strive to create API that is easy & intuitive to use, helps users avoid making mistakes and exposes 95%+ power of regular expressions -2. We strive balance replicating the [Swift Regex Builder API](https://developer.apple.com/documentation/regexbuilder) and creating API that feels native to TypeScript/JavaScript users. +1. We strive to create an API that is easy & intuitive to use, helps users avoid making mistakes, and exposes 95%+ power of regular expressions. +2. We strive to balance replicating the [Swift Regex Builder API](https://developer.apple.com/documentation/regexbuilder) and creating an API native to TypeScript/JavaScript users. 3. We should adjust our API where there are discrepancies between Swift and JavaScript regex behavior. ## Implementation guidelines -1. When user passes text to any regex component, it should be treated as exact string to match and not as a regex string. We might provide an escape hatch for providing raw regex string through, but that should be clearly invoked by the user. +1. When the user passes the text to any regex component, it should be treated as an exact string to match and not as a regex string. We might provide an escape hatch for providing raw regex string through, but the user should use it explicitly.