Skip to content

Commit 79e7970

Browse files
authored
Add configuration file path setting
1 parent d51326b commit 79e7970

21 files changed

Lines changed: 499 additions & 254 deletions

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,15 @@ You can invoke command `TypeScript Code Organizer: Organize Current File` by usi
3939
Extensions supports the following configuration options:
4040

4141
- `tsco.organizeOnSave`: Organizes TypeScripot code on save (set to false by default).
42+
- `tsco.configurationFilePath`: Specifies the file path to the TSCO configuraiton file. Can be absolute or relative to the workspace root.
4243

4344
## Code Organization Configuration
4445

4546
Code organization is configured by a `tsco.json` configuration file. To create a default TypeScript Code Organizer configuration file, invoke the following command:
4647

4748
![Create Configuration Command](./doc/create_configuration_command.png "Create Configuration Command")
4849

49-
This will create a `tsco.json` file at the workspace root directory. For configuration reference, see [TypeScript Code Organizer Configuration Reference](https://www.npmjs.com/package/tsco-cli). The configuration file should be commited to the repository and shared with team members to ensure consistent code organization configuration.
50+
This will create a `tsco.json` file at the workspace root directory. For configuration reference, see [TypeScript Code Organizer Configuration Reference](https://www.npmjs.com/package/tsco-cli). The configuration file should be commited to the repository and shared with team members to ensure consistent code organization configuration. If you would like to specify an alternative location for the configuration file, you con do it using `tsco.configurationFilePath` setting. If no configuration file is found, TSCO will look in the parent directory until `tsco.json` or the root of file system is found. If `tsco.json` is not found, the default configuration will be used.
5051

5152
## Ignoring files
5253

@@ -62,6 +63,12 @@ or
6263
// <auto-generated />
6364
```
6465

66+
## Debugging TSCO
67+
68+
If you have issues with TSCO, like not using the correct configuration file, you can use tye output window to investigate issues:
69+
70+
![Debugging](./doc/create_configuration_command.png "Debugging")
71+
6572
## Using TypeScript Code Organizer in command line
6673

6774
See [TypeScript Code Organizer Command Line Interface](https://www.npmjs.com/package/tsco-cli) on NPM.
@@ -188,3 +195,14 @@ See [TypeScript Code Organizer Command Line Interface](https://www.npmjs.com/pac
188195
- added support for regular expressions and globs when putting members above or below the member type group
189196

190197
- added support for sorting member type groups asc, desc or no sorting
198+
199+
### 2.0.7
200+
201+
- added debugging output
202+
- added saving changes on organizing
203+
- added configuration file path setting
204+
- fix issue with missing typescript dependency
205+
- fix module formatting issue
206+
- fix issue with import statements with comments
207+
- fix issue with sorting members with dependencies
208+
- fix organizing imports with type aliases

doc/debugging.png

11.6 KB
Loading

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "tsco",
33
"displayName": "TypeScript Code Organizer",
44
"description": "TypeScript Code Organizer for VS Code",
5-
"version": "2.0.6",
5+
"version": "2.0.7",
66
"publisher": "aljazsim",
77
"author": {
88
"name": "aljazsim",
@@ -51,6 +51,11 @@
5151
"type": "boolean",
5252
"default": false,
5353
"description": "Source code will get organized automatically on file saved."
54+
},
55+
"tsco.configurationFilePath": {
56+
"type": "string",
57+
"default": "",
58+
"description": "Location of tsco.json. Can be absolute file path or relative to the workspace root. If configuration file path isn't specified, default configuration will be used."
5459
}
5560
}
5661
},

src/configuration/vscode-configuration.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)