diff --git a/editors/vscode/client/Config.ts b/editors/vscode/client/Config.ts index a53e8126c6238..9817a38662561 100644 --- a/editors/vscode/client/Config.ts +++ b/editors/vscode/client/Config.ts @@ -19,7 +19,7 @@ export class Config implements ConfigInterface { this._runTrigger = conf.get('lint.run') || 'onType'; this._enable = conf.get('enable') ?? true; this._trace = conf.get('trace.server') || 'off'; - this._configPath = conf.get('configPath') || '.eslintrc'; + this._configPath = conf.get('configPath') || '.oxlintrc.json'; this._binPath = conf.get('path.server'); } @@ -124,7 +124,7 @@ interface ConfigInterface { * * `oxc.configPath` * - * @default ".eslintrc" + * @default ".oxlintrc.json" */ configPath: string; /** diff --git a/editors/vscode/client/config.spec.ts b/editors/vscode/client/config.spec.ts index 266bf449119fe..4522361c86de0 100644 --- a/editors/vscode/client/config.spec.ts +++ b/editors/vscode/client/config.spec.ts @@ -16,7 +16,7 @@ suite('Config', () => { strictEqual(config.runTrigger, 'onType'); strictEqual(config.enable, true); strictEqual(config.trace, 'off'); - strictEqual(config.configPath, '.eslintrc'); + strictEqual(config.configPath, '.oxlintrc.json'); strictEqual(config.binPath, ''); }); diff --git a/editors/vscode/client/extension.ts b/editors/vscode/client/extension.ts index d8417b081f740..0e53d47ac226f 100644 --- a/editors/vscode/client/extension.ts +++ b/editors/vscode/client/extension.ts @@ -142,8 +142,7 @@ export async function activate(context: ExtensionContext) { synchronize: { // Notify the server about file config changes in the workspace fileEvents: [ - workspace.createFileSystemWatcher('**/.eslintr{c,c.json}'), - workspace.createFileSystemWatcher('**/.oxlint{.json,rc.json,rc}'), + workspace.createFileSystemWatcher('**/.oxlint{.json,rc.json}'), workspace.createFileSystemWatcher('**/oxlint{.json,rc.json}'), ], }, diff --git a/editors/vscode/package.json b/editors/vscode/package.json index ef9fc2b09e418..ebdc62ad69535 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -92,7 +92,7 @@ "oxc.configPath": { "type": "string", "scope": "window", - "default": ".eslintrc", + "default": ".oxlintrc.json", "description": "Path to ESlint configuration." }, "oxc.path.server": { @@ -108,8 +108,7 @@ "oxlintrc.json", "oxlint.json", ".oxlintrc.json", - ".oxlint.json", - ".oxlintrc" + ".oxlint.json" ], "url": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json" } @@ -121,8 +120,7 @@ "oxlintrc.json", "oxlint.json", ".oxlintrc.json", - ".oxlint.json", - ".oxlintrc" + ".oxlint.json" ] } ]