Skip to content

Commit 6396d26

Browse files
authored
Linting and Formatting (#133)
Review Note: I split this into different commits so it would be easy to review that which wasn't automatically applied. I suggest reviewing those commits instead of every line. Problem ======= Styles and potential issues were all over without enforcing linting and formatting. Closes: #34 Solution ======== Added linting and formatting. Change summary: --------------- * Added eslint * Added Prettier * Checked to make sure it was setup in CI Steps to Verify: ---------------- 1. npm i 2. npm run lint 3. npm run format 4. npm run lint:fix
1 parent 2435994 commit 6396d26

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+7621
-5690
lines changed

.babelrc.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
module.exports = {
2-
sourceType: "unambiguous",
3-
plugins: ["babel-plugin-add-module-exports"],
4-
presets: [
5-
['@babel/preset-env', {
6-
loose: true,
7-
modules: "auto",
8-
"useBuiltIns": "entry", // to ensure regeneratorRuntime is defined; see bootstrap.js
9-
"corejs": 3, // use w/ "useBuiltIns", defaults=2, must match what is in package.json
10-
// "targets": "> 0.25%, not dead"
11-
}],
12-
'@babel/preset-typescript'
13-
]
2+
sourceType: 'unambiguous',
3+
plugins: ['babel-plugin-add-module-exports'],
4+
presets: [
5+
[
6+
'@babel/preset-env',
7+
{
8+
loose: true,
9+
modules: 'auto',
10+
useBuiltIns: 'entry', // to ensure regeneratorRuntime is defined; see bootstrap.js
11+
corejs: 3, // use w/ "useBuiltIns", defaults=2, must match what is in package.json
12+
// "targets": "> 0.25%, not dead"
13+
},
14+
],
15+
'@babel/preset-typescript',
16+
],
1417
};

.github/ISSUE_TEMPLATE/BUG_Issue.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,25 @@
55
labels: ""
66
assignees: ""
77
---
8+
89
Thanks for reporting an issue!
910

1011
### Steps to reproduce
12+
1113
Tell us how to reproduce this issue.
1214

1315
### Expected behaviour
16+
1417
Tell us what should happen
1518

1619
### Actual behaviour
20+
1721
Tell us what happens instead
1822

1923
### Any logs, error output, etc?
24+
2025
...
2126

2227
### Any other comments?
28+
2329
...

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-issue-config.json
12
blank_issues_enabled: true
2-
contact_links:
3-
- name: Issue Template
4-

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
Problem
2-
=======
1+
# Problem
2+
33
problem statement
44
Solution
55
========
66
What I/we did to solve this problem
77

88
with @pairperson1
99

10-
Change summary:
11-
---------------
12-
* Tidy, well formulated commit message
13-
* Another great commit message
14-
* Something else I/we did
10+
## Change summary:
11+
12+
- Tidy, well formulated commit message
13+
- Another great commit message
14+
- Something else I/we did
15+
16+
## Steps to Verify:
1517

16-
Steps to Verify:
17-
----------------
1818
1. A setup step / beginning state
1919
1. What to do next
2020
1. Any other instructions

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
12
name: Tests CI
23
on:
34
push:
4-
branches: [ main ]
5+
branches: [main]
56
pull_request:
6-
branches: [ '**' ]
7+
branches: ['**']
78
jobs:
89
test:
910
runs-on: ubuntu-latest

.github/workflows/publish-next.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
12
name: Publish NPM @next
23
on:
34
push:
4-
branches: [ main ]
5+
branches: [main]
56
jobs:
67
test:
78
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
12
name: Release Package
23
on:
34
release:
4-
types: [ released ]
5+
types: [released]
56
jobs:
67
publish-to-npm:
78
runs-on: ubuntu-latest

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gen-nodejs/

.prettierrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": true,
6+
"useTabs": false,
7+
"printWidth": 120
8+
}

0 commit comments

Comments
 (0)