processing / processing/p5.js-web-editor

Migrate from JSHint to ESLint for linting in CodeMirror

Open
#1,540 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:Editor Bug Priority:High
Dominant language
JavaScript
Stars
1.7k
Forks
1.7k
Avg merge
3d 4h
Merged PRs (30d)
8

Description

Nature of issue?

p5 Web Editor doesn't support Private Class Fields

  • Enhancement

(Private Class Fields is probably a new thing)

Note that Private Class fields is "an experimental proposal to allow defining private class fields using a hash prefix", hence this is not considered a bug.
Details:

Private class properties, or "Hash" names, as stated in the MDN Docs; are not supported by the Web Editor.

Though the code works, the editor comes with an error.

image

  • Steps to reproduce:
class ClassWithPrivateField {
  #privateField
  constructor() {
    this.#privateField = 42;
    this.something = 23;
  }
}
MDN Web Docs on Private Class Fields

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reconciling the title's JSHint-to-ESLint migration with the body’s private class fields report, then reproduce the supplied JavaScript snippet in the p5 Web Editor. Trace the editor’s linting or parsing configuration, and consider the work done when the snippet no longer produces an editor error and the intended linting setup is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript
Domain
frontend, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.