Hugo Lefeuvre | 368c47c | 2018-05-29 15:50:07 -0400 | [diff] [blame] | 1 | # README - chatview |
| 2 | |
| 3 | The chatview runs under a WebKit GTK view. It is written using web technologies |
| 4 | (HTML5/CSS3/JS) and is responsible for displaying everything that deals with the |
| 5 | navbar, the messages, and the message bar. |
| 6 | |
| 7 | ## Contributing - syntax |
| 8 | |
| 9 | We have a set of ESLint rules that define clear syntax rules (web/.eslintrc.json). |
| 10 | |
| 11 | You will need the following tools: |
| 12 | |
| 13 | - ESLint (The pluggable linting utility for JavaScript and JSX) |
| 14 | https://eslint.org/ |
| 15 | - ESLint HTML plugin (eslint-plugin-html) |
| 16 | https://www.npmjs.com/package/eslint-plugin-html |
| 17 | |
| 18 | Before pushing a patch, make sure that it passes ESLint: |
| 19 | $ eslint chatview.html |
| 20 | |
| 21 | Most trivial issues can be fixed using |
| 22 | $ eslint chatview.html --fix |
| 23 | |
| 24 | We will not accept patches introducing non-ESLint-compliant code. |
| 25 | |
| 26 | ## WebKit GTK |
| 27 | |
| 28 | Everything runs under WebKit GTK, that is if you need to write browser specific |
| 29 | code, you will only need to support WebKit (CSS -webkit- prefix). |
| 30 | |
| 31 | Do not use querySelector if getElementById or getElementByClassName can be used |
| 32 | instead. querySelector doesn't always make the code easier and has very bad |
| 33 | performances. |