Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add ESLint rule to enforce consistency in device config files and prevent some common errors #6345

Merged
merged 29 commits into from
Oct 11, 2023

Conversation

AlCalzone
Copy link
Member

@AlCalzone AlCalzone commented Sep 29, 2023

This PR adds the following checks as ESLint rules:

  • Title Case and Sentence case is used consistently where required by the style guide
  • Config parameter units are consistent with the style guide
  • CC names are spelled consistently, e.g. Binary Switch instead of Switch Binary
  • Strings in config files are not surrounded by whitespace
  • "empty" parameter descriptions like "", "0" are not specified
  • option labels don't re-specify their value, e.g. "0: Disable"
  • Option labels and descriptions don't mention that they are the default -> use defaultValue instead

@AlCalzone AlCalzone changed the title chore: add ESLint rule to enforce consistent labels in device config files chore: add ESLint rule to enforce consistent labels, descriptions and units in device config files Oct 10, 2023
@AlCalzone AlCalzone marked this pull request as ready for review October 11, 2023 08:33
@AlCalzone AlCalzone changed the title chore: add ESLint rule to enforce consistent labels, descriptions and units in device config files chore: add ESLint rule to enforce consistency in device config files and prevent some common errors Oct 11, 2023
@AlCalzone
Copy link
Member Author

@zwave-js-bot automerge

@zwave-js-bot zwave-js-bot merged commit 8fcdc40 into master Oct 11, 2023
16 checks passed
@zwave-js-bot zwave-js-bot deleted the eslint-check-labels branch October 11, 2023 08:49
AlCalzone added a commit that referenced this pull request Oct 11, 2023
### Config file changes
Almost 1000 device configuration files have been reworked to be more consistent, mostly affecting device labels, parameter labels, descriptions and predefined options.
After updating, you should expect to see several notifications for changed device configurations, prompting you to re-interview the affected nodes.
Unless the device is mentioned below, there's no need to do this immediately.

* Always set time for Namron 16A thermostats as UTC (#6388)
* Add Alloy (Zipato) devices (#6331)
* Parameter 21 of Inovelli VZW31-SN is readonly (#6389)
* Add Shelly Wave Shutter (#6382)
* Add Eurotronic Comet Z (700 series) (#6336)
* Add params 7, 18, 19 to Zooz ZEN71 FW 10.20 (#6375)
* Add Qubino Shades Remote Controller (#6335)
* Add fingerprint for new MH8-FC version, add new option for param 1 (#6358)
* Add Hank HKZW-SO08 (#6383)
* Add link to manual of Honeywell T6 Pro Thermostat (#6353)

### Bugfixes
* When a device has a default wakeup interval of 0 (never wake up), this is now preserved during the interview, even when outside of the valid range advertised by the device (#6387)
* Added a compat flag to always set the time using `Time Parameters CC` as UTC, even if the device exposes way to set the timezone (#6388)

### Changes under the hood
* Lots of config file requirements from the style guide, especially regarding **Title Case** and **Sentence case** of strings, are now automatically enforced using ESLint (#6345)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants