Skip to content

Commit 0c9c689

Browse files
committed
fix(extension): adjust macos path for libraries
Apparently the completely default path given for mac, by vscode itself, is wrong - because reasons. No idea if this works as always, but time will tell. Other changes are just formatting and linting.
1 parent 13729f5 commit 0c9c689

15 files changed

Lines changed: 378 additions & 299 deletions

.eslintrc.json

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

.vscode/launch.json

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,26 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Run Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}"
14-
],
15-
"outFiles": [
16-
"${workspaceFolder}/dist/**/*.js"
17-
],
18-
"preLaunchTask": "${defaultBuildTask}"
19-
},
20-
{
21-
"name": "Extension Tests",
22-
"type": "extensionHost",
23-
"request": "launch",
24-
"args": [
25-
"--extensionDevelopmentPath=${workspaceFolder}",
26-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
27-
],
28-
"outFiles": [
29-
"${workspaceFolder}/out/**/*.js",
30-
"${workspaceFolder}/dist/**/*.js"
31-
],
32-
"preLaunchTask": "tasks: watch-tests"
33-
}
34-
]
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
13+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
14+
"preLaunchTask": "${defaultBuildTask}"
15+
},
16+
{
17+
"name": "Extension Tests",
18+
"type": "extensionHost",
19+
"request": "launch",
20+
"args": [
21+
"--extensionDevelopmentPath=${workspaceFolder}",
22+
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
23+
],
24+
"outFiles": ["${workspaceFolder}/out/**/*.js", "${workspaceFolder}/dist/**/*.js"],
25+
"preLaunchTask": "tasks: watch-tests"
26+
}
27+
]
3528
}

.vscode/settings.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Place your settings in this file to overwrite default and user settings.
22
{
3-
"files.exclude": {
4-
"out": false, // set this to true to hide the "out" folder with the compiled JS files
5-
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
6-
},
7-
"search.exclude": {
8-
"out": true, // set this to false to include "out" folder in search results
9-
"dist": true // set this to false to include "dist" folder in search results
10-
},
11-
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
12-
"typescript.tsc.autoDetect": "off"
13-
}
3+
"files.exclude": {
4+
"out": false, // set this to true to hide the "out" folder with the compiled JS files
5+
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
6+
},
7+
"search.exclude": {
8+
"out": true, // set this to false to include "out" folder in search results
9+
"dist": true // set this to false to include "dist" folder in search results
10+
},
11+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
12+
"typescript.tsc.autoDetect": "off"
13+
}

.vscode/tasks.json

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,37 @@
11
// See https://go.microsoft.com/fwlink/?LinkId=733558
22
// for the documentation about the tasks.json format
33
{
4-
"version": "2.0.0",
5-
"tasks": [
6-
{
7-
"type": "npm",
8-
"script": "watch",
9-
"problemMatcher": "$ts-webpack-watch",
10-
"isBackground": true,
11-
"presentation": {
12-
"reveal": "never",
13-
"group": "watchers"
14-
},
15-
"group": {
16-
"kind": "build",
17-
"isDefault": true
18-
}
19-
},
20-
{
21-
"type": "npm",
22-
"script": "watch-tests",
23-
"problemMatcher": "$tsc-watch",
24-
"isBackground": true,
25-
"presentation": {
26-
"reveal": "never",
27-
"group": "watchers"
28-
},
29-
"group": "build"
30-
},
31-
{
32-
"label": "tasks: watch-tests",
33-
"dependsOn": [
34-
"npm: watch",
35-
"npm: watch-tests"
36-
],
37-
"problemMatcher": []
38-
}
39-
]
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": "$ts-webpack-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never",
13+
"group": "watchers"
14+
},
15+
"group": {
16+
"kind": "build",
17+
"isDefault": true
18+
}
19+
},
20+
{
21+
"type": "npm",
22+
"script": "watch-tests",
23+
"problemMatcher": "$tsc-watch",
24+
"isBackground": true,
25+
"presentation": {
26+
"reveal": "never",
27+
"group": "watchers"
28+
},
29+
"group": "build"
30+
},
31+
{
32+
"label": "tasks: watch-tests",
33+
"dependsOn": ["npm: watch", "npm: watch-tests"],
34+
"problemMatcher": []
35+
}
36+
]
4037
}

