Skip to content

Commit d3d1f42

Browse files
authored
chore: cleanup and lint (#338)
- Remove accidental `yarn.lock` files. - Correct package.json dependencies - run prettier on files. - Add samples for Arabic
1 parent f791149 commit d3d1f42

File tree

179 files changed

+1741
-8203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+1741
-8203
lines changed

CODE_OF_CONDUCT.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112112
**Consequence**: A permanent ban from any sort of public interaction within

dict-extensions.code-workspace

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
{
44
"path": "."
55
},
6+
{
7+
"path": "extensions/arabic"
8+
},
69
{
710
"path": "extensions/bulgarian"
811
},

extensions/arabic/.vscode/launch.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
"type": "extensionHost",
88
"request": "launch",
99
"runtimeExecutable": "${execPath}",
10-
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
10+
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "${workspaceRoot}/samples"],
1111
"stopOnEntry": false,
1212
"sourceMaps": true,
13-
"outFiles": [ "${workspaceRoot}/out/src/**/*.js" ],
13+
"outFiles": ["${workspaceRoot}/out/src/**/*.js"],
1414
"preLaunchTask": "npm: build"
1515
},
1616
{
1717
"name": "Launch Tests",
1818
"type": "extensionHost",
1919
"request": "launch",
2020
"runtimeExecutable": "${execPath}",
21-
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
21+
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test"],
2222
"stopOnEntry": false,
2323
"sourceMaps": true,
24-
"outFiles": [ "${workspaceRoot}/out/test/**/*.js" ],
24+
"outFiles": ["${workspaceRoot}/out/test/**/*.js"],
2525
"preLaunchTask": "npm: build"
2626
}
2727
]

extensions/arabic/.vscode/tasks.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
"label": "npm: watch",
3333
"type": "npm",
3434
"script": "watch",
35-
"problemMatcher": [
36-
"$tsc-watch"
37-
]
35+
"problemMatcher": ["$tsc-watch"]
3836
}
3937
]
4038
}

extensions/arabic/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ Arabic dictionary extension for VS Code.
44

55
Imports the Arabic spell checking dictionary for [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker).
66

7-
8-
97
## Installation
108

119
After this extension is installed, it is necessary to tell the spell checker to use it.
1210

1311
### Enable Dictionary
1412

15-
Commands (use `F1` or *View -> Command Palette...*):
13+
Commands (use `F1` or _View -> Command Palette..._):
14+
1615
- `F1` `Show Spell Checker Configuration Info`
1716
- Select the `Language` tab.
1817
- Enable the language Globally or in just the Workspace.
1918

2019
### Disable Dictionary
2120

22-
Commands (use `F1` or *View -> Command Palette...*):
21+
Commands (use `F1` or _View -> Command Palette..._):
22+
2323
- `F1` `Show Spell Checker Configuration Info`
2424
- Select the `Language` tab.
2525
- Disable the language Globally or in just the Workspace.
@@ -28,15 +28,15 @@ Commands (use `F1` or *View -> Command Palette...*):
2828

2929
This is done with the `language` setting.
3030

31-
*Preferences* -> *Settings*
31+
_Preferences_ -> _Settings_
3232

3333
Adding `ar` to the `cSpell.language` setting, will enable the Arabic dictionary.
3434
Example using both English and Arabic dictionaries:
35+
3536
```javascript
3637
"cSpell.language": "en,ar",
3738
```
3839

39-
40-
4140
## Requirements
41+
4242
This extension will automatically include [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) extension.

extensions/arabic/cspell-ext.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"import": [
3-
"@cspell/dict-ar/cspell-ext.json"
4-
]
2+
"import": ["@cspell/dict-ar/cspell-ext.json"]
53
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cSpell.language": "en,ar"
3+
}
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2008-01-10
2+
السلام عليكم،
3+
4+
تجدون رفقته ملفي قاموس التدقيق الإملائي للغة العربية hunspell-ar لمشروع آيسبل Ayaspell في نسخته النهائية (الملفان هما: ar.dic و ar.aff) اللذين يعملان ضمن برنامج هانسبل Hunspell (الإصدارة 1.1.12 وما فقوها) للمجموعة المكتبية أوبن-أوفيس OpenOffice.org.
5+
6+
عند تنصيبكم واستعمالكم للقاموس فإن المؤلف لا يتحمل أية مسؤولية في حالة حصول إتلاف ملفات أو ظهور خلل في الجهاز ناتجين عن تنصيبه أو استعماله.
7+
يخضع قاموس آيسبل للرخص الثلاثية: GPL/LGPL/MPL.
8+
9+
لمتابعة تطوير المشروع:
10+
القائمة البريدية: http://ayaspell.sourceforge.net
11+
المدونة: http://ayaspell.blogspot.com
12+
الموقع: http://ayaspell.sourceforge.net
13+
==========================================================================
14+
15+
<!---
16+
cspell:ignore آيسبل أوفيس هانسبل
17+
--->

