Archived
1
2
Fork
You've already forked Website
5

JS policy discussion #3

Open
opened 2022年05月22日 18:00:28 +02:00 by Ghost · 5 comments

We had previously refused to add any kind of JS to Simple Web projects, but we've since relaxed that rule a bit, so I think it would be nice to have an official policy on what things can be implemented with JS. Here's what I came up with:

We try to avoid JS as much as possible, but in certain circumstances using it is
acceptable. There are some conditions though:

  • The feature is impossible to satisfactorily implement without using JS
  • As little JS as possible is used
  • No "modern" JS features are used unless necessary (e.g. no arrow functions or let)

@ManeraKai @metalune I'd like both of your opinions on what I wrote up here, including suggestions for extra conditions.

We had previously refused to add any kind of JS to Simple Web projects, but we've since relaxed that rule a bit, so I think it would be nice to have an official policy on what things can be implemented with JS. Here's what I came up with: > We try to avoid JS as much as possible, but in certain circumstances using it is acceptable. There are some conditions though: > - The feature is impossible to satisfactorily implement without using JS > - As little JS as possible is used > - No "modern" JS features are used unless necessary (e.g. no arrow functions or `let`) @ManeraKai @metalune I'd like both of your opinions on what I wrote up here, including suggestions for extra conditions.

I'd like to add this:

* It should not be mandatory for any kind of core functionality of the site/project
I'd like to add this: ``` * It should not be mandatory for any kind of core functionality of the site/project ```

Why no "modern"? what's wrong with let? do you mean browser compatibility?

Why no "modern"? what's wrong with `let`? do you mean browser compatibility?

Nothing wrong with let itself, but there's no point in using it for the little JS code we're gonna have. If var works perfectly okay for our purposes and is more supported (even if by a tiny margin), why use let instead?

Nothing wrong with `let` itself, but there's no point in using it for the little JS code we're gonna have. If `var` works perfectly okay for our purposes and is more supported (even if by a tiny margin), why use `let` instead?
Ghost changed title from (削除) Add JS policy (削除ここまで) to JS policy discussion 2022年05月22日 20:18:01 +02:00

Any other objections or additions to the list? I'd like to make this official soon.

Any other objections or additions to the list? I'd like to make this official soon.

No objections, you are free to open a PR

No objections, you are free to open a PR
Commenting is not possible because the repository is archived.
No Branch/Tag specified
master
pages
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SimpleWeb/Website#3
Reference in a new issue
SimpleWeb/Website
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?