kibana/.eslintignore
Marco Liberati fb19e57a4e
[ES|QL] New @kbn/esql-services package (#179029)
## Summary

Closes https://github.com/elastic/kibana/issues/172649

This PR extracts the ES|QL service like "validation", "autocomplete",
"code_action" (quick fixes) and some other services into a separate
package `@kbn/esql-validation-autocomplete` which has no tie with Monaco
editor anymore.

All the AST and grammar logic has been encapsulated into a single
`@kbn/esql-ast` package who contains the `getAst` function together with
the `parser` and `lexer`.

## Validation enhancements

The validation API has been enhanced to gracefully degrade whenever
callbacks are not provided, via the `ignoreOnMissingCallback` option.
Tests are included as well for this scenario.

### Example plugin

An example plugin app has been developed to show to to use the
validation API

<img width="500" alt="Screenshot 2024-03-22 at 17 45 38"
src="ebc172d3-ee61-4f3a-9e42-dcb9b15c7e69">

The app starts with a missing callback:

<img width="855" alt="Screenshot 2024-03-22 at 17 36 22"
src="c9b81370-8a10-487d-b22f-2359e1365a54">

Toggling the ignore option will hide the index error due to the lack of
`getSources` callback:

<img width="816" alt="Screenshot 2024-03-22 at 17 28 17"
src="931f4e5f-3ad6-46f7-97ca-63d7bb66646b">

Warnings are shown as well when detected:

<img width="807" alt="Screenshot 2024-03-22 at 17 35 56"
src="5e3e0537-cba2-475f-946b-0302867384ca">

#### Code snippet

The example app produces a copyable code snippet of the current
configuration of the validator:

![Code
snippet](https://private-user-images.githubusercontent.com/924948/316838987-fd16da58-8790-40b2-851d-b92aca1811dc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTE0NTY0MzUsIm5iZiI6MTcxMTQ1NjEzNSwicGF0aCI6Ii85MjQ5NDgvMzE2ODM4OTg3LWZkMTZkYTU4LTg3OTAtNDBiMi04NTFkLWI5MmFjYTE4MTFkYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwMzI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDMyNlQxMjI4NTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00ZDhhOGRlMjZjMzZhN2NjNTdkYWMxYTNjOWVkNTA3NDk5NGViOTg2NWEzMTAyZGM4MGYyOTQ0YjQ2N2Q3ZDI1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.H-3r_B57NK1-rS8UbR_bxlNtAMQ0flFGtW0oTIiOlr0)

### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-03-27 14:39:48 +01:00

45 lines
1.1 KiB
Text

**/*.js.snap
__tmp__
/.es
/.chromium
/build
/built_assets
/config/apm.dev.js
/data
/html_docs
/optimize
/plugins
/test/fixtures/scenarios
/x-pack/build
node_modules
target
snapshots.js
!/.eslintrc.js
!.storybook
!.buildkite
# plugin overrides
/src/core/lib/kbn_internal_native_observable
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
/x-pack/plugins/canvas/canvas_plugin
/x-pack/plugins/canvas/shareable_runtime/build
/x-pack/plugins/canvas/storybook/build
/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/**
/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/server/lib/pdf/assets/**
/x-pack/plugins/cloud_integrations/cloud_full_story/server/assets/**
# package overrides
/packages/kbn-eslint-config
/packages/kbn-plugin-generator/template
/packages/kbn-generate/templates
/packages/kbn-pm/dist
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
/packages/kbn-ui-framework/dist
/packages/kbn-flot-charts/lib
/packages/kbn-monaco/src/**/antlr
/packages/kbn-esql-ast/src/**/antlr
# Bazel
/bazel-*