-
-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Codify lodash usage in eslint (#1270)
Signed-off-by: Jan Potoms <2109932+Janpot@users.noreply.github.com>
- Loading branch information
Showing
10 changed files
with
48 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
import * as _ from 'lodash-es'; | ||
import postgres from './postgres/client'; | ||
import mysql from './mysql/client'; | ||
import rest from './rest/client'; | ||
import { ClientDataSource } from '../types'; | ||
import googleSheets from './googleSheets/client'; | ||
import local from './local/client'; | ||
import { PRODUCTION_DATASOURCES } from '../constants'; | ||
|
||
type ClientDataSources = { [key: string]: ClientDataSource<any, any> | undefined }; | ||
|
||
export const allClientDataSources: ClientDataSources = { | ||
const dataSources: ClientDataSources = { | ||
rest, | ||
postgres, | ||
googleSheets, | ||
mysql, | ||
local, | ||
}; | ||
|
||
const clientDataSources = _.pick(allClientDataSources, [...PRODUCTION_DATASOURCES]); | ||
|
||
export default clientDataSources; | ||
export default dataSources; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,18 @@ | ||
import * as _ from 'lodash-es'; | ||
import { ServerDataSource } from '../types'; | ||
import postgres from './postgres/server'; | ||
import mysql from './mysql/server'; | ||
import rest from './rest/server'; | ||
import googleSheets from './googleSheets/server'; | ||
import local from './local/server'; | ||
|
||
import { PRODUCTION_DATASOURCES } from '../constants'; | ||
|
||
type ServerDataSources = { [key: string]: ServerDataSource<any, any, any> | undefined }; | ||
|
||
const serverDataSources: ServerDataSources = _.pick( | ||
{ | ||
rest, | ||
postgres, | ||
googleSheets, | ||
mysql, | ||
local, | ||
}, | ||
[...PRODUCTION_DATASOURCES], | ||
); | ||
const dataSources: ServerDataSources = { | ||
rest, | ||
postgres, | ||
googleSheets, | ||
mysql, | ||
local, | ||
}; | ||
|
||
export default serverDataSources; | ||
export default dataSources; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters