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
## Context
Some coding styles are unwritten and not covered by eslint.
## Proposed solution
Explicit them for now, let's discuss on them.
Once this PR is merged, we will be able to later work on writing Eslint
rules when possible and remove the associated coding styles from the
documentation.
## Has this been tested?
<!-- Put an `x` in the box that applies: -->
- [ ] 👍 yes, I added tests to the test suite
- [ ] 💭 no, because this PR is a draft and still needs work
- [x] 🙅 no, because this is not relevant here
- [ ] 🙋 no, because I need help <!-- Detail how we can help you -->
Copy file name to clipboardExpand all lines: documentation/develop.md
+133Lines changed: 133 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,139 @@ $ yarn start:debug
110
110
111
111
And start using your nodejs debugger client (like the Chrome Devtools). See https://nodejs.org/en/docs/guides/debugging-getting-started#inspector-clients
112
112
113
+
114
+
## Coding Rules
115
+
116
+
Most of the coding rules are already enforced by the Eslint tool. You can run it using the `yarn lint:ci` command
117
+
and you may `yarn lint:fix` to make eslint try to fix them for you.
118
+
119
+
There are still few rules that are not yet configured in Eslint (we plan to add them):
120
+
121
+
### Regarding the imports
122
+
- The import should be gathered by these blocks following this order:
123
+
- The modules of the projects
124
+
- The contribs and the native libraries (ideally the later prefixed with `node:`);
// - Following local rules: either choose simple quotes or double quotes
212
+
// - use the `t()` function (client-side) or `req.t()` function (server-side) for the texts that will be displayed to the user and therefore needs localization
213
+
// - pass arguments to the `t()` function, does not use concatenation for the localizers
214
+
// - does not concatenate nor use the template strings for the `t()` function, but do as below
215
+
// - consistency of the use of type of quotes locally (`"` or `'`) within a same function, except for concatenation where template strings are allowed
0 commit comments