Skip to content

Commit 0b1fcd3

Browse files
committed
docs: rename plug-in, to plugin
1 parent 6bbdcc1 commit 0b1fcd3

File tree

10 files changed

+51
-35
lines changed

10 files changed

+51
-35
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ body:
2828
- type: input
2929
id: js_prettier_version
3030
attributes:
31-
label: JsPrettier plug-in version
31+
label: JsPrettier plugin version
3232
description: Located in the [package.json](https://github.com/jonlabelle/SublimeJsPrettier/blob/master/package.json#L3 "Go to version in package.json") file
3333
placeholder: 'x.x.x'
3434
validations:

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Checkout what's new in [Prettier v2.4](https://prettier.io/blog/2021/09/09/2.4.0
4343

4444
**Release Date:** 2021-07-14
4545

46-
Config and executable paths are no longer cached by the plug-in.
46+
Config and executable paths are no longer cached by the plugin.
4747
Path resolution/discovery caching now differed to Prettier when applicable.
4848

4949
## 1.38.0
@@ -151,7 +151,7 @@ Tab trigger is `pi`.
151151
forcefully terminated.
152152

153153
To avoid this problematic behavior, or until the defect is resolved, you can
154-
disable the plug-in (JsPrettier) from ever passing the cursor offset
154+
disable the plugin (JsPrettier) from ever passing the cursor offset
155155
position to Prettier by setting the `disable_prettier_cursor_offset` value
156156
to `true`.
157157

@@ -202,7 +202,7 @@ Tab trigger is `pi`.
202202
**Release Date:** 2019-01-21
203203

204204
- Added setting to `disable_tab_width_auto_detection` (default is `false`);
205-
which disables the default behavior of the plug-in automatically setting
205+
which disables the default behavior of the plugin automatically setting
206206
Prettier's "tabWidth" option (at runtime) with the SublimeText configured
207207
value for "tab_size".
208208

JsPrettier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ def parse_prettier_options(self, view, parsed_additional_cli_args, prettier_conf
596596
if option_name == 'editorconfig':
597597
if str(option_value).lower() == 'false':
598598
# only include negated editorconfig option, since default is already true
599-
# and can otherwise break prettier-eslint plug-in, see #235
599+
# and can otherwise break prettier-eslint plugin, see #235
600600
prettier_options.append("--no-editorconfig")
601601
continue
602602

@@ -642,7 +642,7 @@ def parse_prettier_options(self, view, parsed_additional_cli_args, prettier_conf
642642

643643
if debug_enabled(view):
644644
if not parsed_additional_cli_args.count('--log-level') > 0:
645-
# set prettier's log level to debug, when the plug-in's debug setting is enabled:
645+
# set prettier's log level to debug, when the plugin's debug setting is enabled:
646646
prettier_options.append('--log-level')
647647
prettier_options.append('debug')
648648

JsPrettier.sublime-settings

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
// 1. Locally installed prettier relative to active view.
3636
// 2. Locally installed prettier relative to the Sublime Text Project file's root directory. e.g.: `node_modules/.bin/prettier` and `node_modules/prettier/bin-prettier.js`.
3737
// 3. The current user home directory. e.g.: `$HOME/node_modules/.bin/prettier`.
38-
// 4. JsPrettier Sublime Text plug-in directory.
38+
// 4. JsPrettier Sublime Text plugin directory.
3939
// 5. Globally installed prettier.
4040
//
4141
// macOS and Linux examples:
@@ -217,7 +217,7 @@
217217
// forcefully terminated.
218218
//
219219
// To avoid this problematic behavior, or until the defect is resolved, you
220-
// can disable the plug-in (JsPrettier) from ever passing the cursor offset
220+
// can disable the plugin (JsPrettier) from ever passing the cursor offset
221221
// position to Prettier by setting the `disable_prettier_cursor_offset` value to `true`.
222222
//
223223
// Related Issues:
@@ -383,7 +383,7 @@
383383
// Which parser to use. Valid options are "flow", "babel",
384384
// "typescript", "css", "json", "graphql", "markdown" and "yaml".
385385
//
386-
// NOTE: The `parser` option is automatically set by the plug-in
386+
// NOTE: The `parser` option is automatically set by the plugin
387387
// (JsPrettier), based on the contents of current file or selection.
388388
// --------------------------------------------------------------------
389389

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Latest Release](https://img.shields.io/github/v/tag/jonlabelle/SublimeJsPrettier.svg?label=version&sort=semver)](https://github.com/jonlabelle/SublimeJsPrettier/tags)
66
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/jonlabelle/SublimeJsPrettier/blob/master/LICENSE)
77

8-
> [JsPrettier] is a Sublime Text Plug-in for [Prettier], the opinionated code
8+
> [JsPrettier] is a Sublime Text Plugin for [Prettier], the opinionated code
99
> formatter.
1010
1111
[![Before and After JsPrettier](https://github.com/jonlabelle/SublimeJsPrettier/blob/master/screenshots/before_and_after.gif?raw=true)](https://github.com/jonlabelle/SublimeJsPrettier/blob/master/screenshots/demo.gif)
@@ -25,12 +25,12 @@
2525
- [Install JsPrettier Using Git](#install-jsprettier-using-git)
2626
- [Usage](#usage)
2727
- [Command Scope](#command-scope)
28-
- [Plug-in Settings and Prettier Options](#plug-in-settings-and-prettier-options)
29-
- [Plug-in Settings](#plug-in-settings)
28+
- [Plugin Settings and Prettier Options](#plugin-settings-and-prettier-options)
29+
- [Plugin Settings](#plugin-settings)
3030
- [Prettier Options](#prettier-options)
3131
- [Project-level Settings](#project-level-settings)
3232
- [Prettier Configuration Files](#prettier-configuration-files)
33-
- [Prettier Plug-in Support](#prettier-plugin-support)
33+
- [Prettier Plugin Support](#prettier-plugin-support)
3434
- [Prettier PHP](#prettier-php)
3535
- [Prettier Community Plugins](#prettier-community-plugins)
3636
- [Issues](#issues)
@@ -143,17 +143,17 @@ navigating to `Preferences -> Key Bindings` and add the following configuration:
143143
{ "keys": ["ctrl+alt+f"], "command": "js_prettier" }
144144
```
145145

146-
## Plug-in Settings and Prettier Options
146+
## Plugin Settings and Prettier Options
147147

148-
Configure plug-in settings and Prettier options via the application menu:
148+
Configure plugin settings and Prettier options via the application menu:
149149

150150
- **Preferences**
151151
- **Package Settings**
152152
- **JsPrettier**
153153
- **Settings - Default** (to view the defaults)
154154
- **Settings - User** (to override the defaults)
155155

156-
### Plug-in Settings
156+
### Plugin Settings
157157

158158
- **debug** (default: ***false***)
159159
When enabled (*true*), debug info will print to the console - useful for
@@ -164,13 +164,13 @@ Configure plug-in settings and Prettier options via the application menu:
164164

165165
- **prettier_cli_path** (default: ***empty***)
166166
If Sublime Text has problems automatically resolving a path to [Prettier],
167-
you can set a custom path here. When the setting is empty, the plug-in will
167+
you can set a custom path here. When the setting is empty, the plugin will
168168
attempt to find Prettier by:
169169

170170
1. Locally installed prettier relative to active view.
171171
2. Locally installed prettier relative to the Sublime Text Project file's root directory.
172172
3. The current user home directory.
173-
4. JsPrettier Sublime Text plug-in directory.
173+
4. JsPrettier Sublime Text plugin directory.
174174
5. Globally installed prettier.
175175

176176
**Examples:**
@@ -266,7 +266,7 @@ Configure plug-in settings and Prettier options via the application menu:
266266
file size checking (default).
267267
268268
- **disable_tab_width_auto_detection** (default: ***false***)
269-
Whether or not to disable the plug-in from automatically setting Prettier's
269+
Whether or not to disable the plugin from automatically setting Prettier's
270270
[--tab-width](https://prettier.io/docs/en/options.html#tab-width)
271271
option, and adhere to the Prettier configured setting.
272272

@@ -279,7 +279,7 @@ Configure plug-in settings and Prettier options via the application menu:
279279
forcefully terminated.
280280

281281
To avoid this problematic behavior, or until the defect is resolved, you can
282-
disable the plug-in (JsPrettier) from ever passing the cursor offset
282+
disable the plugin (JsPrettier) from ever passing the cursor offset
283283
position to Prettier by setting the `disable_prettier_cursor_offset` value
284284
to `true`.
285285

@@ -347,7 +347,7 @@ Configure plug-in settings and Prettier options via the application menu:
347347
Use single quotes instead of double quotes in JSX.
348348

349349
- **parser** (default: "***babel***")
350-
The [`parser`] is automatically set by the plug-in (JsPrettier), based
350+
The [`parser`] is automatically set by the plugin (JsPrettier), based
351351
on the contents of current file or selection.
352352

353353
- **semi** (default: ***true***)
@@ -475,7 +475,7 @@ See the Prettier Options [doc page] for more details and examples.
475475

476476
JsPrettier supports [project-level settings], specified in `<project_name>.sublime-project` files.
477477

478-
To override [previous configurations](#plug-in-settings-and-prettier-options) with your project-level settings,
478+
To override [previous configurations](#plugin-settings-and-prettier-options) with your project-level settings,
479479
add a new `js_prettier` key and section under `settings` as shown in the [example below](#example-sublime-text-project-file).
480480

481481
#### Example Sublime Text Project File
@@ -564,7 +564,7 @@ and tell Prettier not to attempt to find config files.
564564
#### Prettier Ignore Config File Discovery (`.prettierignore`)
565565
566566
When the [`--ignore-path`] option is NOT specified in `additional_cli_args`,
567-
the plug-in will search for a `.prettierignore` file in the same directory of
567+
the plugin will search for a `.prettierignore` file in the same directory of
568568
the source file, then the active Sublime Text project's root directory. If
569569
neither path can be resolved, search up the directory tree, and finally look
570570
in the user's home directory.

jsprettier/sthelper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def resolve_prettier_cli_path(view, plugin_path, st_project_path):
155155
2. Locally installed prettier, relative to a Sublime Text Project
156156
file's root directory, e.g.: `node_modules/.bin/prettier' and 'node_modules/prettier/bin-prettier.js';
157157
3. User's $HOME/node_modules directory.
158-
4. Look in the JsPrettier Sublime Text plug-in directory for `node_modules/.bin/prettier`.
158+
4. Look in the JsPrettier Sublime Text plugin directory for `node_modules/.bin/prettier`.
159159
5. Finally, check if prettier is installed globally.
160160
161161
:return: The prettier cli path.

messages/1.22.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
Release Date: 2019-01-21
44

55
- Added setting to `disable_tab_width_auto_detection` (default is `false`);
6-
which disables the default behavior of the plug-in automatically setting
6+
which disables the default behavior of the plugin automatically setting
77
Prettier's "tabWidth" option (at runtime) with the SublimeText configured
88
value for "tab_size".

messages/install.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
│ | |_| \__ \ __/| | | __/ |_| |_| | __/ | │
66
│ \___/|___/_| |_| \___|\__|\__|_|\___|_| │
77
│ │
8-
│ Sublime Text Plug-in for Prettier, the opinionated code formatter. │
8+
│ Sublime Text Plugin for Prettier, the opinionated code formatter. │
99
└────────────────────────────────────────────────────────────────────────────┘
1010

1111
## Getting started
@@ -50,7 +50,7 @@ There are three ways to format code...
5050

5151
3. Key Binding
5252

53-
There is no default key binding for this plug-in.
53+
There is no default key binding for this plugin.
5454

5555
To add a key binding, navigate to "Preferences" -> "Key Bindings...", and
5656
add an entry for "js_prettier". For example...

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sublime-js-prettier",
33
"version": "1.68.2",
4-
"description": "JsPrettier is a Sublime Text Plug-in for Prettier, the opinionated code formatter.",
4+
"description": "JsPrettier is a Sublime Text Plugin for Prettier, the opinionated code formatter.",
55
"author": "Jon LaBelle",
66
"license": "MIT",
77
"dependencies": {

tests/test_json.py

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,42 @@
99

1010
class TestSettings(unittest.TestCase):
1111
def _get_json_files(self, file_pattern, folder='.'):
12+
"""
13+
Recursively yield file paths matching the given pattern within the specified folder.
14+
"""
1215
for root, dirnames, filenames in os.walk(folder):
1316
for filename in fnmatch.filter(filenames, file_pattern):
1417
yield os.path.join(root, filename)
1518
for dirname in [d for d in dirnames
16-
if d not in ('.cache', '.git', '.github', '.idea',
17-
'messages', 'screenshots', 'scripts', os.path.join('tests', '__pycache__'))]:
19+
if d not in (
20+
'.cache',
21+
'.git',
22+
'.github',
23+
'.idea',
24+
'jsprettier',
25+
'messages',
26+
'node_modules',
27+
'screenshots',
28+
'scripts',
29+
'Snippets',
30+
'tests',
31+
'venv',
32+
os.path.join('tests', '__pycache__')
33+
)]:
1834
for f in self._get_json_files(file_pattern, os.path.join(root, dirname)):
1935
yield f
2036

2137
def test_json_settings(self):
22-
"""Test each JSON file."""
38+
"""
39+
Test each JSON file to ensure it conforms to the expected format.
40+
"""
2341
file_patterns = (
24-
'*.json',
2542
'*.sublime-commands',
2643
'*.sublime-menu',
27-
'*.sublime-settings',
28-
'.markdownlintrc'
44+
'*.sublime-settings'
2945
)
3046
for file_pattern in file_patterns:
3147
for f in self._get_json_files(file_pattern):
3248
print(f)
3349
self.assertFalse(validate_json_format.CheckJsonFormat(False, True).check_format(f),
34-
"%s does not comform to expected format!" % f)
50+
"%s does not conform to expected format." % f)

0 commit comments

Comments
 (0)