Skip to content

Commit

Permalink
style(repo): format and lint all code
Browse files Browse the repository at this point in the history
  • Loading branch information
benpsnyder authored May 10, 2024
1 parent 5cf59ca commit b7c5686
Show file tree
Hide file tree
Showing 3,240 changed files with 20,318 additions and 49,241 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 2 additions & 5 deletions packages/server/.babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"presets": ["@babel/preset-env"],
"retainLines": true,
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-dynamic-import"
]
}
"plugins": ["@babel/plugin-transform-runtime", "@babel/plugin-syntax-dynamic-import"]
}
2 changes: 1 addition & 1 deletion packages/server/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"enabled": true,
"rules": {
"style": {
"useImportType": "error"
"useImportType": "off"
},
"correctness": {
"noUnusedImports": "error"
Expand Down
2 changes: 1 addition & 1 deletion packages/server/resources/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -637,4 +637,4 @@
"warehouse_transfer.view.draft.name": "مسودة",
"warehouse_transfer.view.in_transit.name": "في النقل",
"warehouse_transfer.view.transferred.name": "تم النقل"
}
}
8 changes: 3 additions & 5 deletions packages/server/resources/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"invoice.paper.conditions_title": "Conditions & terms",
"invoice.paper.notes_title": "Notes",
"invoice.paper.total": "Total",
"invoice.paper.subtotal": "Subtotal",
"invoice.paper.subtotal": "Subtotal",
"invoice.paper.payment_amount": "Payment Amount",
"invoice.paper.balance_due": "Balance Due",

Expand Down Expand Up @@ -367,7 +367,7 @@
"expense.field.payment_account": "Payment Account",
"expense.field.amount": "Amount",
"expense.field.currency_code": "Currency",
"expense.field.exchange_rate": "Exchange Rate",
"expense.field.exchange_rate": "Exchange Rate",
"expense.field.reference_no": "Reference No.",
"expense.field.description": "Description",
"expense.field.line_description": "Line Description",
Expand Down Expand Up @@ -440,8 +440,6 @@
"vendor.field.status.unpaid": "Unpaid",
"Invoice write-off": "Invoice write-off",



"transaction_type.credit_note": "Credit note",
"transaction_type.refund_credit_note": "Refund credit note",
"transaction_type.vendor_credit": "Vendor credit",
Expand Down Expand Up @@ -672,4 +670,4 @@
"warehouse_transfer.view.draft.name": "Draft",
"warehouse_transfer.view.in_transit.name": "In Transit",
"warehouse_transfer.view.transferred.name": "Transferred"
}
}
8 changes: 1 addition & 7 deletions packages/server/scripts/gulpConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,7 @@ module.exports = {
},

// Clean specific files.
clean: [
'**/.DS_Store',
'./assets/js/**/*.min.js',
'**/*.map',
'**/*.min.css',
'assets/js/hypernews.js',
],
clean: ['**/.DS_Store', './assets/js/**/*.min.js', '**/*.map', '**/*.min.css', 'assets/js/hypernews.js'],

// Watch related.
watch: {
Expand Down
5 changes: 1 addition & 4 deletions packages/server/scripts/gulpfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ const config = require('./gulpConfig');

gulp.task('styles', () => {
const builds = config.style.build.map((build) => {
return gulp
.src(build.src)
.pipe(gulpSass(config.style.sass))
.pipe(gulp.dest(build.dest));
return gulp.src(build.src).pipe(gulpSass(config.style.sass)).pipe(gulp.dest(build.dest));
});
return mergeStream(builds);
});
Expand Down
15 changes: 3 additions & 12 deletions packages/server/scripts/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ const ProgressBarPlugin = require('progress-bar-webpack-plugin');

const isDev = process.env.NODE_ENV === 'development';

exports.getCommonWebpackOptions = ({
inputEntry,
outputDir,
outputFilename,
}) => {
exports.getCommonWebpackOptions = ({ inputEntry, outputDir, outputFilename }) => {
const webpackOptions = {
entry: ['regenerator-runtime/runtime', inputEntry],
target: 'node',
Expand Down Expand Up @@ -41,10 +37,7 @@ exports.getCommonWebpackOptions = ({
},
plugins: [
// Ignore knex dynamic required dialects that we don't use
new NormalModuleReplacementPlugin(
/m[sy]sql2?|oracle(db)?|sqlite3|pg-(native|query)/,
'noop2'
),
new NormalModuleReplacementPlugin(/m[sy]sql2?|oracle(db)?|sqlite3|pg-(native|query)/, 'noop2'),
new ProgressBarPlugin(),
],
externals: [nodeExternals(), 'aws-sdk', 'prettier'],
Expand All @@ -71,9 +64,7 @@ exports.getCommonWebpackOptions = ({
};

if (isDev) {
webpackOptions.plugins.push(
new RunScriptWebpackPlugin({ name: outputFilename })
);
webpackOptions.plugins.push(new RunScriptWebpackPlugin({ name: outputFilename }));
}
return webpackOptions;
};
14 changes: 5 additions & 9 deletions packages/server/src/api/controllers/Account/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Router, Request, Response, NextFunction } from 'express';
import { Service, Inject } from 'typedi';
import BaseController from '@/api/controllers/BaseController';
import AuthenticatedAccount from '@/services/AuthenticatedAccount';
import TenancyMiddleware from '@/api/middleware/TenancyMiddleware';
import AttachCurrentTenantUser from '@/api/middleware/AttachCurrentTenantUser';
import TenancyMiddleware from '@/api/middleware/TenancyMiddleware';
import JWTAuth from '@/api/middleware/jwtAuth';
import AuthenticatedAccount from '@/services/AuthenticatedAccount';
import { NextFunction, Request, Response, Router } from 'express';
import { Inject, Service } from 'typedi';

@Service()
export default class AccountController extends BaseController {
Expand Down Expand Up @@ -34,11 +34,7 @@ export default class AccountController extends BaseController {
* @param {Response} res -
* @param {NextFunction} next -
*/
private getAccount = async (
req: Request,
res: Response,
next: NextFunction
) => {
private getAccount = async (req: Request, res: Response, next: NextFunction) => {
const { tenantId, user } = req;

try {
Expand Down
6 changes: 3 additions & 3 deletions packages/server/src/api/controllers/AccountTypes.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Service, Inject } from 'typedi';
import { Request, Response, Router, NextFunction } from 'express';
import asyncMiddleware from '@/api/middleware/asyncMiddleware';
import BaseController from '@/api/controllers/BaseController';
import asyncMiddleware from '@/api/middleware/asyncMiddleware';
import AccountsTypesService from '@/services/Accounts/AccountsTypesServices';
import { NextFunction, Request, Response, Router } from 'express';
import { Inject, Service } from 'typedi';

@Service()
export default class AccountsTypesController extends BaseController {
Expand Down
Loading

0 comments on commit b7c5686

Please sign in to comment.