Skip to content

Commit d0f340d

Browse files
committed
fix: Update settings to save file path to config file and not the config file directory
1 parent 6dac8ef commit d0f340d

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
## [Unreleased]
66

7+
### Fixed
8+
9+
- Fix Manual configuration to save the correct file path to the Oxlint config file.
10+
711
## [0.0.2] - 2025-04-15
812

913
### Fixed

src/main/kotlin/com/github/oxc/project/oxcintellijplugin/settings/OxcSettings.kt

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
package com.github.oxc.project.oxcintellijplugin.settings
22

33
import com.github.oxc.project.oxcintellijplugin.settings.OxcSettingsState.Companion.DEFAULT_EXTENSION_LIST
4-
import com.intellij.openapi.components.*
4+
import com.intellij.openapi.components.Service
5+
import com.intellij.openapi.components.SettingsCategory
6+
import com.intellij.openapi.components.SimplePersistentStateComponent
7+
import com.intellij.openapi.components.State
8+
import com.intellij.openapi.components.Storage
9+
import com.intellij.openapi.components.service
510
import com.intellij.openapi.project.Project
611
import com.intellij.openapi.vfs.VirtualFile
7-
import java.io.File
812

913
@Service(Service.Level.PROJECT)
1014
@State(name = "OxcSettings", storages = [Storage("OxcSettings.xml")],
@@ -34,11 +38,6 @@ class OxcSettings(private val project: Project) :
3438
var configPath: String
3539
get() = state.configPath ?: ""
3640
set(value) {
37-
val file = File(value)
38-
if (file.isFile) {
39-
state.configPath = file.parentFile.path
40-
return
41-
}
4241
state.configPath = value
4342
}
4443

src/main/resources/messages/OxcBundle.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
oxc.config.path.label=Path to .oxlintrc.json
1+
oxc.config.path.label=Path to Oxlint Config File
22
oxc.configure.extensions.link=Configure file extensions
33
oxc.file.not.supported.description=The file "{0}" is not supported by Oxc.
44
oxc.file.not.supported.title=Unsupported file
@@ -24,4 +24,4 @@ oxc.settings.languageServerPath=Path to Oxc Language Server
2424
oxc.settings.oxlintRunTrigger=Oxlint Execution Trigger
2525
oxc.settings.selectPathToLanguageServer=Select Path to Oxc Language Server
2626
oxc.supported.extensions.comment=Enter file extensions separated by commas (e.g., .js, .ts, .jsx). Each extension must start with '.' and contain only alphanumeric characters.
27-
oxc.supported.extensions.label=Supported File Extensions:
27+
oxc.supported.extensions.label=Supported File Extensions:

0 commit comments

Comments
 (0)