-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[eslint] merge custom rules into a single plugin #33733
Conversation
Pinging @elastic/kibana-operations |
This comment has been minimized.
This comment has been minimized.
@@ -21,5 +21,6 @@ module.exports = { | |||
rules: { | |||
'require-license-header': require('./rules/require_license_header'), | |||
'disallow-license-headers': require('./rules/disallow_license_headers'), | |||
'no-default-export': require('./rules/no_default_export'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall +1 from me for the PR, because today I spent some time trying to add another custom rule while porting #33562
just curious - why we use custom no_default_export
rule instead of https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-default-export.md ?
our doesn't handle export { foo as default };
for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably because it didn't exist at the time, but I'm not sure. I'd love to review a PR that moves to the rule from eslint-plugin-import!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok 👍
…3739) The fixtures used by reporting's `extract()` tests have tripped me and others up several times because from the outside they look and behave like source files, but require updating archive fixtures whenever the source is touched. The source of this file is irrelevant though, since the tests are just making sure that the extraction is accurate. This PR updates the fixture to a markdown file with Lorem Ipsum in it, so it won't look relevant to people making broad strokes changes to files like elastic#33733
The fixtures used by reporting's `extract()` tests have tripped me and others up several times because from the outside they look and behave like source files, but require updating archive fixtures whenever the source is touched. The source of this file is irrelevant though, since the tests are just making sure that the extraction is accurate. This PR updates the fixture to a markdown file with Lorem Ipsum in it, so it won't look relevant to people making broad strokes changes to files like #33733
…3739) The fixtures used by reporting's `extract()` tests have tripped me and others up several times because from the outside they look and behave like source files, but require updating archive fixtures whenever the source is touched. The source of this file is irrelevant though, since the tests are just making sure that the extraction is accurate. This PR updates the fixture to a markdown file with Lorem Ipsum in it, so it won't look relevant to people making broad strokes changes to files like elastic#33733
💚 Build Succeeded |
aa5e873
to
da05a03
Compare
💚 Build Succeeded |
I'd like to add another custom eslint rule, but there isn't a very good place to do that right now. We have the `eslint-plugin-kibana-custom` package, which is super simple but isn't in the `@kbn` namespace and isn't included in the root eslint config, and `@kbn/eslint-plugin-license-header` is too specific, so I've merged those two packages into `@kbn/eslint-plugin-eslint`, which is a little redundant but allows is to refer to the rules within it as `@kbn/eslint/{rule}`, which feels nice. Thoughts? _**NOTE:**_ merging the eslint rules from the two packages means enabling prettier for the code from `@kbn/eslint-plugin-license-header`, all those changes are made in elastic@42c7da6. [View the changes without the prettier updates](elastic/kibana@b647f2b...74e07a0)
I'd like to add another custom eslint rule, but there isn't a very good place to do that right now. We have the `eslint-plugin-kibana-custom` package, which is super simple but isn't in the `@kbn` namespace and isn't included in the root eslint config, and `@kbn/eslint-plugin-license-header` is too specific, so I've merged those two packages into `@kbn/eslint-plugin-eslint`, which is a little redundant but allows is to refer to the rules within it as `@kbn/eslint/{rule}`, which feels nice. Thoughts? _**NOTE:**_ merging the eslint rules from the two packages means enabling prettier for the code from `@kbn/eslint-plugin-license-header`, all those changes are made in elastic@42c7da6. [View the changes without the prettier updates](elastic/kibana@b647f2b...74e07a0)
The fixtures used by reporting's `extract()` tests have tripped me and others up several times because from the outside they look and behave like source files, but require updating archive fixtures whenever the source is touched. The source of this file is irrelevant though, since the tests are just making sure that the extraction is accurate. This PR updates the fixture to a markdown file with Lorem Ipsum in it, so it won't look relevant to people making broad strokes changes to files like #33733
I'd like to add another custom eslint rule, but there isn't a very good place to do that right now. We have the `eslint-plugin-kibana-custom` package, which is super simple but isn't in the `@kbn` namespace and isn't included in the root eslint config, and `@kbn/eslint-plugin-license-header` is too specific, so I've merged those two packages into `@kbn/eslint-plugin-eslint`, which is a little redundant but allows is to refer to the rules within it as `@kbn/eslint/{rule}`, which feels nice. Thoughts? _**NOTE:**_ merging the eslint rules from the two packages means enabling prettier for the code from `@kbn/eslint-plugin-license-header`, all those changes are made in 42c7da6. [View the changes without the prettier updates](b647f2b...74e07a0)
I'd like to add another custom eslint rule, but there isn't a very good place to do that right now. We have the
eslint-plugin-kibana-custom
package, which is super simple but isn't in the@kbn
namespace and isn't included in the root eslint config, and@kbn/eslint-plugin-license-header
is too specific, so I've merged those two packages into@kbn/eslint-plugin-eslint
, which is a little redundant but allows is to refer to the rules within it as@kbn/eslint/{rule}
, which feels nice.Thoughts?
NOTE: merging the eslint rules from the two packages means enabling prettier for the code from
@kbn/eslint-plugin-license-header
, all those changes are made in 42c7da6. View the changes without the prettier updates