8000 Add a pre-commit configuration file and adopt Prettier by pradyunsg · Pull Request #910 · toml-lang/toml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add a pre-commit configuration file and adopt Prettier #910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: trailing-whitespace
exclude: .*/toml\.ai
args: [--markdown-linebreak-ext=md]
1 change: 1 addition & 0 deletions .prettierrc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
proseWrap = "always"
134 changes: 67 additions & 67 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,103 +2,103 @@

## unreleased

* Allow newline after key/values in inline tables.
* Allow trailing comma in inline tables.
* Clarify where and how dotted keys define tables.
* Add new `\e` shorthand for the escape character.
* Add \x00 notation to basic strings.
* Seconds in Date-Time and Time values are now optional.
- Allow newline after key/values in inline tables.
- Allow trailing comma in inline tables.
- Clarify where and how dotted keys define tables.
- Add new `\e` shorthand for the escape character.
- Add \x00 notation to basic strings.
- Seconds in Date-Time and Time values are now optional.

## 1.0.0 / 2021-01-11

* Clarify how tables are created and defined.
* Clarify and describe the top-level table.
* Clarify that indentation before keys is ignored.
* Clarify that indentation before table headers is ignored.
* Clarify that indentation between array values is ignored.
- Clarify how tables are created and defined.
- Clarify and describe the top-level table.
- Clarify that indentation before keys is ignored.
- Clarify that indentation before table headers is ignored.
- Clarify that indentation between array values is ignored.

## 1.0.0-rc.3 / 2020-10-07

* Clarify that comments and newlines are allowed before commas in arrays.
* Mark the ABNF as canonical, and reference it from the text specification.
- Clarify that comments and newlines are allowed before commas in arrays.
- Mark the ABNF as canonical, and reference it from the text specification.

## 1.0.0-rc.2 / 2020-08-09

* Create https://toml.io as the new primary location to read the TOML spec.
* Clarify meaning of "quotation marks".
* Clarify meaning of "expected" value ranges.
* Clarify that EOF is allowed after key/value pair.
* Clarify that the various styles for writing keys are equivalent.
* Clarify that line-ending backslashes must be unescaped in multi-line strings.
* Add examples for invalid float values.
- Create https://toml.io as the new primary location to read the TOML spec.
- Clarify meaning of "quotation marks".
- Clarify meaning of "expected" value ranges.
- Clarify that EOF is allowed after key/value pair.
- Clarify that the various styles for writing keys are equivalent.
- Clarify that line-ending backslashes must be unescaped in multi-line strings.
- Add examples for invalid float values.

## 1.0.0-rc.1 / 2020-04-01

* Clarify in ABNF how quotes in multi-line basic and multi-line literal strings
- Clarify in ABNF how quotes in multi-line basic and multi-line literal strings
are allowed to be used.
* Leading zeroes in exponent parts of floats are permitted.
* Clarify that control characters are not permitted in comments.
* Clarify behavior of tables defined implicitly by dotted keys.
* Clarify that inline tables are immutable.
* Clarify that trailing commas are not allowed in inline tables.
* Clarify in ABNF that UTF-16 surrogate code points (U+D800 - U+DFFF) are not
- Leading zeroes in exponent parts of floats are permitted.
- Clarify that control characters are not permitted in comments.
- Clarify behavior of tables defined implicitly by dotted keys.
- Clarify that inline tables are immutable.
- Clarify that trailing commas are not allowed in inline tables.
- Clarify in ABNF that UTF-16 surrogate code points (U+D800 - U+DFFF) are not
allowed in strings or comments.
* Allow raw tab characters in basic strings and multi-line basic strings.
* Allow heterogenous values in arrays.
- Allow raw tab characters in basic strings and multi-line basic strings.
- Allow heterogenous values in arrays.

## 0.5.0 / 2018-07-11

* Add dotted keys.
* Add hex, octal, and binary integer formats.
* Add special float values (inf, nan).
* Rename Datetime to Offset Date-Time.
* Add Local Date-Time.
* Add Local Date.
* Add Local Time.
* Add ABNF specification.
* Allow space (instead of T) to separate date and time in Date-Time.
* Allow accidental whitespace between backslash and newline in the line
- Add dotted keys.
- Add hex, octal, and binary integer formats.
- Add special float values (inf, nan).
- Rename Datetime to Offset Date-Time.
- Add Local Date-Time.
- Add Local Date.
- Add Local Time.
- Add ABNF specification.
- Allow space (instead of T) to separate date and time in Date-Time.
- Allow accidental whitespace between backslash and newline in the line
continuation operator in multi-line basic strings.
* Specify that the standard file extension is `.toml`.
* Specify that MIME type is `application/toml`
* Clarify that U+007F is an escape character.
* Clarify that keys are always strings.
* Clarify that you cannot use array-of-table to append to a static array.
* Clarify that a TOML file must be a valid UTF-8 document.
* Clarify valid Array values.
* Clarify that literal strings can be table keys.
* Clarify that at least millisecond precision expected for Date-Time and Time.
* Clarify that comments are OK in multiline arrays.
* Clarify that +0, -0, +0.0, and -0.0 are valid and what they mean.
* TOML has a logo!
- Specify that the standard file extension is `.toml`.
- Specify that MIME type is `application/toml`
- Clarify that U+007F is an escape character.
- Clarify that keys are always strings.
- Clarify that you cannot use array-of-table to append to a static array.
- Clarify that a TOML file must be a valid UTF-8 document.
- Clarify valid Array values.
- Clarify that literal strings can be table keys.
- Clarify that at least millisecond precision expected for Date-Time and Time.
- Clarify that comments are OK in multiline arrays.
- Clarify that +0, -0, +0.0, and -0.0 are valid and what they mean.
- TOML has a logo!