extensions/arabic/samples/cspell.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"words": [
3+
"Ayaspell",
4+
"myspell"
5+
]
6+
}
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
* التنصيب على نظام لينكس
2+
* التنصيب على نظام ويندوز
3+
* التنصيب على نظام ماكنتوش
4+
5+
1 - توظيف قاموس التدقيق الإملائي تحت نظام لينكس
6+
7+
---
8+
9+
كيفية تنصيب وتوظيف المدقق الإملائي الاختباري على محرر المجموعة الكتبية أوبن - أوفيس OpenOffice.org تحت نظام لينكس Gnu/Linux:
10+
11+
- أولاً: تفعيل التدقيق إملائي لأية لغة تريد على أوبن-أوفيس حتى تُنشط خاصية المدقق الإملائي وتُحمّل المركبات والبرامج الضرورية له.
12+
- ثانياً: من اللازم إغلاق Openoffice.org إن كان مشغلاً و إبطال عمل برنامج تسريع عمل OpenOffice.org المسمى Quicks tarter إن كان منشطاً من قبل على نظامك.
13+
- ثالثاً: نسخ الملفين ar.dic و ar.aff في الدليل /usr/share/myspell/dicts/
14+
cp ar.dic /usr/share/myspell/dicts/
15+
cp ar.aff /usr/share/myspell/dicts/
16+
17+
- رابعاً: تحرير etc/openoffice/dictionary.lst/ بإضافة السطر الآتي(لا تنسى حفظ الأصلي للاحتياط):
18+
DICT ar TN ar
19+
- خامساً: شغّل برنامج أوبن - أوفيس ثم من خلال الإعدادات (أدوات ثم خيارات/إعدادات لغوية) قم بتعيين اللغة المراد تدقيق إملائها: عربية (تونس) في المثال.
20+
21+
2 - توظيف قاموس التدقيق الإملائي تحت نظام ويندوز
22+
23+
---
24+
25+
كيفية تنصيب وتوظيف المدقق الإملائي الاختباري على محرر المجموعة الكتبية أوبن - أوفيس OpenOffice.org تحت نظام لينكس Windows:
26+
27+
- أولاً: تفعيل التدقيق إملائي لأية لغة تريد على أوبن-أوفيس حتى تنشط خاصية المدقق الإملائي وتحمل المركبات والبرامج الضرورية له.
28+
- ثانياً: من اللازم إغلاق Openoffice.org إن كان مشغلاً و إبطال عمل برنامج تسريع عمل OpenOffice.org المسمى Quick starter إن كان منشطاً من قبل على نظامك.
29+
- ثالثاً: نسخ الملفين ar.dic و ar.aff في الدليل
30+
\Program Files\OpenOffice.org 2.1\share\dict\ooo
31+
32+
- رابعاً: تحرير \Program Files\OpenOffice.org 2.1\share\dict\ooodictionary.lst بإضافة السطر الآتي مثلاً (لا تنسى حفظ الأصلي للاحتياط):
33+
DICT ar TN ar
34+
- خامساً: شغّل برنامج أوبن - أوفيس ثم من خلال الإعدادات (أدوات ثم خيارات/إعدادات لغوية) ثم قم بتعيين اللغة المراد تدقيق إملائها: عربية (تونس) في المثال.
35+
36+
3 - توظيف قاموس التدقيق الإملائي تحت نظام ماكنتوش
37+
38+
---
39+
40+
ليس لدي نظام ماكنتوش لمعرفة كيفية التنصيب! من كان يعرف ليتصل بي كي أضيف المعلومة عل هذه الصفحة. وشكراً :)
41+
42+
<!---
43+
cspell:ignore ooodictionary أوفيس تُنشط شغّل ماكنتوش وتُحمّل ويندوز
44+
--->

extensions/arabic/src/extension.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,38 @@ interface CodeSpellCheckerExtension {
88
disableLocale(isGlobal: boolean, locale: string): Promise<void>;
99
}
1010

11-
//
11+
//
1212
const locale = 'ar';
13-
//
13+
//
1414

