Skip to content

Commit 29d7d80

Browse files
authored
Add Prettier (#3011)
Consistent code formatting! (it fixed a few minor bugs too)
1 parent c0084e2 commit 29d7d80

30 files changed

+538
-559
lines changed

.cspell.json

+3-10
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,8 @@
1313
],
1414
"language": "en,en-GB,en-US",
1515
"allowCompoundWords": true,
16-
"files": [
17-
"**/*.md"
18-
],
19-
"ignoreRegExpList": [
20-
"\\_\\w+",
21-
"\\#\\w+"
22-
],
23-
"ignorePaths": [
24-
".cspell.json"
25-
],
16+
"files": ["**/*.md"],
17+
"ignoreRegExpList": ["\\_\\w+", "\\#\\w+"],
18+
"ignorePaths": [".cspell.json"],
2619
"useGitignore": true
2720
}

.eslintrc.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ module.exports = {
33
browser: true,
44
es6: true,
55
mocha: true,
6-
node : true
6+
node: true,
77
},
88
plugins: ['mocha'],
99
extends: 'eslint:recommended',
1010
parserOptions: {
11-
'ecmaVersion': 2020,
12-
'sourceType': 'module'
11+
ecmaVersion: 2020,
12+
sourceType: 'module',
1313
},
1414
rules: {
1515
indent: ['error', 2],
1616
quotes: ['error', 'single'],
17-
semi: ['error', 'always']
18-
}
17+
semi: ['error', 'always'],
18+
},
1919
};

.github/CODE_OF_CONDUCT.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
88

99
Examples of behavior that contributes to creating a positive environment include:
1010

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
1616

1717
Examples of unacceptable behavior by participants include:
1818

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
2424

2525
## Our Responsibilities
2626

.github/CONTRIBUTING.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,26 @@ the developers managing and developing this open source project. In return,
1212
they should reciprocate that respect in addressing your issue or assessing
1313
patches and features.
1414

15-
1615
## Using the issue tracker
1716

1817
The [issue tracker](https://github.com/h5bp/html5-boilerplate/issues) is
1918
the preferred channel for [bug reports](#bugs), [features requests](#features)
2019
and [submitting pull requests](#pull-requests), but please respect the following
2120
restrictions:
2221

23-
* Please **do not** use the issue tracker for personal support requests (use
22+
- Please **do not** use the issue tracker for personal support requests (use
2423
[Stack Overflow](https://stackoverflow.com/questions/tagged/html5boilerplate)).
2524

26-
* Please **do not** derail or troll issues. Keep the discussion on topic and
25+
- Please **do not** derail or troll issues. Keep the discussion on topic and
2726
respect the opinions of others.
2827

29-
* Please **do not** open issues or pull requests regarding the code in
28+
- Please **do not** open issues or pull requests regarding the code in
3029
[`.htaccess`](https://github.com/h5bp/server-configs-apache),
3130
[`Normalize.css`](https://github.com/necolas/normalize.css) (open them in
3231
their respective repositories).
3332

34-
3533
<a name="bugs"></a>
34+
3635
## Bug reports
3736

3837
A bug is a _demonstrable problem_ that is caused by the code in the repository.
@@ -73,17 +72,17 @@ Example:
7372
> causing the bug, and potential solutions (and your opinions on their
7473
> merits).
7574
76-
7775
<a name="features"></a>
76+
7877
## Feature requests
7978

8079
Feature requests are welcome. But take a moment to find out whether your idea
81-
fits with the scope and aims of the project. It's up to *you* to make a strong
80+
fits with the scope and aims of the project. It's up to _you_ to make a strong
8281
case to convince the project's developers of the merits of this feature. Please
8382
provide as much detail and context as possible.
8483

85-
8684
<a name="pull-requests"></a>
85+
8786
## Pull requests
8887

8988
Good pull requests - patches, improvements, new features - are a fantastic
@@ -146,7 +145,7 @@ included in the project:
146145
```
147146

148147
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
149-
with a clear title and description.
148+
with a clear title and description.
150149

151150
**IMPORTANT**: By submitting a patch, you agree to allow the project
152151
owners to license your work under the terms of the [MIT License](LICENSE.txt).

.github/PULL_REQUEST_TEMPLATE.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
## Types of changes
2+
23
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
4+
35
- [ ] Bug fix (non-breaking change which fixes an issue)
46
- [ ] New feature (non-breaking change which adds functionality)
57
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
68

79
## Checklist:
10+
811
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
912
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
13+
1014
- [ ] My code follows the code style of this project.
1115
- [ ] My change requires a change to the documentation.
1216
- [ ] I have updated the documentation accordingly.

.github/SUPPORT.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ For personal support requests with HTML5 Boilerplate please use Stack Overflow
44
([`html5boilerplate`](https://stackoverflow.com/questions/tagged/html5boilerplate) tag).
55

66
Please check the respective repository/website for support regarding the code in
7-
[`.htaccess`](https://github.com/h5bp/server-configs-apache),
8-
[`Normalize.css`](https://github.com/necolas/normalize.css).
7+
[`.htaccess`](https://github.com/h5bp/server-configs-apache),
8+
[`Normalize.css`](https://github.com/necolas/normalize.css).

.github/dependabot.yml

-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ updates:
1414
directory: "/"
1515
schedule:
1616
interval: monthly
17-

.github/workflows/codeql-analysis.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
security-events: write
2121

2222
steps:
23-
- name: Checkout repository
24-
uses: actions/checkout@v3
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
2525

26-
- name: Initialize CodeQL
27-
uses: github/codeql-action/init@v2
28-
with:
29-
languages: 'javascript'
26+
- name: Initialize CodeQL
27+
uses: github/codeql-action/init@v2
28+
with:
29+
languages: "javascript"
3030

31-
- name: Perform CodeQL Analysis
32-
uses: github/codeql-action/analyze@v2
31+
- name: Perform CodeQL Analysis
32+
uses: github/codeql-action/analyze@v2
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Dependency Review'
1+
name: "Dependency Review"
22
on: [pull_request]
33

44
permissions:
@@ -8,7 +8,7 @@ jobs:
88
dependency-review:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: 'Checkout Repository'
11+
- name: "Checkout Repository"
1212
uses: actions/checkout@v3
13-
- name: 'Dependency Review'
13+
- name: "Dependency Review"
1414
uses: actions/dependency-review-action@v3

.github/workflows/spellcheck.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Check spelling'
1+
name: "Check spelling"
22
on: # rebuild any PRs and main branch changes
33
push:
44
branches-ignore:

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lockfile-version = 3
2+
registry = "https://registry.npmjs.org/"

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

.prettierrc.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"bracketSameLine": true,
3+
"embeddedLanguageFormatting": "off",
4+
"singleQuote": true,
5+
"overrides": [
6+
{
7+
"files": "**/*.yml",
8+
"options": {
9+
"singleQuote": false
10+
}
11+
}
12+
]
13+
}

0 commit comments

Comments
 (0)