Skip to content

Commit 46077ed

Browse files
committed
refactor: move js -> ts folder & use bun
1 parent 8d83c4f commit 46077ed

Some content is hidden

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

84 files changed

+1320
-1219
lines changed

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ example/aircraft/PackageSources/SimObjects/Airplanes/Navigraph_Navigation_Data_I
1212
debug/
1313
target/
1414

15-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
16-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
17-
# Cargo.lock
18-
# Who put this here
19-
2015
# These are backup files generated by rustfmt
2116
**/*.rs.bk
2217

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"trailingComma": "all",
3+
"printWidth": 120,
4+
"singleQuote": false,
5+
"arrowParens": "avoid",
6+
"semi": true,
7+
"endOfLine": "auto"
8+
}

bun.lockb

167 KB
Binary file not shown.

eslint.config.mjs

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import globals from "globals";
2+
import pluginJs from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
import prettierlint from "eslint-plugin-prettier/recommended";
5+
6+
export default tseslint.config(
7+
{ ignores: ["**/dist/**", "rollup.config.mjs"] },
8+
{ languageOptions: { globals: globals.browser } },
9+
{
10+
rules: {
11+
...pluginJs.configs.recommended.rules,
12+
semi: "off",
13+
curly: ["warn", "multi-line"],
14+
quotes: ["warn", "double", { avoidEscape: true }],
15+
"no-console": ["warn", { allow: ["warn", "error", "time", "timeEnd", "info"] }],
16+
"max-depth": ["warn", 4],
17+
"no-spaced-func": "off",
18+
"no-shadow": "off",
19+
"no-unused-vars": [
20+
"warn",
21+
{
22+
vars: "all",
23+
varsIgnorePattern: "^_",
24+
args: "after-used",
25+
argsIgnorePattern: "^_",
26+
ignoreRestSiblings: true,
27+
destructuredArrayIgnorePattern: "^_",
28+
},
29+
],
30+
},
31+
},
32+
{
33+
files: ["**/*.{ts,tsx}"],
34+
extends: [tseslint.configs.recommendedTypeChecked, tseslint.configs.stylisticTypeChecked],
35+
languageOptions: { parser: tseslint.parser, parserOptions: { projectService: true } },
36+
rules: {
37+
"@typescript-eslint/no-shadow": "warn",
38+
"@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
39+
"@typescript-eslint/no-empty-function": ["error", { allow: ["arrowFunctions"] }],
40+
"@typescript-eslint/no-explicit-any": "error",
41+
"@typescript-eslint/no-unused-vars": [
42+
"warn",
43+
{
44+
vars: "all",
45+
varsIgnorePattern: "^_",
46+
args: "after-used",
47+
argsIgnorePattern: "^_",
48+
ignoreRestSiblings: true,
49+
destructuredArrayIgnorePattern: "^_",
50+
},
51+
],
52+
"@typescript-eslint/no-misused-promises": [
53+
"warn",
54+
{ checksConditionals: true, checksVoidReturn: false, checksSpreads: true },
55+
],
56+
},
57+
},
58+
{ extends: [prettierlint], rules: { "prettier/prettier": "warn" } },
59+
);

package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "msfs-navigation-data-interface",
3+
"workspaces": [
4+
"src/*",
5+
"example/*"
6+
],
7+
"scripts": {
8+
"lint": "bun run --filter \"*\" lint"
9+
},
10+
"devDependencies": {
11+
"@eslint/js": "^9.23.0",
12+
"@types/bun": "latest",
13+
"eslint": "^9.23.0",
14+
"eslint-config-prettier": "^10.1.1",
15+
"eslint-plugin-prettier": "^5.2.6",
16+
"globals": "^16.0.0",
17+
"prettier": "^3.5.3",
18+
"typescript-eslint": "^8.29.0"
19+
},
20+
"peerDependencies": {
21+
"typescript": "^5.0.0"
22+
}
23+
}

src/js/.eslintrc.js

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

src/js/index.ts

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

src/js/tsconfig.json

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

src/js/types/ProcedureLeg/AFLeg.ts

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

src/js/types/ProcedureLeg/CALeg.ts

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

0 commit comments

Comments
 (0)