1515
// this method is called when your extension is activated
1616
// your extension is activated the very first time the command is executed
1717
export function activate(context: vscode.ExtensionContext) {
18-
1918
const vscodeSpellCheckerExtension = 'streetsidesoftware.code-spell-checker';
2019
const configLocation = context.asAbsolutePath('./cspell-ext.json');
2120

2221
const extension = vscode.extensions.getExtension<CodeSpellCheckerExtension>(vscodeSpellCheckerExtension);
2322

2423
if (extension) {
25-
extension.activate().then(ext => {
24+
extension.activate().then((ext) => {
2625
// We need to register the dictionary configuration with the Code Spell Checker Extension
2726
ext?.registerConfig?.(configLocation);
2827
});
2928
}
3029

31-
//
30+
//
3231
function enable(isGlobal: boolean) {
33-
extension && extension.activate().then(ext => {
34-
ext?.enableLocale?.(isGlobal, locale);
35-
});
32+
extension &&
33+
extension.activate().then((ext) => {
34+
ext?.enableLocale?.(isGlobal, locale);
35+
});
3636
}
3737

3838
function disable(isGlobal: boolean) {
39-
extension && extension.activate().then(ext => {
40-
ext?.disableLocale?.(isGlobal, locale);
41-
});
39+
extension &&
40+
extension.activate().then((ext) => {
41+
ext?.disableLocale?.(isGlobal, locale);
42+
});
4243
}
4344

4445
// Push the disposable to the context's subscriptions so that the
@@ -47,11 +48,10 @@ export function activate(context: vscode.ExtensionContext) {
4748
vscode.commands.registerCommand('cSpellExt_arabic.enable', () => enable(true)),
4849
vscode.commands.registerCommand('cSpellExt_arabic.disable', () => disable(true)),
4950
vscode.commands.registerCommand('cSpellExt_arabic.enableWorkspace', () => enable(false)),
50-
vscode.commands.registerCommand('cSpellExt_arabic.disableWorkspace', () => disable(false)),
51+
vscode.commands.registerCommand('cSpellExt_arabic.disableWorkspace', () => disable(false))
5152
);
52-
//
53+
//
5354
}
5455

5556
// this method is called when your extension is deactivated
56-
export function deactivate() {
57-
}
57+
export function deactivate() {}

extensions/arabic/test/extension.test.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ import * as myExtension from '../src/extension';
1414
*/
1515

1616
// Defines a Mocha test suite to group tests of similar kind together
17-
suite("Extension Tests", () => {
18-
17+
suite('Extension Tests', () => {
1918
// Defines a Mocha unit test
20-
test("Something 1", () => {
19+
test('Something 1', () => {
2120
assert.equal(-1, [1, 2, 3].indexOf(5));
2221
assert.equal(-1, [1, 2, 3].indexOf(0));
2322
});
24-
});
23+
});

extensions/arabic/test/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ var testRunner = require('vscode/lib/testrunner');
1515
// You can directly control Mocha options by uncommenting the following lines
1616
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
1717
testRunner.configure({
18-
ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
19-
useColors: true // colored output from test results
18+
ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
19+
useColors: true, // colored output from test results
2020
});
2121

22-
module.exports = testRunner;
22+
module.exports = testRunner;
+27-22
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
11
# Welcome to your first VS Code Extension
22

33
## What's in the folder
4-
* This folder contains all of the files necessary for your extension
5-
* `package.json` - this is the manifest file in which you declare your extension and command.
6-
The sample plugin registers a command and defines its title and command name. With this information
7-
VS Code can show the command in the command palette. It doesn’t yet need to load the plugin.
8-
* `src/extension.ts` - this is the main file where you will provide the implementation of your command.
9-
The file exports one function, `activate`, which is called the very first time your extension is
10-
activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
11-
We pass the function containing the implementation of the command as the second parameter to
12-
`registerCommand`.
4+
5+
- This folder contains all of the files necessary for your extension
6+
- `package.json` - this is the manifest file in which you declare your extension and command.
7+
The sample plugin registers a command and defines its title and command name. With this information
8+
VS Code can show the command in the command palette. It doesn’t yet need to load the plugin.
9+
- `src/extension.ts` - this is the main file where you will provide the implementation of your command.
10+
The file exports one function, `activate`, which is called the very first time your extension is
11+
activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
12+
We pass the function containing the implementation of the command as the second parameter to
13+
`registerCommand`.
1314

1415
## Get up and running straight away
15-
* press `F5` to open a new window with your extension loaded
16-
* run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`
17-
* set breakpoints in your code inside `src/extension.ts` to debug your extension
18-
* find output from your extension in the debug console
16+
17+
- press `F5` to open a new window with your extension loaded
18+
- run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`
19+
- set breakpoints in your code inside `src/extension.ts` to debug your extension
20+
- find output from your extension in the debug console
1921

2022
## Make changes
21-
* you can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`
22-
* you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes
23+
24+
- you can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`
25+
- you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes
2326

2427
## Explore the API
25-
* you can open the full set of our API when you open the file `node_modules/vscode/vscode.d.ts`
28+
29+
- you can open the full set of our API when you open the file `node_modules/vscode/vscode.d.ts`
2630

2731
## Run tests
28-
* open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Launch Tests`
29-
* press `F5` to run the tests in a new window with your extension loaded
30-
* see the output of the test result in the debug console
31-
* make changes to `test/extension.test.ts` or create new test files inside the `test` folder
32-
* by convention, the test runner will only consider files matching the name pattern `**.test.ts`
33-
* you can create folders inside the `test` folder to structure your tests any way you want
32+
33+
- open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Launch Tests`
34+
- press `F5` to run the tests in a new window with your extension loaded
35+
- see the output of the test result in the debug console
36+
- make changes to `test/extension.test.ts` or create new test files inside the `test` folder
37+
- by convention, the test runner will only consider files matching the name pattern `**.test.ts`
38+
- you can create folders inside the `test` folder to structure your tests any way you want

extensions/arabic/yarn.lock

-8
This file was deleted.

0 commit comments

Comments
 (0)