Add all the linters

This commit is contained in:
Nicholas Hubbard 2016-09-10 16:41:57 -04:00
parent c87c588c79
commit 88572e90d4
No known key found for this signature in database
GPG Key ID: 7DECD3FB35FBCA09
5 changed files with 63 additions and 17 deletions

View File

@ -1,6 +1,5 @@
vendor/
!/vendor/vendor.js
/modules/**
!/modules/default/**
!/modules/node_helper
!/modules/node_helper/**

View File

@ -88,4 +88,4 @@ It includes (but is not limited to) the following features:
## [1.0.0] - 2014-02-16
### Initial release of MagicMirror.
This was part of the blogpost: http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the
This was part of the blogpost: [http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the](http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the)

View File

@ -15,9 +15,53 @@ module.exports = function(grunt) {
},
src: ["css/main.css", "modules/default/calendar/calendar.css", "modules/default/clock/clock_styles.css", "modules/default/currentweather/currentweather.css", "modules/default/weatherforcast/weatherforcast.css"]
}
},
jsonlint: {
main: {
src: ["package.json", ".eslintrc.json", ".stylelint"],
options: {
reporter: "jshint"
}
}
},
markdownlint: {
all: {
options: {
config: {
"default": true,
"line-length": false,
"blanks-around-headers": false,
"no-duplicate-header": false,
"no-inline-html": false,
"MD010": false,
"MD001": false,
"MD031": false,
"MD040": false,
"MD002": false,
"MD029": false,
"MD041": false,
"MD032": false,
"MD036": false,
"MD037": false,
"MD009": false,
"MD018": false,
"MD012": false,
"MD026": false,
"MD036": false,
"MD038": false
}
},
src: ["README.md", "CHANGELOG.md", "LICENSE.md", "modules/README.md", "modules/default/**/*.md", "!modules/default/calendar/vendor/ical.js/readme.md"]
}
},
yamllint: {
all: [".travis.yml"]
}
});
grunt.loadNpmTasks("grunt-eslint");
grunt.loadNpmTasks("grunt-stylelint");
grunt.registerTask("default", ["eslint", "stylelint"]);
grunt.loadNpmTasks("grunt-jsonlint");
grunt.loadNpmTasks("grunt-yamllint");
grunt.loadNpmTasks("grunt-markdownlint");
grunt.registerTask("default", ["eslint", "stylelint", "jsonlint", "markdownlint", "yamllint"]);
};

View File

@ -24,17 +24,17 @@ MagicMirror² focuses on a modular plugin system and uses [Electron](http://elec
## Usage
#### Raspberry Pi Support
### Raspberry Pi Support
Electron, the app wrapper around MagicMirror², only supports the Raspberry Pi 2 & 3. The Raspberry Pi 1 is currently **not** supported. If you want to run this on a Raspberry Pi 1, use the [server only](#server-only) feature and setup a fullscreen browser yourself.
#### Automatic Installer (Raspberry Pi Only!)
### Automatic Installer (Raspberry Pi Only!)
Execute the following command on your Raspberry Pi to install MagicMirror²:
````
curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash
````
#### Manual Installation
### Manual Installation
1. Download and install the latest Node.js version.
2. Clone the repository and check out the beta branch: `git clone https://github.com/MichMich/MagicMirror`
@ -45,23 +45,23 @@ curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installer
**Note:** if you want to debug on Raspberry Pi you can use `npm start dev` which will start the MagicMirror app with Dev Tools enabled.
#### Server Only
### Server Only
In some cases, you want to start the application without an actual app window. In this case, execute the following command from the MagicMirror folder: `node serveronly`. This will start the server, after which you can open the application in your browser of choice.
#### Raspberry Configuration & Auto Start.
### Raspberry Configuration & Auto Start.
The following wiki links are helpful in the configuration of your MagicMirror² operating system:
- [Configuring the Raspberry Pi](https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi)
- [Auto Starting MagicMirror](https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror)
#### Updating you MagicMirror²
### Updating your MagicMirror²
If you want to update your MagicMirror² to the latest version, use your terminal to go to your Magic Mirror folder and type the following command:
````
```bash
git pull
````
```
If you changed nothing more than the config or the modules, this should work without any problems.
Type `git status` to see your changes, if there are any, you can reset them with `git reset --hard`. After that, git pull should be possible.

View File

@ -27,24 +27,27 @@
},
"homepage": "https://github.com/MichMich/MagicMirror#readme",
"devDependencies": {
"electron-prebuilt": "latest",
"grunt": "latest",
"grunt-eslint": "latest",
"grunt-jsonlint": "latest",
"grunt-markdownlint": "^1.0.4",
"grunt-stylelint": "latest",
"grunt-yamllint": "latest",
"stylelint-config-standard": "latest",
"time-grunt": "latest",
"grunt-stylelint": "latest"
"time-grunt": "latest"
},
"dependencies": {
"electron-prebuilt": "latest",
"express": "^4.14.0",
"feedme": "latest",
"iconv-lite": "latest",
"moment": "latest",
"request": "^2.74.0",
"rrule": "latest",
"snyk": "^1.14.1",
"socket.io": "^1.4.6",
"valid-url": "latest",
"walk": "latest"
"walk": "latest",
"snyk": "^1.14.1"
},
"snyk": true
}