or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

cli.mdconfiguration.mdindex.mdnodejs-api.mdoutput-formats.mdplugins.mdrules.md

output-formats.mddocs/

0

# Output Formats

1

2

Oxlint provides multiple output format options to integrate with different development tools, CI/CD systems, and editor environments. Each format serves specific use cases and provides different levels of detail and structure.

3

4

## Available Output Formats

5

6

### Default Format

7

8

```bash { .api }

9

oxlint --format default

10

# or simply

11

oxlint

12

```

13

14

Human-readable output optimized for terminal display with color coding and clear problem descriptions.

15

16

**Example output:**

17

```

18

src/index.js:5:1 - error(no-debugger): Unexpected 'debugger' statement

19

src/utils.js:12:5 - warn(prefer-const): 'data' is never reassigned. Use 'const' instead of 'let'

20

21

✖ 2 problems (1 error, 1 warning)

22

1 error and 0 warnings potentially fixable with the `--fix` option

23

```

24

25

### JSON Format

26

27

```bash { .api }

28

oxlint --format json

29

```

30

31

Machine-readable JSON output ideal for programmatic processing and tool integration.

32

33

**Structure:**

34

```json { .api }

35

[

36

{

37

"filePath": "src/index.js",

38

"messages": [

39

{

40

"ruleId": "no-debugger",

41

"severity": 2,

42

"message": "Unexpected 'debugger' statement",

43

"line": 5,

44

"column": 1,

45

"nodeType": "DebuggerStatement",

46

"fix": null

47

}

48

],

49

"errorCount": 1,

50

"warningCount": 0,

51

"fixableErrorCount": 0,

52

"fixableWarningCount": 0

53

}

54

]

55

```

56

57

### Stylish Format

58

59

```bash { .api }

60

oxlint --format stylish

61

```

62

63

Clean, organized output similar to ESLint's stylish formatter, grouped by file with aligned columns.

64

65

**Example output:**

66

```

67

src/index.js

68

5:1 error Unexpected 'debugger' statement no-debugger

69

70

src/utils.js

71

12:5 warning 'data' is never reassigned. Use 'const' instead of 'let' prefer-const

72

73

✖ 2 problems (1 error, 1 warning)

74

```

75

76

### Checkstyle Format

77

78

```bash { .api }

79

oxlint --format checkstyle

80

```

81

82

XML format compatible with Checkstyle tools and many CI/CD systems.

83

84

**Structure:**

85

```xml { .api }

86

<?xml version="1.0" encoding="UTF-8"?>

87

<checkstyle version="8.0">

88

<file name="src/index.js">

89

<error line="5" column="1" severity="error" message="Unexpected 'debugger' statement" source="no-debugger"/>

90

</file>

91

</checkstyle>

92

```

93

94

### GitHub Format

95

96

```bash { .api }

97

oxlint --format github

98

```

99

100

Output format for GitHub Actions annotations that appear in pull request reviews and workflow summaries.

101

102

**Example output:**

103

```

104

::error file=src/index.js,line=5,col=1::Unexpected 'debugger' statement (no-debugger)

105

::warning file=src/utils.js,line=12,col=5::'data' is never reassigned. Use 'const' instead of 'let' (prefer-const)

106

```

107

108

### GitLab Format

109

110

```bash { .api }

111

oxlint --format gitlab

112

```

113

114

Code Quality report format compatible with GitLab CI/CD pipelines.

115

116

**Structure:**

117

```json { .api }

118

[

119

{

120

"type": "issue",

121

"check_name": "no-debugger",

122

"description": "Unexpected 'debugger' statement",

123

"fingerprint": "hash_value",

124

"severity": "major",

125

"location": {

126

"path": "src/index.js",

127

"lines": {

128

"begin": 5

129

}

130

}

131

}

132

]

133

```

134

135

### JUnit Format

136

137

```bash { .api }

138

oxlint --format junit

139

```

140

141

JUnit XML format for test result integration and CI/CD reporting.

142

143

**Structure:**

144

```xml { .api }

145

<?xml version="1.0" encoding="UTF-8"?>

146

<testsuites>

147

<testsuite name="oxlint" tests="2" failures="1" errors="1" time="0">

148

<testcase classname="src/index.js" name="no-debugger">

149

<failure message="Unexpected 'debugger' statement"/>

150

</testcase>

151

</testsuite>

152

</testsuites>

153

```

154

155

### Unix Format

156

157

```bash { .api }

158

oxlint --format unix

159

```

160

161

Compact format suitable for Unix/Linux tools and scripting.

162

163

**Example output:**

164

```

165

src/index.js:5:1: Unexpected 'debugger' statement [Error/no-debugger]

166

src/utils.js:12:5: 'data' is never reassigned. Use 'const' instead of 'let' [Warning/prefer-const]

167

```

168

169

## Format-Specific Use Cases

170

171

### Development Workflow

172

173

```bash

174

# Terminal development with colored output

175

oxlint --format default src/

176

177

# Clean output for code review

178

oxlint --format stylish src/

179

```

180

181

### CI/CD Integration

182

183

```bash

184

# GitHub Actions workflow

185

oxlint --format github src/

186

187

# GitLab CI with Code Quality reports

188

oxlint --format gitlab src/ > code-quality.json

189

190

# JUnit for test reporting dashboards

191

oxlint --format junit src/ > lint-results.xml

192

193

# Checkstyle for Java-ecosystem tools

194

oxlint --format checkstyle src/ > checkstyle-results.xml

195

```

196

197

### Programmatic Processing

198

199

```bash

200

# JSON for custom tooling and scripts

201

oxlint --format json src/ | jq '.[] | select(.errorCount > 0)'

202

203

# Unix format for grep/awk processing

204

oxlint --format unix src/ | grep "Error" | wc -l

205

```

206

207

### Editor Integration

208

209

Most editors and Language Server Protocol implementations prefer structured formats:

210

211

```bash

212

# JSON format for editor plugins

213

oxlint --format json src/

214

215

# Checkstyle for IDE integration

216

oxlint --format checkstyle src/

217

```

218

219

## Output Customization

220

221

### Silent Mode

222

223

```bash { .api }

224

# Suppress all output except exit codes

225

oxlint --silent src/

226

```

227

228

### Warning Control

229

230

```bash { .api }

231

# Suppress warnings, show errors only

232

oxlint --quiet --format json src/

233

234

# Treat warnings as errors

235

oxlint --deny-warnings --format github src/

236

```

237

238

### Diagnostic Information

239

240

Additional information can be included with specific formats:

241

242

```bash

243

# Include file count and timing information

244

oxlint --format default src/ # Shows summary statistics

245

246

# Configuration debugging

247

oxlint --print-config --format json # Shows resolved config

248

```

249

250

## Format Selection Guidelines

251

252

**Choose based on your use case:**

253

254

- **default/stylish** - Human reading, terminal development

255

- **json** - Programmatic processing, custom tooling

256

- **github** - GitHub Actions, pull request reviews

257

- **gitlab** - GitLab CI/CD, merge request integration

258

- **junit** - Test reporting, dashboard integration

259

- **checkstyle** - Java ecosystem tools, legacy CI systems

260

- **unix** - Shell scripting, Unix tool chains

261

262

**Performance considerations:**

263

- JSON format has slight overhead for large outputs

264

- Default format includes color codes (disable with `NO_COLOR=1`)

265

- Silent mode provides fastest execution for exit-code-only scenarios