• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 21552830208

31 Jan 2026 11:40PM UTC coverage: 80.277% (-0.05%) from 80.324%
21552830208

Pull #23062

github

web-flow
Merge 808a9786c into 2c4dcf9cf
Pull Request #23062: Remove support for Get

18 of 25 new or added lines in 4 files covered. (72.0%)

17119 existing lines in 541 files now uncovered.

78278 of 97510 relevant lines covered (80.28%)

3.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/src/python/pants/backend/javascript/lint/prettier/subsystem.py
1
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
1✔
5

UNCOV
6
import os
1✔
UNCOV
7
from collections.abc import Iterable
1✔
8

UNCOV
9
from pants.backend.javascript.subsystems.nodejs_tool import NodeJSToolBase
1✔
UNCOV
10
from pants.core.util_rules.config_files import ConfigFilesRequest
1✔
UNCOV
11
from pants.option.option_types import ArgsListOption, SkipOption
1✔
UNCOV
12
from pants.util.strutil import help_text
1✔
13

14

UNCOV
15
class Prettier(NodeJSToolBase):
1✔
UNCOV
16
    options_scope = "prettier"
1✔
UNCOV
17
    name = "Prettier"
1✔
UNCOV
18
    help = help_text(
1✔
19
        """
20
        The Prettier utility for formatting JS/TS (and others) code
21
        (https://prettier.io/).
22
        """
23
    )
24

UNCOV
25
    default_version = "prettier@3.6.2"
1✔
26

UNCOV
27
    skip = SkipOption("fmt", "lint")
1✔
UNCOV
28
    args = ArgsListOption(example="--version")
1✔
29

UNCOV
30
    def config_request(self, dirs: Iterable[str]) -> ConfigFilesRequest:
1✔
31
        """Prettier will use the closest configuration file to the file currently being formatted,
32
        so add all of them In the event of multiple configuration files, Prettier has an order of
33
        precedence specified here: https://prettier.io/docs/en/configuration.html."""
34

35
        config_files = (
×
36
            *[f"prettier.config{ext}" for ext in [".js", ".cjs"]],
37
            *[
38
                f".prettierrc{ext}"
39
                for ext in [
40
                    "",
41
                    ".json",
42
                    ".yml",
43
                    ".yaml",
44
                    ".json5",
45
                    ".js",
46
                    ".cjs",
47
                    ".toml",
48
                ]
49
            ],
50
        )
51
        check_existence = [os.path.join(d, file) for file in config_files for d in ("", *dirs)]
×
52
        return ConfigFilesRequest(
×
53
            discovery=True,
54
            check_existence=check_existence,
55
        )
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc