You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we are using the PHP-FIG for our PHP coding standards but we don't have any standards to follow when it comes to JS code writing.
What in your opinion will be most suitable? It is important that the new standards we will use will be popular in the community and will have great good ecosystem around them.
Currently we are using the PHP-FIG for our PHP coding standards
I checked the source code and it seems that PSR-1 basic standard rules were mostly ignored, which violates requirements for PSR-2 / PSR-12.
I see that PHP 7.3+ is required, but features such as type hinting for parameters or null coalesce operator are not really being used.
@eldadfux I also recommend, like the doctor, on ESLint.
We in climacell use the rules of Airbnb, together with jest (for testing), and add some of our own taste. you can see the config here if you like:
Voting for prettier too, ever since it makes code seamless across multiple people, you can set up auto-formatting whenever someone pushes code too which at least standardizes the coding conventions!
Hi guys! Thanks you all for the great advices! I have just formatted all of our entire JS codebase with prettier thanks to the easy integration with VS Code.
The fact that it can also support our PHP codebase can be a great bonus and although the Airbnb standard seems very popular, It seems more logical to go with the open-source project standard.
Activity
TheDoctor0 commentedon Sep 6, 2019
I would suggest Airbnb Javascript Style Guide.
I checked the source code and it seems that PSR-1 basic standard rules were mostly ignored, which violates requirements for PSR-2 / PSR-12.
I see that PHP 7.3+ is required, but features such as type hinting for parameters or null coalesce operator are not really being used.
eldadfux commentedon Sep 6, 2019
Hi @TheDoctor0, Thanks for the feedback!
I will run, php-cs-fixer on the current code base, to make sure all code is consisted with psr-1 and psr-2.
As I mentions in the contributors guidelines, I haven't really reviewed PSR-12 yet, but I hope to do so in the upcoming days.
Are there any tools like php-cs-fixer that can help us fix the current JS code to match the Airbnb style guide?
TheDoctor0 commentedon Sep 6, 2019
You can use ESLint with Airbnb config.
eldadfux commentedon Sep 6, 2019
Great, I will give it a try.
I have also just finished to commit all the changes that the PHP-CS-FIXER applied to the code to make it more compatible to the PSR-1+2.
nati-levi commentedon Sep 8, 2019
@eldadfux I also recommend, like the doctor, on
ESLint.We in climacell use the rules of
Airbnb, together withjest(for testing), and add some of our own taste. you can see the config here if you like:eldadfux commentedon Sep 8, 2019
Thanks for the feeback @nati-levi ! seems like airbnb is the industry favourite...
millette commentedon Sep 8, 2019
https://prettier.io/ is also a popular option. It not only lints but reformats, supporting js, css, html, markdown and even php via a plugin.
Daniellunsc commentedon Sep 11, 2019
Another point to Eslint + Airbnb style guide, most projects today i use it and seems very popular.
mgkimsal commentedon Sep 11, 2019
Have had good success working with prettier.io as well (both for PHP and JS).
danyalasif commentedon Sep 11, 2019
Voting for prettier too, ever since it makes code seamless across multiple people, you can set up auto-formatting whenever someone pushes code too which at least standardizes the coding conventions!
eldadfux commentedon Sep 13, 2019
Hi guys! Thanks you all for the great advices! I have just formatted all of our entire JS codebase with prettier thanks to the easy integration with VS Code.
The fact that it can also support our PHP codebase can be a great bonus and although the Airbnb standard seems very popular, It seems more logical to go with the open-source project standard.
fix: injext missing $log
fix: inject missing $log
5 remaining items
Merge pull request appwrite#7 from lohanidamodar/fix-gravity-constants
Merge pull request appwrite#7 from utopia-php/feat-upgrade-cli-version
Merge pull request appwrite#7 from utopia-php/doc-add-new-detector-ad…
Merge pull request appwrite#7 from utopia-php/feat-base
Merge pull request appwrite#7 from srijit2002/master
Merge pull request appwrite#7 from TheLearneer/master
Merge pull request appwrite#7 from utopia-php/fix-qa
Merge pull request appwrite#7 from utopia-php/copilot/add-empty-param…
Merge pull request appwrite#7 from utopia-php/feat-allow-querying
Merge pull request appwrite#7 from utopia-php/feat-fluent-schema-builder
Merge pull request appwrite#7 from utopia-php/feat-oauth-helpers
Merge pull request appwrite#7 from utopia-php/fix-hook-implementation
Merge pull request appwrite#7 from utopia-php/remove-cache-proxy
Merge pull request appwrite#7 from utopia-php/feat/usage-groupby-no-i…
Merge pull request appwrite#7 from TorstenDittmann/patch-1