biome.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"files": {
3+
"include": ["./src/*.ts"]
4+
},
5+
"linter": {
6+
"enabled": true,
7+
"rules": {
8+
"suspicious": {
9+
"noConfusingLabels": "off",
10+
"noAssignInExpressions": "off",
11+
"noExplicitAny": "off",
12+
"noFallthroughSwitchClause": "off"
13+
},
14+
"correctness": {
15+
"noUnusedLabels": "off",
16+
"noVoidTypeReturn": "off"
17+
},
18+
"style": {
19+
"useEnumInitializers": "off",
20+
"noNonNullAssertion": "off",
21+
"noParameterAssign": "off",
22+
"noArguments": "off",
23+
"noInferrableTypes": "off",
24+
"useConst": "off",
25+
"noUnusedTemplateLiteral": {
26+
"fix": "safe"
27+
}
28+
},
29+
"performance": {
30+
"noDelete": "off"
31+
},
32+
"complexity": {
33+
"noForEach": "off",
34+
"noUselessConstructor": "off",
35+
"noBannedTypes": "off"
36+
}
37+
}
38+
},
39+
"formatter": {
40+
"enabled": true,
41+
"formatWithErrors": false,
42+
"ignore": [],
43+
"attributePosition": "auto",
44+
"indentStyle": "space",
45+
"indentWidth": 2,
46+
"lineWidth": 80,
47+
"lineEnding": "lf"
48+
},
49+
"javascript": {
50+
"formatter": {
51+
"arrowParentheses": "always",
52+
"bracketSameLine": false,
53+
"bracketSpacing": true,
54+
"jsxQuoteStyle": "single",
55+
"quoteProperties": "asNeeded",
56+
"quoteStyle": "single",
57+
"semicolons": "always",
58+
"trailingCommas": "all"
59+
}
60+
},
61+
"json": {
62+
"formatter": {
63+
"trailingCommas": "none"
64+
}
65+
}
66+
}

package.json

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
"engines": {
1313
"vscode": "^1.71.0"
1414
},
15-
"categories": [
16-
"Linters",
17-
"Programming Languages"
18-
],
15+
"categories": ["Linters", "Programming Languages"],
1916
"contributes": {
2017
"commands": [
2118
{
@@ -34,24 +31,14 @@
3431
"properties": {
3532
"cfxlua.game": {
3633
"default": "gtav",
37-
"enum": [
38-
"gtav",
39-
"rdr3"
40-
]
34+
"enum": ["gtav", "rdr3"]
4135
}
4236
}
4337
}
4438
},
45-
"keywords": [
46-
"Lua",
47-
"FiveM",
48-
"RedM",
49-
"IntelliSense"
50-
],
39+
"keywords": ["Lua", "FiveM", "RedM", "IntelliSense"],
5140
"icon": "logo.png",
52-
"activationEvents": [
53-
"onLanguage:lua"
54-
],
41+
"activationEvents": ["onLanguage:lua"],
5542
"main": "./dist/extension.js",
5643
"scripts": {
5744
"vscode:prepublish": "yarn run package",
@@ -60,11 +47,13 @@
6047
"package": "webpack --mode production --devtool hidden-source-map",
6148
"compile-tests": "tsc -p . --outDir out",
6249
"watch-tests": "tsc -p . -w --outDir out",
63-
"pretest": "yarn run compile-tests && yarn run compile && yarn run lint",
64-
"lint": "eslint src --ext ts",
65-
"test": "node ./out/test/runTest.js"
50+
"pretest": "yarn run compile-tests && yarn run compile && yarn run lint && yarn run format",
51+
"test": "node ./out/test/runTest.js",
52+
"format": "pnpm biome format --write",
53+
"lint": "pnpm biome lint --write"
6654
},
6755
"devDependencies": {
56+
"@biomejs/biome": "^1.9.4",
6857
"@types/vscode": "^1.71.0",
6958
"@types/glob": "^7.2.0",
7059
"@types/mocha": "^9.1.1",
@@ -80,7 +69,5 @@
8069
"webpack-cli": "^4.10.0",
8170
"@vscode/test-electron": "^2.1.5"
8271
},
83-
"extensionDependencies": [
84-
"sumneko.lua"
85-
]
72+
"extensionDependencies": ["sumneko.lua"]
8673
}

0 commit comments

Comments
 (0)