Skip to content

Commit

Permalink
Apply correct indentation and semicolons for code consistency
Browse files Browse the repository at this point in the history
The commit rectifies inconsistent semicolons usage and ensures proper indentation for the code in several files. This would help in maintaining code readability and clarity, as well as follows the general programming best practices.
  • Loading branch information
AhmedElywa committed May 30, 2024
1 parent 8b31107 commit 28ae735
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions packages/admin/src/PrismaTable/Form/useActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export const getValueByType = ({ value, field, useSet = true }: GetValueOptions)
const result = ['BigInt', 'Int'].includes(field.type)
? parseInt(value)
: ['Float', 'Decimal'].includes(field.type)
? parseFloat(value)
: value;
? parseFloat(value)
: value;
return !useSet ? result : { set: result };
}
};
Expand Down
4 changes: 2 additions & 2 deletions packages/admin/src/PrismaTable/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ export const Table: React.FC<TableProps> = ({
index === 0
? 'rtl:rounded-r-md ltr:rounded-l-md'
: index === pageSizeOptions.length - 1
? 'rtl:rounded-l-md ltr:rounded-r-md'
: '',
? 'rtl:rounded-l-md ltr:rounded-r-md'
: '',
item === pageSize
? 'bg-blue-500 text-white hover:bg-blue-700'
: 'bg-white text-gray-700 hover:bg-gray-100',
Expand Down
12 changes: 6 additions & 6 deletions packages/cli/bin/dev
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/usr/bin/env node

const oclif = require('@oclif/core')
const oclif = require('@oclif/core');

const path = require('path')
const project = path.join(__dirname, '..', 'tsconfig.json')
const path = require('path');
const project = path.join(__dirname, '..', 'tsconfig.json');

// In dev mode -> use ts-node and dev plugins
process.env.NODE_ENV = 'development'
process.env.NODE_ENV = 'development';

require('ts-node').register({project})
require('ts-node').register({ project });

// In dev mode, always show stack traces
oclif.settings.debug = true;

// Start the CLI
oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
oclif.run().then(oclif.flush).catch(oclif.Errors.handle);
4 changes: 2 additions & 2 deletions packages/cli/bin/run
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

const oclif = require('@oclif/core')
const oclif = require('@oclif/core');

oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))
oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'));
9 changes: 6 additions & 3 deletions packages/create/src/utils/fetch-latest-version-for.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { getLatestVersion } from './get-latest-version';
import { Fallbackable } from './fallbackable';

function fromEntries<K extends number | string, V>(entries: [K, V][]): Record<K, V> {
return entries.reduce<Record<K, V>>((result, [key, value]) => {
return Object.assign({}, result, { [key]: value });
}, {} as Record<K, V>);
return entries.reduce<Record<K, V>>(
(result, [key, value]) => {
return Object.assign({}, result, { [key]: value });
},
{} as Record<K, V>,
);
}

export const fetchLatestVersionsFor = async <T extends Record<string, string>>(
Expand Down

0 comments on commit 28ae735

Please sign in to comment.