## 0.4.0 / 2015-02-12

* Add Inline Table syntax.
* Allow underscores in numbers.
* Remove forward slash as an escapable character.
* Unicode escapes must be scalar values.
* Newline is now defined as LF or CRLF.
- Add Inline Table syntax.
- Allow underscores in numbers.
- Remove forward slash as an escapable character.
- Unicode escapes must be scalar values.
- Newline is now defined as LF or CRLF.

## 0.3.1 / 2014-11-11

* Fix incorrect datetime examples.
- Fix incorrect datetime examples.

## 0.3.0 / 2014-11-10

* Add scientific notation for floats.
* Allow optional + prefix on integers.
* Switch to RFC 3339 for datetimes (allowing offsets and fractional seconds).
* Add multiline and literal strings.
* Clarify what characters valid keys can contain.
- Add scientific notation for floats.
- Allow optional + prefix on integers.
- Switch to RFC 3339 for datetimes (allowing offsets and fractional seconds).
- Add multiline and literal strings.
- Clarify what characters valid keys can contain.

## 0.2.0 / 2013-09-24

* Use "table" instead of "key group" terminology.
* Add the ability to define nestable arrays of tables.
- Use "table" instead of "key group" terminology.
- Add the ability to define nestable arrays of tables.

## 0.1.0 / 2013-03-17

* From Twitter rage to reality; TOML is now a thing.
* First proper release.
* TOML adheres to the SemVer standard for version numbers.
- From Twitter rage to reality; TOML is now a thing.
- First proper release.
- TOML adheres to the SemVer standard for version numbers.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
50 changes: 22 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<img align="right" src="logos/toml-200.png" alt="TOML logo">

TOML
====
# TOML

Tom's Obvious, Minimal Language.

Expand All @@ -10,15 +9,13 @@ By Tom Preston-Werner, Pradyun Gedam, et al.
> This repository contains the in-development version of the TOML specification.
> You can find the released versions at https://toml.io.

Objectives
----------
## Objectives

TOML aims to be a minimal configuration file format that's easy to read due to
obvious semantics. TOML is designed to map unambiguously to a hash table. TOML
should be easy to parse into data structures in a wide variety of languages.

Example
-------
## Example

```toml
# This is a TOML document.
Expand Down Expand Up @@ -56,8 +53,7 @@ hosts = [
]
```

Comparison with Other Formats
-----------------------------
## Comparison with Other Formats

TOML shares traits with other file formats used for application configuration
and data serialization, such as YAML and JSON. TOML and JSON both are simple and
Expand All @@ -75,34 +71,32 @@ start or end of a TOML file, which can complicate sending it through a stream.
These details must be negotiated on the application layer.

INI files are frequently compared to TOML for their similarities in syntax and
use as configuration files. However, there is no standardized format for INI
and they do not gracefully handle more than one or two levels of nesting.
use as configuration files. However, there is no standardized format for INI and
they do not gracefully handle more than one or two levels of nesting.

Further reading:

* YAML spec: https://yaml.org/spec/1.2/spec.html
* JSON spec: https://tools.ietf.org/html/rfc8259
* Wikipedia on INI files: https://en.wikipedia.org/wiki/INI_file
- YAML spec: https://yaml.org/spec/1.2/spec.html
- JSON spec: https://tools.ietf.org/html/rfc8259
- Wikipedia on INI files: https://en.wikipedia.org/wiki/INI_file

Get Involved
------------
## Get Involved

Documentation, bug reports, pull requests, and all other contributions
are welcome!
Documentation, bug reports, pull requests, and all other contributions are
welcome!

Wiki
----
## Wiki

We have an [Official TOML Wiki](https://github.com/toml-lang/toml/wiki) that
catalogs the following:

* Projects using TOML
* Implementations
* Validators
* Language-agnostic test suite for TOML decoders and encoders
* Editor support
* Encoders
* Converters
- Projects using TOML
- Implementations
- Validators
- Language-agnostic test suite for TOML decoders and encoders
- Editor support
- Encoders
- Converters

Please take a look if you'd like to view or add to that list. Thanks for being
a part of the TOML community!
Please take a look if you'd like to view or add to that list. Thanks for being a
part of the TOML community!
6 changes: 4 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ This section of the repository contains documentation for TOML's maintainers.

## Release Process

- Set up local repos of [toml-lang/toml] and [toml-lang/toml.io], as described in [scripts/release.py](../scripts/release.py).
- In the root of the toml-lang/toml clone, run `python3.8 scripts/release.py <version>`.
- Set up local repos of [toml-lang/toml] and [toml-lang/toml.io], as described
in [scripts/release.py](../scripts/release.py).
- In the root of the toml-lang/toml clone, run
`python3.8 scripts/release.py <version>`.
- Done! ✨

[toml-lang/toml]: https://github.com/toml-lang/toml
Expand Down
Loading
0