-
Notifications
You must be signed in to change notification settings - Fork 278
Standards and Guidelines
We highly recommend you use an editor plugin to verify you're following our standards before you commit.
If we find too many issues we may choose to close the PR until you've fixed enough of the errors.
We provide tests for the CSS and Javascript via our package.json
.
For Python, we use pytest
and flake8
through a setup.py
command.
Please use the tests to make sure you commits are error free. The automated builds will fail if any of the tests fail.
We try to follow the PEP 8 and PEP 257 as much as possible.
We use loglevel for logging. Please do not use console.log
.
For linting we use xo with all the defaults.
For linting we use stylelint-config-standard.
We use Vue.js for rendering the application frontend.
Please follow the current code style.
To access the REST API via js we recommend you use the api
global we have setup to be accessed on all pages.
For example to update the current theme just patch the theme's name.
All errors should be caught and passed to log.error()
. All info should be passed to log.info()
.
api.patch('config', {
theme: {
name: $(this).val()
}
}).then(function(response) {
log.info(response);
}).catch(function(err) {
log.error(err);
});
More info on building themes here