Skip to content

Commit 1290433

Browse files
author
Akos Kitta
committed
chore: format resources 💄
Signed-off-by: Akos Kitta <[email protected]>
1 parent 27311b8 commit 1290433

Some content is hidden

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

42 files changed

+1120
-968
lines changed

.eslintrc.js

+61-61
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
11
module.exports = {
2-
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
3-
parserOptions: {
4-
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
5-
sourceType: 'module', // Allows for the use of imports
6-
ecmaFeatures: {
7-
jsx: true, // Allows for the parsing of JSX
8-
},
2+
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
3+
parserOptions: {
4+
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
5+
sourceType: 'module', // Allows for the use of imports
6+
ecmaFeatures: {
7+
jsx: true, // Allows for the parsing of JSX
98
},
10-
ignorePatterns: [
11-
'node_modules/*',
12-
'**/node_modules/*',
13-
'.node_modules/*',
14-
'.github/*',
15-
'.browser_modules/*',
16-
'docs/*',
17-
'scripts/*',
18-
'electron-app/lib/*',
19-
'electron-app/src-gen/*',
20-
'electron-app/gen-webpack*.js',
21-
'!electron-app/webpack.config.js',
22-
'plugins/*',
23-
'arduino-ide-extension/src/node/cli-protocol',
24-
],
25-
settings: {
26-
react: {
27-
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
28-
},
9+
},
10+
ignorePatterns: [
11+
'node_modules/*',
12+
'**/node_modules/*',
13+
'.node_modules/*',
14+
'.github/*',
15+
'.browser_modules/*',
16+
'docs/*',
17+
'scripts/*',
18+
'electron-app/lib/*',
19+
'electron-app/src-gen/*',
20+
'electron-app/gen-webpack*.js',
21+
'!electron-app/webpack.config.js',
22+
'plugins/*',
23+
'arduino-ide-extension/src/node/cli-protocol',
24+
],
25+
settings: {
26+
react: {
27+
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
2928
},
30-
extends: [
31-
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
32-
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
33-
'plugin:react-hooks/recommended', // Uses recommended rules from react hooks
34-
'plugin:prettier/recommended',
35-
'prettier', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
29+
},
30+
extends: [
31+
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
32+
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
33+
'plugin:react-hooks/recommended', // Uses recommended rules from react hooks
34+
'plugin:prettier/recommended',
35+
'prettier', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
36+
],
37+
plugins: ['prettier', 'unused-imports'],
38+
rules: {
39+
'@typescript-eslint/no-unused-expressions': 'off',
40+
'@typescript-eslint/no-namespace': 'off',
41+
'@typescript-eslint/no-var-requires': 'off',
42+
'@typescript-eslint/no-empty-function': 'warn',
43+
'@typescript-eslint/no-empty-interface': 'warn',
44+
'no-unused-vars': 'off',
45+
'unused-imports/no-unused-imports': 'error',
46+
'unused-imports/no-unused-vars': [
47+
'warn',
48+
{
49+
vars: 'all',
50+
varsIgnorePattern: '^_',
51+
args: 'after-used',
52+
argsIgnorePattern: '^_',
53+
},
3654
],
37-
plugins: ['prettier', 'unused-imports'],
38-
rules: {
39-
'@typescript-eslint/no-unused-expressions': 'off',
40-
'@typescript-eslint/no-namespace': 'off',
41-
'@typescript-eslint/no-var-requires': 'off',
42-
'@typescript-eslint/no-empty-function': 'warn',
43-
'@typescript-eslint/no-empty-interface': 'warn',
44-
'no-unused-vars': 'off',
45-
'unused-imports/no-unused-imports': 'error',
46-
'unused-imports/no-unused-vars': [
47-
'warn',
48-
{
49-
vars: 'all',
50-
varsIgnorePattern: '^_',
51-
args: 'after-used',
52-
argsIgnorePattern: '^_',
53-
},
54-
],
55-
'react/display-name': 'warn',
56-
eqeqeq: ['error', 'smart'],
57-
'guard-for-in': 'off',
58-
'id-blacklist': 'off',
59-
'id-match': 'off',
60-
'no-underscore-dangle': 'off',
61-
'no-unused-expressions': 'off',
62-
'no-var': 'error',
63-
radix: 'error',
64-
'prettier/prettier': 'warn',
65-
},
55+
'react/display-name': 'warn',
56+
eqeqeq: ['error', 'smart'],
57+
'guard-for-in': 'off',
58+
'id-blacklist': 'off',
59+
'id-match': 'off',
60+
'no-underscore-dangle': 'off',
61+
'no-unused-expressions': 'off',
62+
'no-var': 'error',
63+
radix: 'error',
64+
'prettier/prettier': 'warn',
65+
},
6666
};

.vscode/launch.json

+6-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"name": "App",
88
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
99
"windows": {
10-
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd",
10+
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
1111
},
1212
"cwd": "${workspaceFolder}/electron-app",
1313
"args": [
@@ -19,7 +19,7 @@
1919
"--no-app-auto-install",
2020
"--plugins=local-dir:./plugins",
2121
"--hosted-plugin-inspect=9339",
22-
"--no-ping-timeout",
22+
"--no-ping-timeout"
2323
],
2424
"env": {
2525
"NODE_ENV": "development"
@@ -42,7 +42,7 @@
4242
"name": "App [Dev]",
4343
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
4444
"windows": {
45-
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd",
45+
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
4646
},
4747
"cwd": "${workspaceFolder}/electron-app",
4848
"args": [
@@ -56,7 +56,7 @@
5656
"--hosted-plugin-inspect=9339",
5757
"--content-trace",
5858
"--open-devtools",
59-
"--no-ping-timeout",
59+
"--no-ping-timeout"
6060
],
6161
"env": {
6262
"NODE_ENV": "development"
@@ -115,15 +115,12 @@
115115
"request": "attach",
116116
"name": "Attach by Process ID",
117117
"processId": "${command:PickProcess}"
118-
},
118+
}
119119
],
120120
"compounds": [
121121
{
122122
"name": "Launch Electron Backend & Frontend",
123-
"configurations": [
124-
"App",
125-
"Attach to Electron Frontend"
126-
]
123+
"configurations": ["App", "Attach to Electron Frontend"]
127124
}
128125
]
129126
}

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"typescript.tsdk": "node_modules/typescript/lib",
99
"editor.codeActionsOnSave": {
1010
"source.fixAll.eslint": true
11-
},
11+
}
1212
}

