mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
fix(vscode)!: use .oxlintrc.json as default value for oxc.configPath (#7442)
**BREAKING CHANGE**: VSCode-Client does not watch for `eslint` configuration files. Default value for `oxc.configPath` is now `.oxlintrc.json` instead of `.eslintrc`
This commit is contained in:
parent
84fcc43cf5
commit
b04041d1cf
4 changed files with 7 additions and 10 deletions
|
|
@ -19,7 +19,7 @@ export class Config implements ConfigInterface {
|
|||
this._runTrigger = conf.get<Trigger>('lint.run') || 'onType';
|
||||
this._enable = conf.get<boolean>('enable') ?? true;
|
||||
this._trace = conf.get<TraceLevel>('trace.server') || 'off';
|
||||
this._configPath = conf.get<string>('configPath') || '.eslintrc';
|
||||
this._configPath = conf.get<string>('configPath') || '.oxlintrc.json';
|
||||
this._binPath = conf.get<string>('path.server');
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ interface ConfigInterface {
|
|||
*
|
||||
* `oxc.configPath`
|
||||
*
|
||||
* @default ".eslintrc"
|
||||
* @default ".oxlintrc.json"
|
||||
*/
|
||||
configPath: string;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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, '');
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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}'),
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue