Skip to content

Commit d63dc96

Browse files
committed
adding prettier+eslint
1 parent 94f5aac commit d63dc96

29 files changed

Lines changed: 1289 additions & 696 deletions

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "obsidian-functionplot",
3-
"onCreateCommand": "yarn install --non-interactive"
2+
"name": "obsidian-functionplot",
3+
"onCreateCommand": "yarn install --non-interactive"
44
}

.editorconfig

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
17
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
210
indent_style = space
3-
indent_size = 4
4-
5-
[*.yml]
611
indent_size = 2
12+
13+
[**.md]
14+
trim_trailing_whitespace = false
15+
indent_size = 4

.eslintignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules/
2+
yarn-error.log
3+
main.js
4+
data.json
5+
package-lock.json
6+
.nyc_output
7+
coverage
8+
9+
LICENSE
10+
.deepsource.toml

.eslintrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:@typescript-eslint/recommended",
5+
"prettier"
6+
],
7+
"env": {
8+
"browser": true,
9+
"node": true,
10+
"es6": true
11+
},
12+
"parser": "@typescript-eslint/parser",
13+
"plugins": ["@typescript-eslint"],
14+
15+
"root": true
16+
}

.github/labeler.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
documentation:
2-
- 'README.md'
3-
- 'images/**/*'
2+
- "README.md"
3+
- "images/**/*"
44

55
plugin:
6-
- 'src/**/*.ts'
6+
- "src/**/*.ts"
77

88
styles:
9-
- 'src/styles.scss'
9+
- "src/styles.scss"
1010

1111
automation:
12-
- '.github/workflows/*'
12+
- ".github/workflows/*"
1313

1414
invalid:
15-
- 'LICENSE'
16-
- 'versions.json'
15+
- "LICENSE"
16+
- "versions.json"

.github/workflows/ci.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,30 @@ jobs:
3737

3838
- name: install dependencies
3939
run: yarn install
40-
40+
4141
- name: test
4242
run: yarn test
43+
44+
check-format:
45+
runs-on: ubuntu-latest
46+
name: Check format 🔍
47+
steps:
48+
- uses: actions/checkout@v2
49+
50+
- name: install dependencies
51+
run: yarn install
52+
53+
- name: check format
54+
run: yarn format:check
55+
56+
lint:
57+
runs-on: ubuntu-latest
58+
name: Lint ✔
59+
steps:
60+
- uses: actions/checkout@v2
61+
62+
- name: install dependencies
63+
run: yarn install
64+
65+
- name: lint
66+
run: yarn lint

.github/workflows/delete-runs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: clean workflow runs
22

33
on:
44
schedule:
5-
- cron: '0 0 * * 0'
5+
- cron: "0 0 * * 0"
66
workflow_dispatch:
77
inputs:
88
retention_days:
99
required: true
10-
default: '30'
10+
default: "30"
1111
description: Retention days
1212
min_keep:
1313
required: true
14-
default: '6'
14+
default: "6"
1515
description: Minimum runs to keep
1616

1717
jobs:

.github/workflows/release.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: release
22

33
on:
44
release:
5-
types: [ published ]
5+
types: [published]
66

77
permissions:
88
contents: write
@@ -12,36 +12,36 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- name: Setup Node.js environment
16-
uses: actions/setup-node@v3.1.1
17-
with:
18-
node-version: 14
19-
20-
- name: Checkout
21-
uses: actions/checkout@v2.4.2
22-
with:
23-
ref: master
24-
25-
- name: Install packages
26-
run: yarn install
27-
28-
- name: Run version-bump
29-
run: node .github/version-bump.mjs ${{ github.event.release.tag_name }}
30-
31-
- name: Commit and push changes
32-
run: |
33-
git config --global user.name "leonhma"
34-
git config --global user.email "leonhardmasche@gmail.com"
35-
36-
git add -A
37-
git commit -m "chore(versions): index minAppVersion for latest release"
38-
git push origin master
39-
40-
- name: Build
41-
run: yarn build
42-
43-
- name: Upload assets to a Release
44-
uses: AButler/upload-release-assets@v2.0
45-
with:
46-
repo-token: ${{ github.token }}
47-
files: "main.js;manifest.json"
15+
- name: Setup Node.js environment
16+
uses: actions/setup-node@v3.1.1
17+
with:
18+
node-version: 14
19+
20+
- name: Checkout
21+
uses: actions/checkout@v2.4.2
22+
with:
23+
ref: master
24+
25+
- name: Install packages
26+
run: yarn install
27+
28+
- name: Run version-bump
29+
run: node .github/version-bump.mjs ${{ github.event.release.tag_name }}
30+
31+
- name: Commit and push changes
32+
run: |
33+
git config --global user.name "leonhma"
34+
git config --global user.email "leonhardmasche@gmail.com"
35+
36+
git add -A
37+
git commit -m "chore(versions): index minAppVersion for latest release"
38+
git push origin master
39+
40+
- name: Build
41+
run: yarn build
42+
43+
- name: Upload assets to a Release
44+
uses: AButler/upload-release-assets@v2.0
45+
with:
46+
repo-token: ${{ github.token }}
47+
files: "main.js;manifest.json"

.prettierignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules/
2+
yarn-error.log
3+
main.js
4+
data.json
5+
package-lock.json
6+
.nyc_output
7+
coverage
8+
9+
LICENSE
10+
.deepsource.toml

.prettierrc.json

Whitespace-only changes.

0 commit comments

Comments
 (0)