| applyTo | settings/**/*.{js,jsx,ts,tsx} |
|---|
JavaScript/React conventions for the settings UI:
- This is a
@wordpress/scriptsblock package. Use WordPress JS coding standards. - Tabs for indentation.
- Import WordPress packages from
@wordpress/*(e.g.,@wordpress/element,@wordpress/api-fetch,@wordpress/i18n). - Use
apiFetchfor REST API calls, not rawfetch. - Translatable strings use
__(),_n(),sprintf()from@wordpress/i18n. - Jest tests live in
settings/src/tests/and use@testing-library/react. - Run JS tests with
npm run test:js, lint withnpm run lint:js.