.vscode/tasks.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@
3737
{
3838
"label": "Watch All",
3939
"type": "shell",
40-
"dependsOn": [
41-
"Watch Extension",
42-
"Watch App"
43-
]
40+
"dependsOn": ["Watch Extension", "Watch App"]
4441
}
4542
]
4643
}

arduino-ide-extension/README.md

+14-10
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@ The Config Service knows about your system, like for example the default sketch
5555
- checking whether a file is in a data or sketch directory
5656

5757
### `"arduino"` configuration in the `package.json`:
58-
- `"cli"`:
59-
- `"version"` type `string` | `{ owner: string, repo: string, commitish?: string }`: if the type is a `string` and is a valid semver, it will get the corresponding [released](https://github.com/arduino/arduino-cli/releases) CLI. If the type is `string` and is a [date in `YYYYMMDD`](https://arduino.github.io/arduino-cli/latest/installation/#nightly-builds) format, it will get a nightly CLI. If the type is an object, a CLI, build from the sources in the `owner/repo` will be used. If `commitish` is not defined, the HEAD of the default branch will be used. In any other cases an error is thrown.
58+
59+
- `"cli"`:
60+
- `"version"` type `string` | `{ owner: string, repo: string, commitish?: string }`: if the type is a `string` and is a valid semver, it will get the corresponding [released](https://github.com/arduino/arduino-cli/releases) CLI. If the type is `string` and is a [date in `YYYYMMDD`](https://arduino.github.io/arduino-cli/latest/installation/#nightly-builds) format, it will get a nightly CLI. If the type is an object, a CLI, build from the sources in the `owner/repo` will be used. If `commitish` is not defined, the HEAD of the default branch will be used. In any other cases an error is thrown.
6061

6162
#### Rebuild gRPC protocol interfaces
62-
- Some CLI updates can bring changes to the gRPC interfaces, as the API might change. gRPC interfaces can be updated running the command
63-
`yarn --cwd arduino-ide-extension generate-protocol`
63+
64+
- Some CLI updates can bring changes to the gRPC interfaces, as the API might change. gRPC interfaces can be updated running the command
65+
`yarn --cwd arduino-ide-extension generate-protocol`
6466

6567
### Update **clangd** and **ClangFormat**
6668

@@ -72,11 +74,13 @@ The [**clangd** C++ language server](https://clangd.llvm.org/) and the [**ClangF
7274
1. Submit a pull request in [the `arduino/tooling-project-assets` repository](https://github.com/arduino/tooling-project-assets) to update the version in the `vars.DEFAULT_CLANG_FORMAT_VERSION` field of [`Taskfile.yml`](https://github.com/arduino/tooling-project-assets/blob/main/Taskfile.yml).
7375

7476
### Customize Icons
77+
7578
ArduinoIde uses a customized version of FontAwesome.
7679
In order to update/replace icons follow the following steps:
77-
- import the file `arduino-icons.json` in [Icomoon](https://icomoon.io/app/#/projects)
78-
- load it
79-
- edit the icons as needed
80-
- !! download the **new** `arduino-icons.json` file and put it in this repo
81-
- Click on "Generate Font" in Icomoon, then download
82-
- place the updated fonts in the `src/style/fonts` directory
80+
81+
- import the file `arduino-icons.json` in [Icomoon](https://icomoon.io/app/#/projects)
82+
- load it
83+
- edit the icons as needed
84+
- !! download the **new** `arduino-icons.json` file and put it in this repo
85+
- Click on "Generate Font" in Icomoon, then download
86+
- place the updated fonts in the `src/style/fonts` directory

arduino-ide-extension/src/browser/arduino-preferences.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ type StrictPreferenceSchemaProperties<T extends object> = {
5858
[p in keyof T]: PreferenceSchemaProperty;
5959
};
6060
type ArduinoPreferenceSchemaProperties =
61-
StrictPreferenceSchemaProperties<ArduinoConfiguration> & { 'arduino.window.zoomLevel': PreferenceSchemaProperty };
61+
StrictPreferenceSchemaProperties<ArduinoConfiguration> & {
62+
'arduino.window.zoomLevel': PreferenceSchemaProperty;
63+
};
6264

6365
const properties: ArduinoPreferenceSchemaProperties = {
6466
'arduino.language.log': {

arduino-ide-extension/src/browser/contributions/upload-firmware.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ export namespace UploadFirmware {
4545
export namespace Commands {
4646
export const OPEN: Command = {
4747
id: 'arduino-upload-firmware-open',
48-
label: nls.localize(
49-
'arduino/firmware/updater',
50-
'Firmware Updater'
51-
),
48+
label: nls.localize('arduino/firmware/updater', 'Firmware Updater'),
5249
category: 'Arduino',
5350
};
5451
}

arduino-ide-extension/src/browser/style/arduino-select.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
.arduino-select__control.arduino-select__control--menu-is-open {
3939
border: 1px solid !important;
4040
border-color: var(--theia-focusBorder) !important;
41-
border-bottom-color: var(--theia-sideBar-background) !important; /* if the bottom border color has the same color as the background of the control, we make the border "invisible" */
41+
border-bottom-color: var(
42+
--theia-sideBar-background
43+
) !important; /* if the bottom border color has the same color as the background of the control, we make the border "invisible" */
4244
}
4345

4446
.arduino-select__value-container .arduino-select__single-value {

0 commit comments

Comments
 (0)