mirror of
https://github.com/Fabio286/antares.git
synced 2025-03-09 07:57:55 +01:00
build: typescript config
This commit is contained in:
parent
6cc098c6f0
commit
cbef7489b2
25
.eslintrc
25
.eslintrc
@ -6,15 +6,22 @@
|
|||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"standard",
|
"standard",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
"plugin:vue/recommended"
|
"plugin:vue/recommended"
|
||||||
],
|
],
|
||||||
|
"parser": "vue-eslint-parser",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"parser": "@babel/eslint-parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
"ecmaVersion": 9,
|
"ecmaVersion": 9,
|
||||||
"sourceType": "module",
|
"sourceType": "module",
|
||||||
"requireConfigFile": false
|
"requireConfigFile": false
|
||||||
},
|
},
|
||||||
|
"plugins": [
|
||||||
|
"@typescript-eslint"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"space-infix-ops": "off",
|
||||||
|
"object-curly-newline": "off",
|
||||||
"indent": [
|
"indent": [
|
||||||
"error",
|
"error",
|
||||||
3,
|
3,
|
||||||
@ -69,6 +76,20 @@
|
|||||||
"max": 1
|
"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": {
|
"devDependencies": {
|
||||||
"@babel/eslint-parser": "^7.15.7",
|
"@babel/eslint-parser": "^7.15.7",
|
||||||
"@babel/preset-env": "^7.15.8",
|
"@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",
|
"all-contributors-cli": "^6.20.0",
|
||||||
"babel-loader": "^8.2.3",
|
"babel-loader": "^8.2.3",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
@ -163,7 +169,10 @@
|
|||||||
"stylelint-config-standard": "^22.0.0",
|
"stylelint-config-standard": "^22.0.0",
|
||||||
"stylelint-scss": "^3.21.0",
|
"stylelint-scss": "^3.21.0",
|
||||||
"tree-kill": "^1.2.2",
|
"tree-kill": "^1.2.2",
|
||||||
|
"ts-loader": "^9.2.8",
|
||||||
|
"typescript": "^4.6.3",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
|
"vue-eslint-parser": "^8.3.0",
|
||||||
"vue-loader": "^15.9.8",
|
"vue-loader": "^15.9.8",
|
||||||
"vue-template-compiler": "^2.6.14",
|
"vue-template-compiler": "^2.6.14",
|
||||||
"webpack": "^5.60.0",
|
"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,
|
mode: process.env.NODE_ENV,
|
||||||
devtool: isDevMode ? 'eval-source-map' : false,
|
devtool: isDevMode ? 'eval-source-map' : false,
|
||||||
entry: {
|
entry: {
|
||||||
main: path.join(__dirname, './src/main/main.js')
|
main: path.join(__dirname, './src/main/main.ts')
|
||||||
},
|
},
|
||||||
target: 'electron-main',
|
target: 'electron-main',
|
||||||
output: {
|
output: {
|
||||||
@ -28,7 +28,7 @@ module.exports = { // Main
|
|||||||
},
|
},
|
||||||
externals: externals.filter((d) => !whiteListedModules.includes(d)),
|
externals: externals.filter((d) => !whiteListedModules.includes(d)),
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.js', '.json'],
|
extensions: ['.js', '.json', '.ts'],
|
||||||
alias: {
|
alias: {
|
||||||
src: path.join(__dirname, 'src/'),
|
src: path.join(__dirname, 'src/'),
|
||||||
common: path.resolve(__dirname, 'src/common')
|
common: path.resolve(__dirname, 'src/common')
|
||||||
@ -56,6 +56,11 @@ module.exports = { // Main
|
|||||||
name: '[path][name].[ext]'
|
name: '[path][name].[ext]'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
test: /\.ts$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
loader: 'ts-loader'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user