New issue
Advanced search Search tips

Issue 764625 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

Modernize and lint WPT tests

Project Member Reported by falken@chromium.org, Sep 13 2017

Issue description

It'd probably be good for our tests to be formatted in a more conventional style. We could probably also use a linter.

+domenic who might have pointers to tools we can use
 
These days the canonical pretty-printer for JavaScript is prettier: https://github.com/prettier/prettier

The canonical linter is ESLint: https://eslint.org/

ESLint is an extremely fine-tuneable linter. Perhaps the best strategy is to start with the "recommended" preset and then layer things on as desired. Especially things which are auto-fixable are low cost because then you can just run `eslint --fix` and it will automatically fix your source files. See the rule reference at https://eslint.org/docs/rules/.

Also useful in a WPT context is https://github.com/BenoitZugmeyer/eslint-plugin-html/

It looks like running prettier on .html files is not fully worked out :-/. https://github.com/prettier/prettier/issues/1674 So this might require some scripting. Brief discussion in https://github.com/w3c/web-platform-tests/pull/6287#issuecomment-310299775 . A tool using jsdom would indeed be pretty quick to code up here (https://github.com/tmpvar/jsdom).
Project Member

Comment 2 by sheriffbot@chromium.org, Sep 13

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Untriaged)
This is probably better for the WPT issue tracker anyway.

Sign in to add a comment