Merge pull request #2662 from rejas/prettier

This commit is contained in:
Michael Teeuw 2021-09-11 16:10:40 +02:00 committed by GitHub
commit 60e03777f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 83 additions and 87 deletions

2
.github/FUNDING.yml vendored
View File

@ -1,2 +1,2 @@
github: MichMich github: MichMich
custom: ['https://magicmirror.builders/#donate'] custom: ["https://magicmirror.builders/#donate"]

View File

@ -20,6 +20,7 @@ If you are facing an issue or found a bug while trying to install MagicMirror vi
## I found a bug in the MagicMirror Docker image ## I found a bug in the MagicMirror Docker image
If you are facing an issue or found a bug while running MagicMirror inside a Docker container please create an issue in the corresponding repository: If you are facing an issue or found a bug while running MagicMirror inside a Docker container please create an issue in the corresponding repository:
- karsten13/magicmirror: [https://gitlab.com/khassel/magicmirror](https://gitlab.com/khassel/magicmirror) - karsten13/magicmirror: [https://gitlab.com/khassel/magicmirror](https://gitlab.com/khassel/magicmirror)
- (deprecated) bastilimbach/docker-magicmirror: [https://github.com/bastilimbach/docker-MagicMirror](https://github.com/bastilimbach/docker-MagicMirror) - (deprecated) bastilimbach/docker-magicmirror: [https://github.com/bastilimbach/docker-MagicMirror](https://github.com/bastilimbach/docker-MagicMirror)

View File

@ -2,23 +2,20 @@ Hello and thank you for wanting to contribute to the MagicMirror project
**Please make sure that you have followed these 4 rules before submitting your Pull Request:** **Please make sure that you have followed these 4 rules before submitting your Pull Request:**
> 1) Base your pull requests against the `develop` branch. > 1. Base your pull requests against the `develop` branch.
> >
> 2. Include these infos in the description:
> >
> 2) Include these infos in the description: > - Does the pull request solve a **related** issue?
> * Does the pull request solve a **related** issue? > - If so, can you reference the issue like this `Fixes #<issue_number>`?
> * If so, can you reference the issue like this `Fixes #<issue_number>`? > - What does the pull request accomplish? Use a list if needed.
> * What does the pull request accomplish? Use a list if needed. > - If it includes major visual changes please add screenshots.
> * If it includes major visual changes please add screenshots.
> >
> 3. Please run `npm run lint:prettier` before submitting so that
> style issues are fixed.
> >
> 3) Please run `npm run lint:prettier` before submitting so that > 4. Don't forget to add an entry about your changes to
> style issues are fixed. > the CHANGELOG.md file.
>
>
> 4) Don't forget to add an entry about your changes to
> the CHANGELOG.md file.
**Note**: Sometimes the development moves very fast. It is highly **Note**: Sometimes the development moves very fast. It is highly
recommended that you update your branch of `develop` before creating a recommended that you update your branch of `develop` before creating a

View File

@ -4,9 +4,9 @@ name: "Run Codecov Tests"
on: on:
push: push:
branches: [ master, develop ] branches: [master, develop]
pull_request: pull_request:
branches: [ master, develop ] branches: [master, develop]
jobs: jobs:
run-and-upload-coverage-report: run-and-upload-coverage-report:

View File

@ -4,15 +4,15 @@ name: "Enforce Changelog"
on: on:
pull_request: pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
jobs: jobs:
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: dangoslen/changelog-enforcer@v1.6.1 - uses: dangoslen/changelog-enforcer@v1.6.1
with: with:
changeLogPath: 'CHANGELOG.md' changeLogPath: "CHANGELOG.md"
skipLabels: 'Skip Changelog' skipLabels: "Skip Changelog"

View File

@ -5,9 +5,9 @@ name: "Run Automated Tests"
on: on:
push: push:
branches: [ master, develop ] branches: [master, develop]
pull_request: pull_request:
branches: [ master, develop ] branches: [master, develop]
jobs: jobs:
test: test:
@ -15,20 +15,20 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
strategy: strategy:
matrix: matrix:
node-version: [12.x, 14.x, 16.8] node-version: [12.x, 14.x, 16.x]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- run: | - run: |
node -v node -v
Xvfb :99 -screen 0 1024x768x16 & Xvfb :99 -screen 0 1024x768x16 &
export DISPLAY=:99 export DISPLAY=:99
npm install npm install
npm run test:prettier npm run test:prettier
npm run test:js npm run test:js
npm run test:css npm run test:css
npm run test:unit npm run test:unit
npm run test:e2e npm run test:e2e

View File

@ -1,8 +1,4 @@
/config /config
/coverage /coverage
/vendor
!/vendor/vendor.js
.github
.nyc_output .nyc_output
package-lock.json package-lock.json
*.ts

View File

@ -26,6 +26,7 @@ _This release is scheduled to be released on 2021-10-01._
- Refactored clock layout. - Refactored clock layout.
- Refactored methods from weatherproviders into weatherobject (isDaytime, updateSunTime). - Refactored methods from weatherproviders into weatherobject (isDaytime, updateSunTime).
- Use of `logger.js` in jest tests. - Use of `logger.js` in jest tests.
- Run prettier over all relevant files.
### Fixed ### Fixed

View File

@ -57,7 +57,8 @@ let config = {
calendars: [ calendars: [
{ {
symbol: "calendar-check", symbol: "calendar-check",
url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" } url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
}
] ]
} }
}, },

View File

@ -1,16 +1,16 @@
type ModuleProperties = { type ModuleProperties = {
defaults?: object, defaults?: object;
start?(): void, start?(): void;
getHeader?(): string, getHeader?(): string;
getTemplate?(): string, getTemplate?(): string;
getTemplateData?(): object, getTemplateData?(): object;
notificationReceived?(notification: string, payload: any, sender: object): void, notificationReceived?(notification: string, payload: any, sender: object): void;
socketNotificationReceived?(notification: string, payload: any): void, socketNotificationReceived?(notification: string, payload: any): void;
suspend?(): void, suspend?(): void;
resume?(): void, resume?(): void;
getDom?(): HTMLElement, getDom?(): HTMLElement;
getStyles?(): string[], getStyles?(): string[];
[key: string]: any, [key: string]: any;
}; };
export declare const Module: { export declare const Module: {
@ -18,14 +18,14 @@ export declare const Module: {
}; };
export declare const Log: { export declare const Log: {
info(message?: any, ...optionalParams: any[]): void, info(message?: any, ...optionalParams: any[]): void;
log(message?: any, ...optionalParams: any[]): void, log(message?: any, ...optionalParams: any[]): void;
error(message?: any, ...optionalParams: any[]): void, error(message?: any, ...optionalParams: any[]): void;
warn(message?: any, ...optionalParams: any[]): void, warn(message?: any, ...optionalParams: any[]): void;
group(groupTitle?: string, ...optionalParams: any[]): void, group(groupTitle?: string, ...optionalParams: any[]): void;
groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void, groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void;
groupEnd(): void, groupEnd(): void;
time(timerName?: string): void, time(timerName?: string): void;
timeEnd(timerName?: string): void, timeEnd(timerName?: string): void;
timeStamp(timerName?: string): void, timeStamp(timerName?: string): void;
}; };

View File

@ -1,2 +1,2 @@
@import url("../node_modules/@fortawesome/fontawesome-free/css/all.min.css"); @import url("../node_modules/@fortawesome/fontawesome-free/css/all.min.css");
@import url("../node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css"); @import url("../node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css");

36
vendor/package.json vendored
View File

@ -1,20 +1,20 @@
{ {
"name": "magicmirror-vendors", "name": "magicmirror-vendors",
"description": "Package for vendors use by MagicMirror Core.", "description": "Package for vendors use by MagicMirror Core.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/MichMich/MagicMirror.git" "url": "git+https://github.com/MichMich/MagicMirror.git"
}, },
"license": "MIT", "license": "MIT",
"bugs": { "bugs": {
"url": "https://github.com/MichMich/MagicMirror/issues" "url": "https://github.com/MichMich/MagicMirror/issues"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4", "@fortawesome/fontawesome-free": "^5.15.4",
"moment": "^2.29.1", "moment": "^2.29.1",
"moment-timezone": "^0.5.33", "moment-timezone": "^0.5.33",
"nunjucks": "^3.2.3", "nunjucks": "^3.2.3",
"suncalc": "^1.8.0", "suncalc": "^1.8.0",
"weathericons": "^2.1.0" "weathericons": "^2.1.0"
} }
} }