Title: JavaScript chat summary, January 22nd, 2019
Author: Omar Reiss
Published: January 23, 2019

---

 [  ](https://profiles.wordpress.org/omarreiss/) [Omar Reiss](https://profiles.wordpress.org/omarreiss/)
10:50 am _on_ January 23, 2019     
Tags: [core-js ( 131 )](https://make.wordpress.org/core/tag/core-js/),
[javascript ( 130 )](https://make.wordpress.org/core/tag/javascript/), [meeting notes ( 227 )](https://make.wordpress.org/core/tag/meeting-notes/),
[summary ( 980 )](https://make.wordpress.org/core/tag/summary/)   

# JavaScript chat summary, January 22nd, 2019

**Below is a summary of the discussion from this week’s JavaScriptJavaScript JavaScript
or JS is an object-oriented computer programming language commonly used to create
interactive effects within web browsers. WordPress makes extensive use of JS for
a better user experience. While PHP is executed on the server, JS executes within
a user’s browser. [https://www.javascript.com](https://www.javascript.com/) chat(
[ag](https://docs.google.com/document/d/1jMm8YRSTtPZuoYCL_PJQHbZQp3ugCtFTL0rYvB9lnZo/edit)
[e](https://docs.google.com/document/d/1MsUUGGuDZOKycZyLt0CXGkNB5fD4QzrlnAqT1efTCJY/edit?ts=5c061a2f)
[nda](https://docs.google.com/document/d/1-eVyWhUAuwZAQarXiL3TTubenP2iOrOSMe3mnz3Imao/edit),
[Slack Transcript](https://wordpress.slack.com/archives/C5UNMSU4R/p1548165620170600)**)

Have a topic for discussion for the next meeting? Leave a suggested edit on [next week’s agenda](https://docs.google.com/document/d/1HPcT96J3ysm3fVDixELfmHkWneA0ir7yHwhgKORGPNA/edit).

## Agenda: NPM Scripts

[Slack Conversation](https://wordpress.slack.com/archives/C5UNMSU4R/p1548165732173600)

A few new commands have been proposed for addition to the `@wordpress/scripts` module:

 * `build` and `start`: https://github.com/WordPress/gutenberg/pull/12837
 * `format`: https://github.com/WordPress/gutenberg/pull/13394

The discussion around `build` and `start` focused mostly on the question how to 
approach default configuration for plugins and themes. We’re considering to extract
parts of the Webpack config as npm package to simplify setup for pluginPlugin A 
plugin is a piece of software containing a group of functions that can be added 
to a WordPress website. They can extend functionality or add new features to your
WordPress websites. WordPress plugins are written in the PHP programming language
and integrate seamlessly with WordPress. These can be free in the WordPress.org 
Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
or can be cost-based plugin from a third-party. developers. This would also allow
to provide a default config for `@wordpress/scripts` and proposed scripts. To provide
flexibility, it was raised that an eventual Webpack config package could have 3 
types of exports:

 * A full webpack config with a simple preset entries map for simple starter plugins(`
   front.js`, `admin.js`, `blocks.js` or something like that ) to provide a simple
   zero-config option
 * A function that takes an entries map and outputs the full webpack config with
   recommended values.
 * Each part of the recommended config as their own keys.

The discussion provided good input for further iteration. Next, progress was shared
on the `format` command, which aims to provide autoformatting functionality using
[Prettier](https://prettier.io/) and [Eslint](https://eslint.org/) autofixers. It
is still in an experimental state, but would provide a powerful tool for developers
to more easily adhere to coding standards.

## Agenda: Linting

[Slack Conversation](https://wordpress.slack.com/archives/C5UNMSU4R/p1548167064197400)

We discussed the lack of [ES2015+](https://en.wikipedia.org/wiki/ECMAScript) rules
in the WordPress JavaScript coding standards. [A pull request was proposed on Gutenberg which makes using Object shorthand notation required](https://github.com/WordPress/gutenberg/pull/13400)
for GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress.
The editor improves the process and experience of creating new content, making writing
rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes,
custom HTML etc. [https://wordpress.org/gutenberg/](https://wordpress.org/gutenberg/)
JavaScript. We agreed this was a desirable standard to have for ES2015+ code. For
now, we decided to include the rule in the Gutenberg coding guidelines until a formal
proposal to include ES2015+ rules in the WordPress JavaScript coding standards is
drafted.

## Agenda: E2E tests in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.

[Slack Conversation](https://wordpress.slack.com/archives/C5UNMSU4R/p1548167503204700)

Progress is being made on making Gutenberg’s e2e test functionality reusable for
WordPress core and beyond. [@gziolo](https://profiles.wordpress.org/gziolo/) gave
the following status update:

 * Added package for Axe API integration with Jest and Puppeteer: https://github.
   com/WordPress/gutenberg/pull/13241. This is set of tools for accessibility static
   analysis which we want to integrate with e2e tests to ensure that we can catch
   regressions early on.
 * Extracted test utils to their own `@wordpress/e2e-test-utils` package: https://
   github.com/WordPress/gutenberg/pull/13228. It will allow some code reuse for 
   those who would like to start writing e2e tests for their WordPress sites, plugins
   or themes.
 * Moved tests to their own `@worpress/e2e-tests package`: https://github.com/WordPress/
   gutenberg/pull/12465. There are now located in `packages/e2e-tests/specs` folder.

[@gziolo](https://profiles.wordpress.org/gziolo/) plans to continue working on enabling
a11y support to e2e tests in Gutenberg next. In order to start reusing the e2e setup
in WordPress core, quite some configuration is still needed in WordPress core. This
is tracked in https://core.trac.wordpress.org/ticket/45165. [@adamsilverstein](https://profiles.wordpress.org/adamsilverstein/)
agreed to explore this further.

## Agenda: PropTypes and ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. 󠀁[https://reactjs.org](https://reactjs.org/)󠁿 Doc Generation

[Slack Conversation](https://wordpress.slack.com/archives/C5UNMSU4R/p1548168137215500)

[@ajitbohra](https://profiles.wordpress.org/ajitbohra/) proposed to add [PropTypes](https://github.com/facebook/prop-types)
to components in Gutenberg, in order to allow automated documentation generating
and have type checking for components.

There was interest in the idea but also some concerns were raised:

 * There is some uncertainty of PropTypes’ future, considering that Facebook doesn’t
   use them and there exist other type systems which supersede them (Flow, TypeScript).
   PropTypes seems like a good solution for what we need right now, but in terms
   of type system, there might be better solutions available.
 * If they’re added, we need to make sure they are added as part of a proposal which
   also includes how they are going to be used, ie. for auto-documentation.

For now, we decided to avoid to add complexity without clearly understanding the
merit. More exploration is needed on auto-documentation and the benefits of strong
typing.

[#core-js](https://make.wordpress.org/core/tag/core-js/), [#javascript](https://make.wordpress.org/core/tag/javascript/),
[#meeting-notes](https://make.wordpress.org/core/tag/meeting-notes/), [#summary](https://make.wordpress.org/core/tag/summary/)

### Share this:

 * [  Threads ](https://make.wordpress.org/core/2019/01/23/javascript-chat-summary-january-22nd-2019/?share=threads)
 * [  Mastodon ](https://make.wordpress.org/core/2019/01/23/javascript-chat-summary-january-22nd-2019/?share=mastodon)
 * [  Bluesky ](https://make.wordpress.org/core/2019/01/23/javascript-chat-summary-january-22nd-2019/?share=bluesky)
 * [  X ](https://make.wordpress.org/core/2019/01/23/javascript-chat-summary-january-22nd-2019/?share=x)
 * [  Facebook ](https://make.wordpress.org/core/2019/01/23/javascript-chat-summary-january-22nd-2019/?share=facebook)
 * [  LinkedIn ](https://make.wordpress.org/core/2019/01/23/javascript-chat-summary-january-22nd-2019/?share=linkedin)

# Post navigation

[← What’s New in Gutenberg? (23th January)](https://make.wordpress.org/core/2019/01/23/whats-new-in-gutenberg-23th-january/)

[Improved taxonomy metabox sanitization in 5.1 →](https://make.wordpress.org/core/2019/01/23/improved-taxonomy-metabox-sanitization-in-5-1/)