Disallow importing Joi client side (#55018)

* Disallow importing Joi client side

* Move elasticsearch lib into server folder

* Add a comment about the 'joi' eslint rule

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Jean-Louis Leysens 2020-01-24 15:38:44 +01:00 committed by GitHub
parent b8f774866c
commit f7c53b5690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 7 additions and 5 deletions

View file

@ -262,6 +262,8 @@ module.exports = {
'src/core/server/**/*',
'(src|x-pack)/plugins/*/server/**/*',
'examples/**/server/**/*',
// TODO: Remove the 'joi' eslint rule once IE11 support is dropped
'joi',
],
errorMessage:
'Server modules cannot be imported into client modules or shared modules.',

View file

@ -17,10 +17,10 @@
* under the License.
*/
import { first } from 'rxjs/operators';
import healthCheck from './lib/health_check';
import { Cluster } from './lib/cluster';
import { createProxy } from './lib/create_proxy';
import { handleESError } from './lib/handle_es_error';
import healthCheck from './server/lib/health_check';
import { Cluster } from './server/lib/cluster';
import { createProxy } from './server/lib/create_proxy';
import { handleESError } from './server/lib/handle_es_error';
export default function(kibana) {
let defaultVars;

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { version as kibanaVersion } from '../../../../../package.json';
import { version as kibanaVersion } from '../../../../../../package.json';
export default {
// Make the version stubbable to improve testability.