Skip to content

Commit 416282a

Browse files
committed
Move docs from main repo
Signed-off-by: Mikhail Grachev <[email protected]>
1 parent 2b060ad commit 416282a

29 files changed

+586
-19
lines changed

Diff for: .editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
# indent_size = 4
7+
# indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.yml]
15+
indent_size = 2

Diff for: Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM node:alpine
2+
3+
RUN apk add --no-cache tini
4+
RUN npm i docsify-cli -g
5+
6+
WORKDIR /site
7+
8+
ENTRYPOINT ["/sbin/tini", "--"]
9+
CMD ["docsify"]

Diff for: Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build:
2+
docker build -t dotenv-linter.github.io .
3+
4+
serve:
5+
docker run -v `pwd`:/site -p 3000:3000 dotenv-linter.github.io docsify serve docs

Diff for: README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# [dotenv-linter.github.io](https://dotenv-linter.github.io)
2+
3+
## Build and run
4+
5+
```bash
6+
$ make build
7+
$ make serve
8+
```

Diff for: docs/.nojekyll

Whitespace-only changes.

Diff for: docs/README.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# dotenv-linter
2+
3+
⚡️ Lightning-fast linter for <code>.env</code> files. Written in Rust 🦀
4+
5+
---
6+
7+
It checks `.env` files for problems that may cause the application to malfunction:
8+
<p>
9+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/duplicated_key">Duplicated Key</a><br />
10+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/ending-blank-line">Ending Blank Line</a><br />
11+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/extra-blank-line">Extra Blank Line</a><br />
12+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/incorrect-delimiter">Incorrect delimiter</a><br />
13+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/key-without-value">Key without value</a><br />
14+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/leading-character">Leading character</a><br />
15+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/lowercase-key">Lowercase key</a><br />
16+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/quote-character">Quote character</a><br />
17+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/space-character">Space character</a><br />
18+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/trailing-whitespace">Trailing whitespace</a><br />
19+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/unordered-Key">Unordered Key</a><br />
20+
</p>
21+
22+
And automatically fixes them all 😱
23+
24+
**The key features**:
25+
<p>
26+
&nbsp;&nbsp;&nbsp;&nbsp;⚡️&nbsp;Lightning-fast because it is written in Rust 🦀<br />
27+
&nbsp;&nbsp;&nbsp;&nbsp;💣&nbsp;Can be used on any project regardless of the programming language 💥<br />
28+
&nbsp;&nbsp;&nbsp;&nbsp;🚀&nbsp;Can be integrated with <a href="https://github.com/reviewdog/reviewdog">reviewdog</a> and other CI services (including <a href="https://github.com/dotenv-linter/action-dotenv-linter">GitHub Actions</a>) 🔥
29+
</p>
30+
31+
**Articles about dotenv-linter**:
32+
* [In English](https://evrone.com/dotenv-linter?utm_source=github&utm_campaign=dotenv-linter)
33+
* [In Russian](https://www.mgrachev.com/2020/04/20/dotenv-linter)
34+
35+
[Dotenv-linter](https://evrone.com/dotenv-linter?utm_source=github&utm_campaign=dotenv-linter) is created & supported by [Evrone](https://evrone.com/?utm_source=github&utm_campaign=dotenv-linter). What else we develop with [Rust](https://evrone.com/rust?utm_source=github&utm_campaign=dotenv-linter).
36+
37+
**License**: [MIT](https://choosealicense.com/licenses/mit)

Diff for: docs/_assets/favicon.ico

1.12 KB
Binary file not shown.

Diff for: docs/_assets/logo.svg

+15
Loading

Diff for: docs/_coverpage.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<img alt="logo" width="420" src="_assets/logo.svg?sanitize=true">
2+
3+
> ⚡️ Lightning-fast linter for <code>.env</code> files. Written in Rust 🦀
4+
5+
[GitHub](https://github.com/dotenv-linter/dotenv-linter)
6+
[Getting Started](#dotenv-linter)
7+
8+
![color](#f7f7ee)

Diff for: docs/_sidebar.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
* [⚡️Home](/)
2+
* [👨‍💻Installation](installation.md)
3+
* [🚀Usage](usage.md)
4+
5+
* ✅Checks
6+
* [Duplicated Key](checks/duplicated_key.md)
7+
* [Ending Blank Line](checks/ending_blank_line.md)
8+
* [Extra Blank Line](checks/extra_blank_line.md)
9+
* [Incorrect Delimiter](checks/incorrect_delimiter.md)
10+
* [Key Without Value](checks/key_without_value.md)
11+
* [Leading Character](checks/leading_character.md)
12+
* [Lowercase Key](checks/lowercase_key.md)
13+
* [Quote Character](checks/quote_character.md)
14+
* [Space Character](checks/space_character.md)
15+
* [Trailing whitespace](checks/trailing_whitespace.md)
16+
* [Unordered Key](checks/unordered_key.md)
17+
18+
* 🔄Continuous Integration
19+
* [CircleCI](ci/circleci.md)
20+
* [GitHub Actions](ci/github_actions.md)
21+
22+
* [🤝Contributing](contributing.md)
23+
* [❤️Sponsors](sponsors.md)

Diff for: docs/checks/duplicated_key.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Duplicated Key
2+
3+
Detects if a key is not unique:
4+
5+
```env
6+
❌ Wrong
7+
FOO=BAR
8+
FOO=BAR
9+
10+
✅ Correct
11+
FOO=BAR
12+
BAR=FOO
13+
```

Diff for: docs/checks/ending_blank_line.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Ending Blank Line
2+
3+
Detects if a file doesn't have a blank line at the end:
4+
5+
```env
6+
❌ Wrong
7+
FOO=BAR
8+
🚫↩️
9+
10+
✅ Correct
11+
FOO=BAR
12+
```

Diff for: docs/checks/extra_blank_line.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Extra Blank Line
2+
3+
Detects if a file contains more than one blank line in a row:
4+
5+
```env
6+
❌ Wrong
7+
A=B
8+
<Blank line>
9+
<Blank line>
10+
FOO=BAR
11+
12+
❌ Wrong
13+
A=B
14+
FOO=BAR
15+
<Blank line>
16+
<Blank line>
17+
18+
✅ Correct
19+
A=B
20+
<Blank line>
21+
FOO=BAR
22+
<Blank line>
23+
24+
✅ Correct
25+
A=B
26+
FOO=BAR
27+
<Blank line>
28+
```

Diff for: docs/checks/incorrect_delimiter.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Incorrect delimiter
2+
3+
Detects if a key does not use an underscore to separate words:
4+
5+
```env
6+
❌ Wrong
7+
FOO-BAR=FOOBAR
8+
9+
✅ Correct
10+
FOO_BAR=FOOBAR
11+
```

Diff for: docs/checks/key_without_value.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Key without value
2+
3+
Detects if a line has a key without a value:
4+
5+
```env
6+
❌ Wrong
7+
FOO
8+
9+
✅ Correct
10+
FOO=
11+
12+
✅ Correct
13+
FOO=BAR
14+
```

Diff for: docs/checks/leading_character.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Leading character
2+
3+
Detects if a line starts with an unallowed character (characters from `A` to `Z` and `_` (underscore) are allowed):
4+
5+
```env
6+
❌ Wrong
7+
FOO=BAR
8+
9+
❌ Wrong
10+
.FOO=BAR
11+
12+
❌ Wrong
13+
*FOO=BAR
14+
15+
❌ Wrong
16+
1FOO=BAR
17+
18+
✅ Correct
19+
FOO=BAR
20+
21+
✅ Correct
22+
_FOO=BAR
23+
```

Diff for: docs/checks/lowercase_key.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Lowercase key
2+
3+
Detects if a key has lowercase characters:
4+
5+
```env
6+
❌ Wrong
7+
FOo_BAR=FOOBAR
8+
9+
❌ Wrong
10+
foo_bar=FOOBAR
11+
12+
✅ Correct
13+
FOO_BAR=FOOBAR
14+
```

Diff for: docs/checks/quote_character.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Quote character
2+
3+
Detects if a value contains quote characters (`'` / `"`):
4+
5+
```env
6+
❌ Wrong
7+
FOO="BAR"
8+
9+
❌ Wrong
10+
FOO='BAR'
11+
12+
❌ Wrong
13+
FOO='B"AR'
14+
15+
✅ Correct
16+
FOO=BAR
17+
```

Diff for: docs/checks/space_character.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Space character
2+
3+
Detects lines with a whitespace around equal sign character `=`:
4+
5+
```env
6+
❌ Wrong
7+
FOO =BAR
8+
9+
❌ Wrong
10+
FOO= BAR
11+
12+
❌ Wrong
13+
FOO = BAR
14+
15+
✅ Correct
16+
FOO=BAR
17+
```

Diff for: docs/checks/trailing_whitespace.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Trailing whitespace
2+
3+
Detects if a line has a trailing whitespace:
4+
5+
```env
6+
❌ Wrong
7+
FOO=BAR<Trailing whitespace>
8+
9+
✅ Correct
10+
FOO=BAR
11+
```

Diff for: docs/checks/unordered_key.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Unordered Key
2+
3+
Detects if a key is not alphabetically ordered:
4+
5+
```env
6+
❌ Wrong
7+
FOO=BAR
8+
BAR=FOO
9+
10+
✅ Correct
11+
BAR=FOO
12+
FOO=BAR
13+
```
14+
15+
You can use blank lines or control comments to split lines into groups:
16+
17+
```env
18+
❌ Wrong
19+
FOO=BAR
20+
BAR=FOO
21+
22+
✅ Correct
23+
FOO=BAR
24+
25+
BAR=FOO
26+
27+
✅ Correct
28+
FOO=BAR
29+
# dotenv-linter:off LowercaseKey
30+
bar=FOO
31+
```

Diff for: docs/ci/circleci.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# CircleCI
2+
3+
Here is an example of how you can run `dotenv-linter` on [CircleCI](https://circleci.com):
4+
5+
```yaml
6+
# .circleci/config.yml
7+
version: 2.1
8+
jobs:
9+
dotenv-linter:
10+
# ...
11+
steps:
12+
- checkout
13+
- run:
14+
name: Run dotenv-linter
15+
command: |
16+
wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s
17+
./bin/dotenv-linter
18+
```

Diff for: docs/ci/github_actions.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# GitHub Actions
2+
3+
`dotenv-linter` can also be used within our official [dotenv-linter action](https://github.com/dotenv-linter/action-dotenv-linter) through [GitHub Actions](https://github.com/features/actions).
4+
5+
Below is a simple snippet to use this action in your workflow:
6+
7+
```yaml
8+
# .github/workflows/dotenv_linter.yml
9+
name: dotenv-linter
10+
on: [pull_request]
11+
jobs:
12+
dotenv-linter:
13+
name: runner / dotenv-linter
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v1
18+
- name: dotenv-linter
19+
uses: dotenv-linter/action-dotenv-linter@v2
20+
with:
21+
github_token: ${{ secrets.github_token }}
22+
```

Diff for: docs/contributing.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 🤝 Contributing
2+
3+
If you've ever wanted to contribute to open source, now you have a great opportunity:
4+
5+
* [How to set up the project](https://github.com/dotenv-linter/dotenv-linter/blob/master/CONTRIBUTING.md#how-to-set-up-the-project)
6+
* [How to add a new check](https://github.com/dotenv-linter/dotenv-linter/blob/master/CONTRIBUTING.md#how-to-add-a-new-check)
7+
8+
## 👍 Similar projects
9+
10+
* [wemake-services/dotenv-linter](https://github.com/wemake-services/dotenv-linter) (Python)
11+
12+
## ✨ Contributors
13+
14+
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/dotenv-linter/dotenv-linter/blob/master/CONTRIBUTING.md)].
15+
<a href="https://github.com/dotenv-linter/dotenv-linter/graphs/contributors"><img src="https://opencollective.com/dotenv-linter/contributors.svg?width=890&button=false" /></a>

0 commit comments

Comments
 (0)