Project

General

Profile

action #69082

javascript lint tests

Added by okurz 6 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Organisational
Target version:
Start date:
2020-07-17
Due date:
% Done:

0%

Estimated time:
Difficulty:
easy

Description

Motivation

In pull request reviews we discuss about javascript style. We should be able to save time to by applying an industry standard javascript style check solution in our tests.

Acceptance criteria

  • AC1: javascript code is ensured to follow a common style with automatic checks within pull request checks
  • AC2: javascript style checks can be called locally
  • AC3: Common contributor team agrees on style rules we apply

Suggestions

  • Research what's the "industry standard" on javascript style checks -> use eslint
  • Add tests that can be called with Makefile
  • Ensure check is called also within circle CI based tests
  • Adapt all javascript code where it already differs from decided style rules
  • Invite common contributors in pull request review to decide upon the applied style rules

History

#1 Updated by okurz 6 months ago

  • Difficulty set to easy

#2 Updated by okurz 6 months ago

  • Description updated (diff)

#3 Updated by cdywan 6 months ago

  • Assignee set to cdywan

I'm going to take a stab at this since I'd like to see the amount of style-related comments in reviews go down. A standard linter configuration could also be integrated with editors more easily than e.g. sharing sed commands or manual adjustments.

#4 Updated by okurz 6 months ago

Looking at what tools are easily available to us I found that js-beautify might be a better choice for now. Available in openSUSE Leap as well as python3-jsbeautifier

#5 Updated by okurz 6 months ago

https://github.com/os-autoinst/openQA/pull/3268 SCNR ;)

I hope you forgive me :)

#6 Updated by cdywan 6 months ago

  • Status changed from Workable to In Progress
  • Assignee changed from cdywan to okurz

#7 Updated by okurz 6 months ago

  • Status changed from In Progress to Feedback

updated https://github.com/os-autoinst/openQA/pull/3268 to preserve a bit more compact writing

#8 Updated by okurz 6 months ago

  • Status changed from Feedback to Resolved

PR is merged with approval by multiple contributors. There are rules to apply checks and for applying any necessary style changes.

Also available in: Atom PDF