This has the advantage that the package manager is no longer involved after the installation process. However, previous start commands such as `npm run start` continue to work. So we don't even have to adapt the documentation.
1.3 KiB
Contribution Policy for MagicMirror²
Thanks for contributing to MagicMirror²!
We hold our code to standard, and these standards are documented below.
Linters
We use prettier for automatic formatting a lot all our files. The configuration is in our prettier.config.mjs
file.
To run prettier, use node --run lint:prettier
.
JavaScript: Run ESLint
We use ESLint to lint our JavaScript files. The configuration is in our eslint.config.mjs
file.
To run ESLint, use node --run lint:js
.
CSS: Run StyleLint
We use StyleLint to lint our CSS. The configuration is in our .stylelintrc.json
file.
To run StyleLint, use node --run lint:css
.
Markdown: Run markdownlint
We use markdownlint-cli2 to lint our markdown files. The configuration is in our .markdownlint.json
file.
To run markdownlint, use node --run markdownlint:css
.
Testing
We use Jest for JavaScript testing.
To run all tests, use node --run test
.
The specific test commands are defined in package.json
.
So you can also run the specific tests with other commands, e.g. node --run test:unit
or npx jest tests/e2e/env_spec.js
.