Skip to content

Implements xo#41

Open
Chen3018 wants to merge 4 commits intomainfrom
implement-xo
Open

Implements xo#41
Chen3018 wants to merge 4 commits intomainfrom
implement-xo

Conversation

@Chen3018
Copy link
Contributor

@Chen3018 Chen3018 commented Mar 15, 2024

xo is a configurable ESLint wrapper. That means its a linter and style enforcer. It includes plugins for ESLint like unicorn, import, ava, n and more. It also caches results to improve performance, which is important for a large codebase like Nodebb. No configurations are needed to begin using it.

xo run partial output:
xo-output.txt

Screenshot of xo run:
image

xo takes a lot longer than ESLint due to the fact that it does what ESLint does plus more. However, due to xo being highly customizable, run time can be reduced simply by excluding unnecessary/unhelpful rules (like 8 indents instead of 4). This also means we can also add plugins we think are helpful without much effort, as well as custom rules. The auto fixer is also extremely useful, reducing 127414 to 17779 (86% improvement).

xo can simply replace ESLint since everything done by ESLint is done by xo.

@coveralls
Copy link

coveralls commented Mar 15, 2024

Pull Request Test Coverage Report for Build 8290966844

Details

  • 17 of 218 (7.8%) changed or added relevant lines in 5 files are covered.
  • 38 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-76.3%) to 8.864%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/database/index.js 2 12 16.67%
public/src/modules/slugify.js 12 24 50.0%
src/meta/index.js 1 20 5.0%
src/pubsub.js 1 32 3.13%
src/meta/configs.js 1 130 0.77%
Files with Coverage Reduction New Missed Lines %
src/database/index.js 4 19.44%
src/meta/index.js 16 14.29%
src/meta/configs.js 18 1.56%
Totals Coverage Status
Change from base Build 8251971259: -76.3%
Covered Lines: 35
Relevant Lines: 274

💛 - Coveralls

@Chen3018 Chen3018 marked this pull request as ready for review March 15, 2024 03:41
@cathyxfeiyang
Copy link
Collaborator

included in CI pipeline (shown in failing lint checks - Run standard)

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.

3 participants