Fix eslint and fix linting issues
This commit is contained in:
parent
f2f34dd00f
commit
eb0364a2f7
@ -33,7 +33,10 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||||
"@typescript-eslint/parser": "^5.4.0",
|
"@typescript-eslint/parser": "^5.4.0",
|
||||||
"concurrently": "^6.0.0",
|
"concurrently": "^6.0.0",
|
||||||
"eslint": "^8.2.0",
|
"eslint": "^8.3.0",
|
||||||
|
"eslint-plugin-import": "^2.25.3",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
|
"eslint-plugin-svelte3": "^3.2.1",
|
||||||
"feather-icons": "^4.28.0",
|
"feather-icons": "^4.28.0",
|
||||||
"imagemin-gifsicle": "^7.0.0",
|
"imagemin-gifsicle": "^7.0.0",
|
||||||
"imagemin-mozjpeg": "^9.0.0",
|
"imagemin-mozjpeg": "^9.0.0",
|
||||||
@ -44,6 +47,7 @@
|
|||||||
"maildev": "^1.1.0",
|
"maildev": "^1.1.0",
|
||||||
"nodemon": "^2.0.3",
|
"nodemon": "^2.0.3",
|
||||||
"sass": "^1.32.12",
|
"sass": "^1.32.12",
|
||||||
|
"svelte": "^3.44.2",
|
||||||
"svgo": "^2.3.0",
|
"svgo": "^2.3.0",
|
||||||
"ts-jest": "^27.0.3",
|
"ts-jest": "^27.0.3",
|
||||||
"typescript": "^4.0.2"
|
"typescript": "^4.0.2"
|
||||||
|
35
src/App.ts
35
src/App.ts
@ -1,30 +1,31 @@
|
|||||||
import Application from "swaf/Application";
|
import Application from "swaf/Application";
|
||||||
import Migration, {MigrationType} from "swaf/db/Migration";
|
import AutoUpdateComponent from "swaf/components/AutoUpdateComponent";
|
||||||
import CreateMigrationsTable from "swaf/migrations/CreateMigrationsTable";
|
import CsrfProtectionComponent from "swaf/components/CsrfProtectionComponent";
|
||||||
import ExpressAppComponent from "swaf/components/ExpressAppComponent";
|
import ExpressAppComponent from "swaf/components/ExpressAppComponent";
|
||||||
import MysqlComponent from "swaf/components/MysqlComponent";
|
import FormHelperComponent from "swaf/components/FormHelperComponent";
|
||||||
|
import FrontendToolsComponent from "swaf/components/FrontendToolsComponent";
|
||||||
import LogRequestsComponent from "swaf/components/LogRequestsComponent";
|
import LogRequestsComponent from "swaf/components/LogRequestsComponent";
|
||||||
|
import MailComponent from "swaf/components/MailComponent";
|
||||||
|
import MaintenanceComponent from "swaf/components/MaintenanceComponent";
|
||||||
|
import MysqlComponent from "swaf/components/MysqlComponent";
|
||||||
|
import PreviousUrlComponent from "swaf/components/PreviousUrlComponent";
|
||||||
import RedisComponent from "swaf/components/RedisComponent";
|
import RedisComponent from "swaf/components/RedisComponent";
|
||||||
import ServeStaticDirectoryComponent from "swaf/components/ServeStaticDirectoryComponent";
|
import ServeStaticDirectoryComponent from "swaf/components/ServeStaticDirectoryComponent";
|
||||||
import MaintenanceComponent from "swaf/components/MaintenanceComponent";
|
|
||||||
import MailComponent from "swaf/components/MailComponent";
|
|
||||||
import SessionComponent from "swaf/components/SessionComponent";
|
import SessionComponent from "swaf/components/SessionComponent";
|
||||||
import FormHelperComponent from "swaf/components/FormHelperComponent";
|
|
||||||
import CsrfProtectionComponent from "swaf/components/CsrfProtectionComponent";
|
|
||||||
import WebSocketServerComponent from "swaf/components/WebSocketServerComponent";
|
import WebSocketServerComponent from "swaf/components/WebSocketServerComponent";
|
||||||
import HomeController from "./controllers/HomeController";
|
import Migration, {MigrationType} from "swaf/db/Migration";
|
||||||
import AutoUpdateComponent from "swaf/components/AutoUpdateComponent";
|
|
||||||
import DummyMigration from "swaf/migrations/DummyMigration";
|
|
||||||
import DropLegacyLogsTable from "swaf/migrations/DropLegacyLogsTable";
|
|
||||||
import PreviousUrlComponent from "swaf/components/PreviousUrlComponent";
|
|
||||||
import MailViewEngine from "swaf/frontend/MailViewEngine";
|
|
||||||
import AssetCompiler from "swaf/frontend/AssetCompiler";
|
import AssetCompiler from "swaf/frontend/AssetCompiler";
|
||||||
import FrontendToolsComponent from "swaf/components/FrontendToolsComponent";
|
|
||||||
import CopyAssetPreCompiler from "swaf/frontend/CopyAssetPreCompiler";
|
import CopyAssetPreCompiler from "swaf/frontend/CopyAssetPreCompiler";
|
||||||
import ScssAssetPreCompiler from "swaf/frontend/ScssAssetPreCompiler";
|
import MailViewEngine from "swaf/frontend/MailViewEngine";
|
||||||
import TypeScriptPreCompiler from "swaf/frontend/TypeScriptPreCompiler";
|
|
||||||
import SvelteViewEngine from "swaf/frontend/SvelteViewEngine";
|
|
||||||
import NunjucksViewEngine from "swaf/frontend/NunjucksViewEngine";
|
import NunjucksViewEngine from "swaf/frontend/NunjucksViewEngine";
|
||||||
|
import ScssAssetPreCompiler from "swaf/frontend/ScssAssetPreCompiler";
|
||||||
|
import SvelteViewEngine from "swaf/frontend/SvelteViewEngine";
|
||||||
|
import TypeScriptPreCompiler from "swaf/frontend/TypeScriptPreCompiler";
|
||||||
|
import CreateMigrationsTable from "swaf/migrations/CreateMigrationsTable";
|
||||||
|
import DropLegacyLogsTable from "swaf/migrations/DropLegacyLogsTable";
|
||||||
|
import DummyMigration from "swaf/migrations/DummyMigration";
|
||||||
|
|
||||||
|
import HomeController from "./controllers/HomeController.js";
|
||||||
|
|
||||||
export default class App extends Application {
|
export default class App extends Application {
|
||||||
public constructor(
|
public constructor(
|
||||||
|
@ -1 +1 @@
|
|||||||
console.log('common code between back and front');
|
console.log('common code between back and front');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Controller from "swaf/Controller";
|
|
||||||
import {Request, Response} from "express";
|
import {Request, Response} from "express";
|
||||||
import {route} from "swaf/common/Routing";
|
import {route} from "swaf/common/Routing";
|
||||||
|
import Controller from "swaf/Controller";
|
||||||
|
|
||||||
export default class HomeController extends Controller {
|
export default class HomeController extends Controller {
|
||||||
public routes(): void {
|
public routes(): void {
|
||||||
|
@ -6,10 +6,11 @@ process.env['NODE_CONFIG_DIR'] =
|
|||||||
+ delimiter
|
+ delimiter
|
||||||
+ (process.env['NODE_CONFIG_DIR'] || __dirname + '/../config/');
|
+ (process.env['NODE_CONFIG_DIR'] || __dirname + '/../config/');
|
||||||
|
|
||||||
import {logger} from "swaf/Logger";
|
|
||||||
import App from "./App";
|
|
||||||
import config from "config";
|
import config from "config";
|
||||||
import {promises as fs} from "fs";
|
import {promises as fs} from "fs";
|
||||||
|
import {logger} from "swaf/Logger";
|
||||||
|
|
||||||
|
import App from "./App.js";
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
logger.debug('Config path:', process.env['NODE_CONFIG_DIR']);
|
logger.debug('Config path:', process.env['NODE_CONFIG_DIR']);
|
||||||
|
Loading…
Reference in New Issue
Block a user