User tests: Successful: Unsuccessful:
Currently we are not checking the js codestyle at all. I was told that we are trying to use the airbnb codestyles. I checked media/system/core.js and it has 2300 cs errors (thats more than 2 per line) so its time to improve things here.
Airbnb code styles are widely accepted, more info: https://github.com/airbnb/javascript
This PR prepares js code style checks.
npm run compile-js
is now npm run build:js
npm run compile-sass
is now npm run build:css
npm run lint:js
to check javascript cs (currently only for es6 and not used in ci so far)npm run update-dependencies
is now npm run update
Yes, we need to update code styles (which are outdated): https://developer.joomla.org/coding-standards/javascript.html (can be addopted from https://github.com/airbnb/javascript)
Status | New | ⇒ | Pending |
Category | ⇒ | Repository |
Title |
|
Can a small file in core being converted that we can see the new cs rules live?
I will include an example in the next PR (together with the changes required for es6 support).
for now:
codestyle.es6.js
with the following contents:export default class Codestyle {
sayHello() {
console.log('hello');
}
}
Run npm install
and npm run lint:js
See linting works as expected.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-11 22:16:02 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
(updated title to show 4.0)