Static helper for backwards compatibility and use in editor extensions and other tools.
(globs: string | undefined, options: LinterOptions & XoConfigOptions)
| 290 | Static helper for backwards compatibility and use in editor extensions and other tools. |
| 291 | */ |
| 292 | static async lintFiles(globs: string | undefined, options: LinterOptions & XoConfigOptions) { |
| 293 | const xo = new Xo( |
| 294 | { |
| 295 | cwd: options.cwd, |
| 296 | fix: options.fix, |
| 297 | filePath: options.filePath, |
| 298 | quiet: options.quiet, |
| 299 | ts: options.ts, |
| 300 | configPath: options.configPath, |
| 301 | suppressionsLocation: options.suppressionsLocation, |
| 302 | }, |
| 303 | { |
| 304 | space: options.space, |
| 305 | semicolon: options.semicolon, |
| 306 | prettier: options.prettier, |
| 307 | ignores: options.ignores, |
| 308 | }, |
| 309 | ); |
| 310 | |
| 311 | return xo.lintFiles(globs); |
| 312 | } |
| 313 | |
| 314 | /** |
| 315 | Write the fixes to disk. |
no test coverage detected