Skip to content

Migrate from JSHint to ESLint for linting in CodeMirror #1540

Open
@dipamsen

Description

@dipamsen

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions