Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter and Prettier #41

Merged
merged 2 commits into from
Mar 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"env": {
"browser": true,
"es2022": true,
"node": true
},
"extends": [
"airbnb-base",
"plugin:json/recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"root": true,
"rules": {
"default-case": "off",
"import/no-unresolved": "off",
"prefer-destructuring": "off"
},
"overrides": [
{
"files": ["*.md"],
"parser": "eslint-plugin-markdownlint/parser",
"extends": ["plugin:markdownlint/recommended"],
"rules": {
"markdownlint/md013": "off",
"markdownlint/md033": "off"
}
}
]
}
21 changes: 10 additions & 11 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

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

Examples of unacceptable behavior by participants include:

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

## Our Responsibilities
Expand Down Expand Up @@ -74,4 +74,3 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

13 changes: 6 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name: Bug report
about: Create a report to help us improve
title: "[Bug] Describe your issue here"
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
For general information on how to use this module, getting started setting up, or other questions, please visit the MagicMirror² Forum at https://forum.magicmirror.builders. To make sure the module developer is aware of your issue, please tag '@shbatm' on your forum post.
For general information on how to use this module, getting started setting up, or other questions, please visit the MagicMirror² Forum at https://forum.magicmirror.builders. To make sure the module developer is aware of your issue, please tag '@shbatm' on your forum post.

If you are having an actual issue, please include 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,17 +24,16 @@ A clear and concise description of what you expected to happen.

**Configuration**
Please include:

- The configuration section for this module
- The configuration section for any affected modules

