Skip to content
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

[7.17] chore(NA): rename @elastic/eslint-config-kibana as @kbn/eslint-config (#132278) #132286

Merged
merged 2 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ snapshots.js
/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/server/lib/pdf/assets/**

# package overrides
/packages/elastic-eslint-config-kibana
/packages/kbn-eslint-config
/packages/kbn-plugin-generator/template
/packages/kbn-pm/dist
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
Expand Down
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const RESTRICTED_IMPORTS = [
module.exports = {
root: true,

extends: ['@elastic/eslint-config-kibana', 'plugin:@elastic/eui/recommended'],
extends: ['plugin:@elastic/eui/recommended', '@kbn/eslint-config'],

overrides: [
/**
Expand Down Expand Up @@ -316,7 +316,7 @@ module.exports = {
{
files: [
'packages/elastic-datemath/**/*.{js,mjs,ts,tsx}',
'packages/elastic-eslint-config-kibana/**/*.{js,mjs,ts,tsx}',
'packages/kbn-eslint-config/**/*.{js,mjs,ts,tsx}',
],
rules: {
'@kbn/eslint/require-license-header': [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you’re installing dependencies and seeing an error that looks
something like

....
Unsupported URL Type: link:packages/elastic-eslint-config-kibana
Unsupported URL Type: link:packages/kbn-eslint-config
....

you’re likely running `npm`. To install dependencies in {kib} you
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@
"@bazel/typescript": "^3.8.0",
"@cypress/snapshot": "^2.1.7",
"@cypress/webpack-preprocessor": "^5.6.0",
"@elastic/eslint-config-kibana": "link:bazel-bin/packages/elastic-eslint-config-kibana",
"@elastic/eslint-plugin-eui": "0.0.2",
"@elastic/github-checks-reporter": "0.0.20b3",
"@elastic/makelogs": "^6.0.0",
Expand All @@ -459,6 +458,7 @@
"@kbn/docs-utils": "link:bazel-bin/packages/kbn-docs-utils",
"@kbn/es": "link:bazel-bin/packages/kbn-es",
"@kbn/es-archiver": "link:bazel-bin/packages/kbn-es-archiver",
"@kbn/eslint-config": "link:bazel-bin/packages/kbn-eslint-config",
"@kbn/eslint-import-resolver-kibana": "link:bazel-bin/packages/kbn-eslint-import-resolver-kibana",
"@kbn/eslint-plugin-eslint": "link:bazel-bin/packages/kbn-eslint-plugin-eslint",
"@kbn/expect": "link:bazel-bin/packages/kbn-expect",
Expand Down
4 changes: 2 additions & 2 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ filegroup(
srcs = [
"//packages/elastic-apm-synthtrace:build",
"//packages/elastic-datemath:build",
"//packages/elastic-eslint-config-kibana:build",
"//packages/elastic-safer-lodash-set:build",
"//packages/kbn-ace:build",
"//packages/kbn-alerts:build",
Expand All @@ -22,6 +21,7 @@ filegroup(
"//packages/kbn-es:build",
"//packages/kbn-es-archiver:build",
"//packages/kbn-es-query:build",
"//packages/kbn-eslint-config:build",
"//packages/kbn-eslint-import-resolver-kibana:build",
"//packages/kbn-eslint-plugin-eslint:build",
"//packages/kbn-expect:build",
Expand Down Expand Up @@ -88,4 +88,4 @@ filegroup(
":build_pkg_code",
":build_pkg_types"
],
)
)
2 changes: 0 additions & 2 deletions packages/elastic-eslint-config-kibana/.npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/kbn-babel-preset/styled_components_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
module.exports = {
/**
* Synchronized regex list of files that use `styled-components`.
* Used by `kbn-babel-preset` and `elastic-eslint-config-kibana`.
* Used by `kbn-babel-preset` and `kbn-eslint-config`.
*/
USES_STYLED_COMPONENTS: [
/packages[\/\\]kbn-ui-shared-deps-(npm|src)[\/\\]/,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")

PKG_BASE_NAME = "elastic-eslint-config-kibana"
PKG_REQUIRE_NAME = "@elastic/eslint-config-kibana"
PKG_BASE_NAME = "kbn-eslint-config"
PKG_REQUIRE_NAME = "@kbn/eslint-config"

SOURCE_FILES = glob([
".eslintrc.js",
Expand All @@ -21,7 +21,6 @@ filegroup(

NPM_MODULE_EXTRA_FILES = [
"package.json",
"README.md",
]

DEPS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ in your `.eslintrc`:
```javascript
{
extends: [
'@elastic/eslint-config-kibana'
'@kbn/eslint-config'
]
}
```

## Optional jest config

If the project uses the [jest test runner](https://facebook.github.io/jest/),
the `@elastic/eslint-config-kibana/jest` config can be extended as well to use
the `@kbn/eslint-config/jest` config can be extended as well to use
`eslint-plugin-jest` and add settings specific to it:

```javascript
{
extends: [
'@elastic/eslint-config-kibana',
'@elastic/eslint-config-kibana/jest'
'@kbn/eslint-config',
'@kbn/eslint-config/jest'
]
}
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elastic/eslint-config-kibana",
"version": "0.15.0",
"name": "@kbn/eslint-config",
"version": "1.0.0",
"description": "The eslint config used by the kibana team",
"main": ".eslintrc.js",
"repository": {
Expand All @@ -14,7 +14,7 @@
"author": "Spencer Alger <email@spalger.com>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/elastic/kibana/tree/main/packages/elastic-eslint-config-kibana"
"url": "https://github.com/elastic/kibana/tree/main/packages/kbn-eslint-config"
},
"homepage": "https://github.com/elastic/kibana/tree/main/packages/elastic-eslint-config-kibana"
"homepage": "https://github.com/elastic/kibana/tree/main/packages/kbn-eslint-config"
}
2 changes: 1 addition & 1 deletion packages/kbn-plugin-generator/template/.eslintrc.js.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
extends: [
'@elastic/eslint-config-kibana',
'@kbn/eslint-config',
'plugin:@elastic/eui/recommended'
],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-pm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ From a plugin perspective there are two different types of Kibana dependencies:
runtime and static dependencies. Runtime dependencies are things that are
instantiated at runtime and that are injected into the plugin, for example
config and elasticsearch clients. Static dependencies are those dependencies
that we want to `import`. `elastic-eslint-config-kibana` is one example of this, and
that we want to `import`. `kbn-eslint-config` is one example of this, and
it's actually needed because eslint requires it to be a separate package. But we
also have dependencies like `datemath`, `flot`, `eui` and others that we
control, but where we want to `import` them in plugins instead of injecting them
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1587,10 +1587,6 @@
semver "^7.3.2"
topojson-client "^3.1.0"

"@elastic/eslint-config-kibana@link:bazel-bin/packages/elastic-eslint-config-kibana":
version "0.0.0"
uid ""

"@elastic/eslint-plugin-eui@0.0.2":
version "0.0.2"
resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314"
Expand Down Expand Up @@ -2970,6 +2966,10 @@
version "0.0.0"
uid ""

"@kbn/eslint-config@link:bazel-bin/packages/kbn-eslint-config":
version "0.0.0"
uid ""

"@kbn/eslint-import-resolver-kibana@link:bazel-bin/packages/kbn-eslint-import-resolver-kibana":
version "0.0.0"
uid ""
Expand Down