Skip to content

Commit d1068f2

Browse files
committed
chore: linters and security audit tools
1 parent f88b4dc commit d1068f2

11 files changed

+3062
-322
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[*]
2+
charset = utf-8
3+
end_of_line = lf
4+
indent_style = space
5+
indent_size = 2
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
9+
[*.md]
10+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public
2+
node_modules
3+
package-lock.json

.eslintrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": ["plugin:prettier/recommended"],
3+
"parserOptions": {
4+
"ecmaVersion": 2017
5+
},
6+
"env": {
7+
"es6": true
8+
}
9+
}

.markdownlint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"MD030": false
3+
}

.spelling

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# markdown-spellcheck spelling configuration file
2+
# Format - lines beginning # are comments
3+
# global dictionary is at the start, file overrides afterwards
4+
# one word per line, to define a file override use ' - filename'
5+
# where filename is relative to this configuration file
6+
Cloudflare
7+
ci
8+
perf

CONTRIBUTING.md

Lines changed: 0 additions & 222 deletions
This file was deleted.

README.md

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,76 @@
11
# Basic HTTP Authentication Cloudflare worker
22

3-
Use this worker to password-protect whole websites or just some areas/specific pages.
3+
Use this worker to password-protect whole websites or some areas/specific pages.
44

55
E.g. limit access to a staging version of a static website you're building.
66

77
## Demo
88

99
See <https://cloudflareworkers.com/#4796fabd94fb273bc9a7094a40b91d6d:https://tutorial.cloudflareworkers.com>
1010

11-
In this example, to see <https://tutorial.cloudflareworkers.com> you need to pass basic authentication.
11+
In this example, to see <https://tutorial.cloudflareworkers.com>
12+
you need to pass basic authentication.
1213

1314
User name: `demouser`
1415

1516
Password: `demopassword`
17+
18+
## Contributing
19+
20+
### Branch Naming
21+
22+
```text
23+
type/humanFriendlyDescription
24+
```
25+
26+
Example:
27+
28+
```text
29+
chore/upgradeLodashToLatestVersion
30+
```
31+
32+
### Commit Format
33+
34+
Commit message is validated with
35+
<https://github.com/conventional-changelog/commitlint#readme>
36+
on commit via git hook.
37+
38+
Message structure must be:
39+
40+
```text
41+
type(scope?): subject
42+
```
43+
44+
Valid types are:
45+
46+
- build
47+
- ci
48+
- chore
49+
- docs
50+
- feat
51+
- fix
52+
- perf
53+
- refactor
54+
- revert
55+
- style
56+
- test
57+
58+
Real world examples can look like this:
59+
60+
```text
61+
chore: upgrade lodash to latest version
62+
```
63+
64+
```text
65+
feat(blog): add comment section
66+
```
67+
68+
### Code Quality and Security Audit
69+
70+
Your changes will be validated by a CI pipeline anyway,
71+
but you may want to lint your files and audit packages before pushing:
72+
73+
```sh
74+
npm run lint
75+
npm run audit-security
76+
```

audit-ci.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"moderate": true,
3+
"whitelist": ["marked"]
4+
}

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
}

0 commit comments

Comments
 (0)