Skip to content

Commit

Permalink
chore: add es-lint and lint entire project
Browse files Browse the repository at this point in the history
  • Loading branch information
tomosterlund committed Jun 3, 2022
1 parent 744b647 commit ed8c812
Show file tree
Hide file tree
Showing 82 changed files with 5,661 additions and 4,872 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ workflows:
- test_tokyo
run_build:
jobs:
- run_build
- run_build
30 changes: 14 additions & 16 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
"root": true,
"extends": [
root: true,
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"plugin:vue/vue3-recommended",
"@vue/eslint-config-typescript/recommended",
"@vue/eslint-config-prettier"
"@vue/eslint-config-prettier",
"prettier",
],
"env": {
"vue/setup-compiler-macros": true
env: {
"vue/setup-compiler-macros": true,
},
"overrides": [
{
"files": [
"cypress/integration/**.spec.{js,ts,jsx,tsx}"
],
"extends": [
"plugin:cypress/recommended"
]
}
]
}
rules: {
"vue/multi-word-component-names": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
},
ignorePatterns: "**/*.js",
};
13 changes: 7 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,8 +24,9 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Context:**
- Browser [e.g. chrome, safari]
- Version [e.g. v1.0.0]

- Browser [e.g. chrome, safari]
- Version [e.g. v1.0.0]

**Additional context**
Add any other context about the problem here.
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
5 changes: 4 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"recommendations": ["johnsoncodehk.volar", "johnsoncodehk.vscode-typescript-vue-plugin"]
"recommendations": [
"johnsoncodehk.volar",
"johnsoncodehk.vscode-typescript-vue-plugin"
]
}
19 changes: 13 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Developing

## Getting up and running
* `npm i`
* `husky install` - configuring the gitHooks
* `npm run seed` - Seed the current calendar month with events, or use the [advanced seeding options](#seeding).
* `npm run dev`

- `npm i`
- `husky install` - configuring the gitHooks
- `npm run seed` - Seed the current calendar month with events, or use the [advanced seeding options](#seeding).
- `npm run dev`

## Running tests

While developing, please run `vitest watch`, in order to monitor that all tests are passing.

Since Qalendar is making heavy use of the native JavaScript Date-Object, which has the possibility to create difference output in different time zones, please also run `npm run test:docker` before pushing. This will spin up 3 docker containers, in 3 different time zones, and then run all tests.
Expand All @@ -17,17 +20,21 @@ For seeding several months or even a year, you can use the following CLI: `node
1. `--months`

For example:

```
node src/development/faker/seed.js --months="2022.01 2022.02 2022.03"
```

will yield events in the first three months of 2022.

2. `--year`
2. `--year`

For example:

```
node src/development/faker/seed.js --year=2022
```

will yield events in all months of 2022.

Please note that all previously seeded events are deleted upon running the CLI.
Please note that all previously seeded events are deleted upon running the CLI.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ For documentation and demo, see: https://tomosterlund.github.io/qalendar/

MIT

Copyright (c) 2022, Tom Österlund
Copyright (c) 2022, Tom Österlund
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.9'
version: "3.9"

# The service dependencies only serve the purpose of making the test logs appear more orderly
services:
Expand All @@ -7,15 +7,15 @@ services:
context: .
dockerfile: test-runner.dockerfile
environment:
TZ: 'Europe/London'
TZ: "Europe/London"
networks:
- test
test_mountain_view:
build:
context: .
dockerfile: test-runner.dockerfile
environment:
TZ: 'US/Pacific'
TZ: "US/Pacific"
networks:
- test
depends_on:
Expand All @@ -25,10 +25,10 @@ services:
context: .
dockerfile: test-runner.dockerfile
environment:
TZ: 'Asia/Tokyo'
TZ: "Asia/Tokyo"
networks:
- test
depends_on:
- test_mountain_view
networks:
test:
test:
22 changes: 11 additions & 11 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export default {
base: '/qalendar/',
title: 'Qalendar',
description: 'Vue 3 calendar component',
themeConfig: {
nav: [
{ text: "Home", link: "/" },
{ text: "Planned features", link: "/planned-features" },
{ text: "Github", link: "https://github.com/tomosterlund/qalendar" },
],
},
}
base: "/qalendar/",
title: "Qalendar",
description: "Vue 3 calendar component",
themeConfig: {
nav: [
{ text: "Home", link: "/" },
{ text: "Planned features", link: "/planned-features" },
{ text: "Github", link: "https://github.com/tomosterlund/qalendar" },
],
},
};
Loading

0 comments on commit ed8c812

Please sign in to comment.