mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
commit
12a5c4a311
33
.github/CONTRIBUTING.md
vendored
Normal file
33
.github/CONTRIBUTING.md
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
Contribution Policy for MagicMirror²
|
||||
====================================
|
||||
|
||||
Thanks for contributing to MagicMirror²!
|
||||
|
||||
We hold our code to standard, and these standards are documented below.
|
||||
|
||||
First, before you run the linters, you will need to install them all **and** install the development dependencies:
|
||||
|
||||
```bash
|
||||
(sudo) npm install -g jscs stylelint html-validator-cli
|
||||
npm install
|
||||
```
|
||||
|
||||
### JavaScript: Run JSCS and ESLint
|
||||
|
||||
We use [JSCS](http://jscs.info) and [ESLint](http://eslint.org) on our JavaScript files.
|
||||
|
||||
Our JSCS configuration is in our .jscsrc file, and we use [eslint-config-google](https://www.npmjs.com/package/eslint-config-google) in ESLint.
|
||||
|
||||
To run ESLint, use `npm run eslint`. To run JSCS, use `npm run jscs`.
|
||||
|
||||
### CSS: Run StyleLint
|
||||
|
||||
We use [StyleLint](http://stylelint.io) to lint our CSS. Our configuration is in our .stylelintrc file.
|
||||
|
||||
To run StyleLint, use `npm run stylelint`.
|
||||
|
||||
### HTML: Run HTML Validator
|
||||
|
||||
We use [NU Validator](https://validator.w3.org/nu) to validate our HTML. The configuration is in the command in the package.json file.
|
||||
|
||||
To run HTML Validator, use `npm run htmlvalidator`.
|
13
package.json
13
package.json
@ -4,7 +4,11 @@
|
||||
"description": "A modular interface for smart mirrors.",
|
||||
"main": "js/electron.js",
|
||||
"scripts": {
|
||||
"start": "electron js/electron.js"
|
||||
"start": "electron js/electron.js",
|
||||
"eslint": "eslint .",
|
||||
"jscs": "jscs **/**/**/**/*.js",
|
||||
"stylelint": "stylelint css/main.css fonts/roboto.css",
|
||||
"htmlvalidator": "html-validator --file=index.html"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -26,7 +30,9 @@
|
||||
"devDependencies": {
|
||||
"electron-prebuilt": "latest",
|
||||
"stylelint": "latest",
|
||||
"stylelint-config-standard": "latest"
|
||||
"stylelint-config-standard": "latest",
|
||||
"eslint": "latest",
|
||||
"eslint-config-google": "latest"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "latest",
|
||||
@ -38,5 +44,8 @@
|
||||
"socket.io": "latest",
|
||||
"valid-url": "latest",
|
||||
"walk": "latest"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "google"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user