mirror of
https://github.com/Fabio286/antares.git
synced 2025-01-23 06:03:57 +01:00
build: typescript config
This commit is contained in:
parent
96d6913a7a
commit
3975359292
25
.eslintrc
25
.eslintrc
@ -6,15 +6,22 @@
|
||||
},
|
||||
"extends": [
|
||||
"standard",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:vue/recommended"
|
||||
],
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser",
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"ecmaVersion": 9,
|
||||
"sourceType": "module",
|
||||
"requireConfigFile": false
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"space-infix-ops": "off",
|
||||
"object-curly-newline": "off",
|
||||
"indent": [
|
||||
"error",
|
||||
3,
|
||||
@ -69,6 +76,20 @@
|
||||
"max": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"@typescript-eslint/member-delimiter-style": [
|
||||
"warn",
|
||||
{
|
||||
"multiline": {
|
||||
"delimiter": "semi",
|
||||
"requireLast": true
|
||||
},
|
||||
"singleline": {
|
||||
"delimiter": "semi",
|
||||
"requireLast": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-var-requires": "off"
|
||||
}
|
||||
}
|
@ -134,6 +134,12 @@
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "^7.15.7",
|
||||
"@babel/preset-env": "^7.15.8",
|
||||
"@babel/preset-typescript": "^7.16.7",
|
||||
"@types/better-sqlite3": "^7.5.0",
|
||||
"@types/node": "^17.0.23",
|
||||
"@types/pg": "^8.6.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
||||
"@typescript-eslint/parser": "^5.18.0",
|
||||
"all-contributors-cli": "^6.20.0",
|
||||
"babel-loader": "^8.2.3",
|
||||
"chalk": "^4.1.2",
|
||||
@ -163,7 +169,10 @@
|
||||
"stylelint-config-standard": "^22.0.0",
|
||||
"stylelint-scss": "^3.21.0",
|
||||
"tree-kill": "^1.2.2",
|
||||
"ts-loader": "^9.2.8",
|
||||
"typescript": "^4.6.3",
|
||||
"vue": "^2.6.14",
|
||||
"vue-eslint-parser": "^8.3.0",
|
||||
"vue-loader": "^15.9.8",
|
||||
"vue-template-compiler": "^2.6.14",
|
||||
"webpack": "^5.60.0",
|
||||
|
19
tsconfig.json
Normal file
19
tsconfig.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"include": ["./src/main/**/*", "src/common/interfaces/antares.ts"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"target": "es2021",
|
||||
"allowJs": true,
|
||||
"moduleResolution": "node12",
|
||||
"noImplicitAny": true,
|
||||
"types": [
|
||||
"node"
|
||||
],
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"resolveJsonModule": true,
|
||||
"removeComments": true,
|
||||
"paths": {
|
||||
"common/*": ["./src/common/*"]
|
||||
}
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@ module.exports = { // Main
|
||||
mode: process.env.NODE_ENV,
|
||||
devtool: isDevMode ? 'eval-source-map' : false,
|
||||
entry: {
|
||||
main: path.join(__dirname, './src/main/main.js')
|
||||
main: path.join(__dirname, './src/main/main.ts')
|
||||
},
|
||||
target: 'electron-main',
|
||||
output: {
|
||||
@ -28,7 +28,7 @@ module.exports = { // Main
|
||||
},
|
||||
externals: externals.filter((d) => !whiteListedModules.includes(d)),
|
||||
resolve: {
|
||||
extensions: ['.js', '.json'],
|
||||
extensions: ['.js', '.json', '.ts'],
|
||||
alias: {
|
||||
src: path.join(__dirname, 'src/'),
|
||||
common: path.resolve(__dirname, 'src/common')
|
||||
@ -56,6 +56,11 @@ module.exports = { // Main
|
||||
name: '[path][name].[ext]'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'ts-loader'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
|
Loading…
Reference in New Issue
Block a user