kibana/packages/kbn-eslint-plugin-eslint
Kurt 901f9c85e0
[7.17] Changing load/dump in source files (#190641) (#190992)
# Backport

This will backport the following commits from `main` to `7.17`:
- [Changing load/dump in source files
(#190641)](https://github.com/elastic/kibana/pull/190641)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Kurt","email":"kc13greiner@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-08-21T11:29:36Z","message":"Changing
load/dump in source files (#190641)\n\n## Summary\r\n\r\nUpdates usage
of `js-yaml` `load` and `dump` to `safeLoad` and\r\n`safeDump`, in
preparation for a major version update of dependency,\r\nwhere the
default behavior will be that of the safe function
variants.\r\n\r\n\r\n## Note to reviewers\r\n`safeDump` will throw if it
encounters invalid types (e.g. `undefined`),\r\nwhereas the `dump`
function will still write the file including the\r\ninvalid types. This
may have an affect within your use cases - if\r\nthrowing is not
acceptable or is unhandled. To avoid this the\r\n`skipInvalid` option
can be used
(see\r\nhttps://github.com/nodeca/js-yaml#dump-object---options-) - this
will\r\nwrite the file, stripping out any invalid types from the
input.\r\n\r\nPlease consider this when reviewing the changes to your
code. If the\r\n`skipInvalid` option is needed, please add it, or let us
know to make\r\nthe change.\r\n\r\n---------\r\n\r\nCo-authored-by: Sid
<siddharthmantri1@gmail.com>\r\nCo-authored-by: “jeramysoucy”
<jeramy.soucy@elastic.co>\r\nCo-authored-by: Elena Shostak
<elena.shostak@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Maxim Palenov
<maxim.palenov@elastic.co>","sha":"bcc46b60e99ddb3c86f64f794296405064334335","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Security","release_note:skip","backport:all-open","ci:project-deploy-observability","Team:obs-ux-infra_services","risk","v8.16.0","v8.15.1"],"number":190641,"url":"https://github.com/elastic/kibana/pull/190641","mergeCommit":{"message":"Changing
load/dump in source files (#190641)\n\n## Summary\r\n\r\nUpdates usage
of `js-yaml` `load` and `dump` to `safeLoad` and\r\n`safeDump`, in
preparation for a major version update of dependency,\r\nwhere the
default behavior will be that of the safe function
variants.\r\n\r\n\r\n## Note to reviewers\r\n`safeDump` will throw if it
encounters invalid types (e.g. `undefined`),\r\nwhereas the `dump`
function will still write the file including the\r\ninvalid types. This
may have an affect within your use cases - if\r\nthrowing is not
acceptable or is unhandled. To avoid this the\r\n`skipInvalid` option
can be used
(see\r\nhttps://github.com/nodeca/js-yaml#dump-object---options-) - this
will\r\nwrite the file, stripping out any invalid types from the
input.\r\n\r\nPlease consider this when reviewing the changes to your
code. If the\r\n`skipInvalid` option is needed, please add it, or let us
know to make\r\nthe change.\r\n\r\n---------\r\n\r\nCo-authored-by: Sid
<siddharthmantri1@gmail.com>\r\nCo-authored-by: “jeramysoucy”
<jeramy.soucy@elastic.co>\r\nCo-authored-by: Elena Shostak
<elena.shostak@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Maxim Palenov
<maxim.palenov@elastic.co>","sha":"bcc46b60e99ddb3c86f64f794296405064334335"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190641","number":190641,"mergeCommit":{"message":"Changing
load/dump in source files (#190641)\n\n## Summary\r\n\r\nUpdates usage
of `js-yaml` `load` and `dump` to `safeLoad` and\r\n`safeDump`, in
preparation for a major version update of dependency,\r\nwhere the
default behavior will be that of the safe function
variants.\r\n\r\n\r\n## Note to reviewers\r\n`safeDump` will throw if it
encounters invalid types (e.g. `undefined`),\r\nwhereas the `dump`
function will still write the file including the\r\ninvalid types. This
may have an affect within your use cases - if\r\nthrowing is not
acceptable or is unhandled. To avoid this the\r\n`skipInvalid` option
can be used
(see\r\nhttps://github.com/nodeca/js-yaml#dump-object---options-) - this
will\r\nwrite the file, stripping out any invalid types from the
input.\r\n\r\nPlease consider this when reviewing the changes to your
code. If the\r\n`skipInvalid` option is needed, please add it, or let us
know to make\r\nthe change.\r\n\r\n---------\r\n\r\nCo-authored-by: Sid
<siddharthmantri1@gmail.com>\r\nCo-authored-by: “jeramysoucy”
<jeramy.soucy@elastic.co>\r\nCo-authored-by: Elena Shostak
<elena.shostak@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Maxim Palenov
<maxim.palenov@elastic.co>","sha":"bcc46b60e99ddb3c86f64f794296405064334335"}},{"branch":"8.15","label":"v8.15.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2024-08-22 09:26:54 +02:00
..
__fixtures__ [eslint] add rule to prevent export* in plugin index files (#109357) (#110928) 2021-09-02 00:23:09 -04:00
helpers Fix wrongly suggested module paths for @kbn/eslint/module_migration rule (#117781) (#118894) 2021-11-17 11:15:05 -07:00
rules [7.17] Changing load/dump in source files (#190641) (#190992) 2024-08-22 09:26:54 +02:00
BUILD.bazel Bump eslint@7 (#94347) (#114256) 2021-10-07 13:35:23 -04:00
index.js [7.17] Changing load/dump in source files (#190641) (#190992) 2024-08-22 09:26:54 +02:00
jest.config.js [7.x] Elastic License 2.0 (#90192) 2021-02-03 18:39:13 -08:00
lib.js [7.x] Elastic License 2.0 (#90192) 2021-02-03 18:39:13 -08:00
package.json [7.x] Elastic License 2.0 (#90192) 2021-02-03 18:39:13 -08:00
README.md [7.x] [eslint] merge custom rules into a single plugin (#33733) (#33758) 2019-03-22 18:53:45 -07:00

Custom ESLint rules for Kibana

This package contains custom ESLint rules used for Kibana development.