Update dev configs

This commit is contained in:
Platinum 2024-08-05 20:35:09 +10:00
parent fabf3badb7
commit b86b6c6f5e
3 changed files with 26 additions and 32 deletions

View File

@ -1,9 +1,10 @@
# Exclude these folders from linting # Exclude these folders from linting
node_modules **/node_modules
dist/ /tmp
types/ /dist
/types
# Exclude these filetypes from linting # Exclude these filetypes from linting
*.json *.json
*.txt *.txt
*.exe *.exe

View File

@ -1,9 +1,7 @@
{ {
"root": true, "root": true,
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"plugins": [ "plugins": ["@typescript-eslint"],
"@typescript-eslint"
],
"extends": [ "extends": [
"eslint:recommended", "eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/eslint-recommended",
@ -17,10 +15,7 @@
"@typescript-eslint/comma-dangle": 1, "@typescript-eslint/comma-dangle": 1,
"@typescript-eslint/func-call-spacing": 2, "@typescript-eslint/func-call-spacing": 2,
"@typescript-eslint/quotes": 1, "@typescript-eslint/quotes": 1,
"@typescript-eslint/brace-style": [ "@typescript-eslint/brace-style": ["warn", "1tbs"],
"warn",
"1tbs"
],
"@typescript-eslint/naming-convention": [ "@typescript-eslint/naming-convention": [
"warn", "warn",
{ {
@ -47,13 +42,10 @@
"format": ["UPPER_CASE"] "format": ["UPPER_CASE"]
} }
], ],
"@typescript-eslint/indent": [ "@typescript-eslint/indent": ["warn", 2],
"warn",
2
],
"@typescript-eslint/no-unused-expressions": [ "@typescript-eslint/no-unused-expressions": [
"warn", "warn",
{ {
"allowShortCircuit": false, "allowShortCircuit": false,
"allowTernary": false "allowTernary": false
} }
@ -71,5 +63,13 @@
"allowArgumentsExplicitlyTypedAsAny": true "allowArgumentsExplicitlyTypedAsAny": true
} }
] ]
} },
} "overrides": [
{
"files": ["*.mjs", "*.ts"],
"env": {
"node": true
}
}
]
}

View File

@ -1,25 +1,18 @@
{ {
"compilerOptions": { "compilerOptions": {
"allowJs": true, "allowJs": true,
"module": "CommonJS", "module": "NodeNext",
"target": "es2020", "target": "ES2022",
"moduleResolution": "node", "moduleResolution": "NodeNext",
"esModuleInterop": true, "esModuleInterop": true,
"downlevelIteration": true, "downlevelIteration": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"outDir": "tmp", "outDir": "tmp",
"baseUrl": ".",
"paths": { "paths": {
"@spt-aki/*": ["./types/*"] "@spt/*": ["./types/*"],
} },
}, },
"lib": [ "exclude": ["node_modules", "dist", "tmp"],
"es2020" }
],
"include": [
"src/*",
"src/**/*"
]
}