* It may be easier to post these in a [Gist](https://gist.github.com) and post the link here.

**Logs**
If applicable, please include the relevant logs to help explain your problem.
+ From the console or `~/.pm2/logs/`
+ From the web console using DevTools (<key>Ctrl</key>+<key>Shift</key>+<key>I</key>)
If applicable, please include the relevant logs to help explain your problem. + From the console or `~/.pm2/logs/` + From the web console using DevTools (<key>Ctrl</key>+<key>Shift</key>+<key>I</key>)

**Additional context**
Add any other context about the problem here.

If you are not comfortable posting the logs or configuration on a public place, you may also send @shbatm a private chat on the [MagicMirror² Forum](https://forum.magicmirror.builders) or send an e-mail to [email protected]. E-mails asking general questions or without an accompanying Issue will not be answered.
If you are not comfortable posting the logs or configuration on a public place, you may also send @shbatm a private chat on the [MagicMirror² Forum](https://forum.magicmirror.builders) or send an e-mail to [email protected]. E-mails asking general questions or without an accompanying Issue will not be answered.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Feature request
about: Suggest an idea for this project
title: "[FEATURE REQUEST] Your feature request idea here"
labels: enhancement
assignees: ''

assignees: ""
---

For general information on how to use this module, getting started setting up, or other questions, please visit the MagicMirror² Forum at https://forum.magicmirror.builders. To make sure the module developer is aware of your issue, please tag '@shbatm' on your forum post.
Expand Down
8 changes: 4 additions & 4 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ For general information on how to use this module, getting started setting up, o

To make sure the module developer is aware of your issue, please tag '@shbatm' on your forum post

If you experience errors with this module, or have a suggestion for improvements, please raise an issue by clicking the ISSUE button here in the Repository. When raising an issue, please include:
If you experience errors with this module, or have a suggestion for improvements, please raise an issue by clicking the ISSUE button here in the Repository. When raising an issue, please include:

- The configuration section for this module
- The configuration section for any affected modules
- Relavent logs:
+ From the console or `~/.pm2/logs/`
+ From the web console using DevTools (<key>Ctrl</key>+<key>Shift</key>+<key>I</key>)
- From the console or `~/.pm2/logs/`
- From the web console using DevTools (<key>Ctrl</key>+<key>Shift</key>+<key>I</key>)

This information should be posted directly in the Issue, or in a Gist (https://gist.github.com). If you are not comfortable posting this in a public place, you may send a private chat on the MagicMirror forum, or e-mail the relavent info to [email protected].
This information should be posted directly in the Issue, or in a Gist (https://gist.github.com). If you are not comfortable posting this in a public place, you may send a private chat on the MagicMirror forum, or e-mail the relavent info to [email protected].
4 changes: 4 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"line_length": false,
"no-inline-html": false
}
11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"trailingComma": "none",
"overrides": [
{
"files": "*.md",
"options": {
"parser": "markdown"
}
}
]
}
8 changes: 8 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-prettier"],
"root": true,
"rules": {
"prettier/prettier": true
}
}
218 changes: 109 additions & 109 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,109 +1,109 @@
# Changelog
## <a name="0_3_0"></a>[0.3.0] - Add option to default to home slide on timeout
* Add `homeSlide` and `transitionTimeout` to timeout and return to a home page, similar to MMM-Pages (#30)
* Merge downstream changes from @KristjanESPERANTO and others (Thanks!)
## <a name="0_2_8"></a>[0.2.8] - Add fullscreen positions
* Cleanup
* Changing links to fork from Kristjan ESPERANTO
## <a name="0_2_7"></a>[0.2.7] - Add fullscreen positions
* Added support for fullscreen positions.
## <a name="0_2_6"></a>[0.2.6] - Named Slide Support & Update for new MMM-KeyBindings
* Added support for named slides.
* Updated Key Handling for new MMM-KeyBindings methods.
* Broadcast API request to new MMM-Remote-Control API.
## <a name="0_2_5"></a>[0.2.5] - Added direct controls via Notification
* Added control from Module Notification (See [README](README.md#Navigation-from-other-modules)).
* Removed unneccessary and unused tests and Grunt file.
## <a name="0_2_4"></a>[0.2.4] - Module Fix for bug in MichMich/MagicMirror#1140
* Uses 'MODULE_DOM_CREATED' notification instead of 'DOM_OBJECTS_CREATED'
## <a name="0_2_4"></a>[0.2.4] - Added slideTranistionSpeed Parameter per #4
* Added a parameter for slide transition speed. Default is 1500ms.
## <a name="0_2_3"></a>[0.2.3] - Fix for #1 - Fix timed transition for slides
* Bug fix for Issue #1 -- Correct issue where setting transitionInterval for a "slides" configuration doesn't actually cause the slides to transition automatically.
## <a name="0_2_2"></a>[0.2.2] - Added support for MMM-KeyBindings Instances
* Added support for using MMM-KeyBindings control with multiple instances of the MagicMirror open. For example, you can use a remote on the screen attached to the Raspberry Pi (SERVER) and use a keyboard on another computer with the mirror running in a browswer (LOCAL) to independently change slides on the respective screens.
## <a name="0_2_1"></a>[0.2.1] - Multiple instances of a module
Changes:
* Added the ability to handle mutiple instances of a module. To use, add a `carouselId: "uniqueString"` to each modules' `config` section:
```javascript
{
module: "clock",
position: "top_left",
config: {
carouselId: "1",
displayType: "both"
}
},
{
module: "clock",
position: "top_left",
config: {
carouselId: 2,
}
},
{
module: 'MMM-Carousel',
position: "bottom_bar",
config: {
mode: 'slides',
slides: [
[ {name:'clock', classes:'zoom200', position:"top_left", carouselId: "1"} ],
[ {name:'clock', classes:'', position:"top_left", carouselId: 2}, ]]
}
},
```
## [0.2.0] - Added manual-only slides and per-slide positions & classes
Changes:
* Added the ability to pass an object with detail for a module on a per slide basis. Passing a config similar to the following shows a large clock on the first slide and then a small clock and additional modules on the second.
```javascript
mode: 'slides',
slides: [
[ {name:'clock', classes:'zoom200', position:"middle_center"} ],
[ {name:'clock', classes:'', position:"top_left"},
{name:'calendar', position:'top_left'},
'MMM-WunderGround',
'newsfeed'
]
```
* Made use of `zoom` classes introduced in [0.1.1]: using the method above, supported zooms are 070%, 080%, 090%, 125%, 150%, 175%, and 200%. Pass `classes:''` for 100%.
* Added support for indefinite slides -- set `transitionInterval: 0` for manual-transition only slides
* Added KeyPress events to go to specific slide index. (e.g. `Slide0: "Home"` in the KeyBindings would jump to the first slide when the home key is pushed). Works with any number of slides in the format `Slide#: "KeyName"` where # is the 0-based index of the slide.
## [0.1.1] - Added manual transitions
Changes:
* Added manual transitions between slides
* Added optional Pagination indicators at the bottom of the screen to show what slide is currently showing.
* Added hidden next/previous page controls that show on hover in each lower corner
## [0.1.0] - First public release
First public release
# Changelog

## <a name="0_3_0"></a>[0.3.0] - Add option to default to home slide on timeout

- Add `homeSlide` and `transitionTimeout` to timeout and return to a home page, similar to MMM-Pages (#30)
- Merge downstream changes from @KristjanESPERANTO and others (Thanks!)

## <a name="0_2_8"></a>[0.2.8] - Add fullscreen positions

- Cleanup
- Changing links to fork from Kristjan ESPERANTO

## <a name="0_2_7"></a>[0.2.7] - Add fullscreen positions

- Added support for fullscreen positions.

## <a name="0_2_6"></a>[0.2.6] - Named Slide Support & Update for new MMM-KeyBindings

- Added support for named slides.
- Updated Key Handling for new MMM-KeyBindings methods.
- Broadcast API request to new MMM-Remote-Control API.

## <a name="0_2_5"></a>[0.2.5] - Added direct controls via Notification

- Added control from Module Notification (See [README](README.md#Navigation-from-other-modules)).
- Removed unneccessary and unused tests and Grunt file.

## <a name="0_2_4"></a>[0.2.4] - Module Fix for bug in MichMich/MagicMirror#1140

- Uses 'MODULE_DOM_CREATED' notification instead of 'DOM_OBJECTS_CREATED'

## <a name="0_2_4"></a>[0.2.4] - Added slideTranistionSpeed Parameter per #4

- Added a parameter for slide transition speed. Default is 1500ms.

## <a name="0_2_3"></a>[0.2.3] - Fix for #1 - Fix timed transition for slides

- Bug fix for Issue #1 -- Correct issue where setting transitionInterval for a "slides" configuration doesn't actually cause the slides to transition automatically.

## <a name="0_2_2"></a>[0.2.2] - Added support for MMM-KeyBindings Instances

- Added support for using MMM-KeyBindings control with multiple instances of the MagicMirror open. For example, you can use a remote on the screen attached to the Raspberry Pi (SERVER) and use a keyboard on another computer with the mirror running in a browswer (LOCAL) to independently change slides on the respective screens.

## <a name="0_2_1"></a>[0.2.1] - Multiple instances of a module

Changes:

- Added the ability to handle mutiple instances of a module. To use, add a `carouselId: "uniqueString"` to each modules' `config` section:

```javascript
{
module: "clock",
position: "top_left",
config: {
carouselId: "1",
displayType: "both"
}
},
{
module: "clock",
position: "top_left",
config: {
carouselId: 2,
}
},
{
module: 'MMM-Carousel',
position: "bottom_bar",
config: {
mode: 'slides',
slides: [
[ {name:'clock', classes:'zoom200', position:"top_left", carouselId: "1"} ],
[ {name:'clock', classes:'', position:"top_left", carouselId: 2}, ]]
}
},
```

## [0.2.0] - Added manual-only slides and per-slide positions & classes

Changes:

- Added the ability to pass an object with detail for a module on a per slide basis. Passing a config similar to the following shows a large clock on the first slide and then a small clock and additional modules on the second.

```javascript
mode: 'slides',
slides: [
[ {name:'clock', classes:'zoom200', position:"middle_center"} ],
[ {name:'clock', classes:'', position:"top_left"},
{name:'calendar', position:'top_left'},
'MMM-WunderGround',
'newsfeed'
]
```

- Made use of `zoom` classes introduced in [0.1.1]: using the method above, supported zooms are 070%, 080%, 090%, 125%, 150%, 175%, and 200%. Pass `classes:''` for 100%.
- Added support for indefinite slides -- set `transitionInterval: 0` for manual-transition only slides
- Added KeyPress events to go to specific slide index. (e.g. `Slide0: "Home"` in the KeyBindings would jump to the first slide when the home key is pushed). Works with any number of slides in the format `Slide#: "KeyName"` where # is the 0-based index of the slide.

## [0.1.1] - Added manual transitions

Changes:

- Added manual transitions between slides
- Added optional Pagination indicators at the bottom of the screen to show what slide is currently showing.
- Added hidden next/previous page controls that show on hover in each lower corner

## [0.1.0] - First public release

First public release
Loading