diff --git a/packages/kbn-eslint-plugin-eslint/README.md b/packages/kbn-eslint-plugin-eslint/README.md deleted file mode 100644 index 6b6d0a0059a1..000000000000 --- a/packages/kbn-eslint-plugin-eslint/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Custom ESLint rules for Kibana - -This package contains custom ESLint rules used for Kibana development. \ No newline at end of file diff --git a/packages/osd-eslint-plugin-eslint/README.md b/packages/osd-eslint-plugin-eslint/README.md new file mode 100644 index 000000000000..b5ee06189407 --- /dev/null +++ b/packages/osd-eslint-plugin-eslint/README.md @@ -0,0 +1,3 @@ +# Custom ESLint rules for OpenSearch Dashboards + +This package contains custom ESLint rules used for OpenSearch Dashboards development. \ No newline at end of file diff --git a/packages/kbn-eslint-plugin-eslint/index.js b/packages/osd-eslint-plugin-eslint/index.js similarity index 100% rename from packages/kbn-eslint-plugin-eslint/index.js rename to packages/osd-eslint-plugin-eslint/index.js diff --git a/packages/kbn-eslint-plugin-eslint/lib.js b/packages/osd-eslint-plugin-eslint/lib.js similarity index 100% rename from packages/kbn-eslint-plugin-eslint/lib.js rename to packages/osd-eslint-plugin-eslint/lib.js diff --git a/packages/kbn-eslint-plugin-eslint/package.json b/packages/osd-eslint-plugin-eslint/package.json similarity index 81% rename from packages/kbn-eslint-plugin-eslint/package.json rename to packages/osd-eslint-plugin-eslint/package.json index 72b8577cb094..0e82fed704c6 100644 --- a/packages/kbn-eslint-plugin-eslint/package.json +++ b/packages/osd-eslint-plugin-eslint/package.json @@ -1,9 +1,9 @@ { - "name": "@kbn/eslint-plugin-eslint", + "name": "@osd/eslint-plugin-eslint", "version": "1.0.0", "private": true, "license": "Apache-2.0", - "kibana": { + "opensearchDashboards": { "devOnly": true }, "peerDependencies": { diff --git a/packages/kbn-eslint-plugin-eslint/rules/__tests__/disallow_license_headers.js b/packages/osd-eslint-plugin-eslint/rules/__tests__/disallow_license_headers.js similarity index 98% rename from packages/kbn-eslint-plugin-eslint/rules/__tests__/disallow_license_headers.js rename to packages/osd-eslint-plugin-eslint/rules/__tests__/disallow_license_headers.js index 64da12349662..053ee176d148 100644 --- a/packages/kbn-eslint-plugin-eslint/rules/__tests__/disallow_license_headers.js +++ b/packages/osd-eslint-plugin-eslint/rules/__tests__/disallow_license_headers.js @@ -28,7 +28,7 @@ const ruleTester = new RuleTester({ }, }); -ruleTester.run('@kbn/eslint/disallow-license-headers', rule, { +ruleTester.run('@osd/eslint/disallow-license-headers', rule, { valid: [ { code: dedent` diff --git a/packages/kbn-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/client/a.js b/packages/osd-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/client/a.js similarity index 100% rename from packages/kbn-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/client/a.js rename to packages/osd-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/client/a.js diff --git a/packages/kbn-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/b.js b/packages/osd-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/b.js similarity index 100% rename from packages/kbn-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/b.js rename to packages/osd-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/b.js diff --git a/packages/kbn-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/c.js b/packages/osd-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/c.js similarity index 100% rename from packages/kbn-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/c.js rename to packages/osd-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/c.js diff --git a/packages/kbn-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/deep/d.js b/packages/osd-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/deep/d.js similarity index 100% rename from packages/kbn-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/deep/d.js rename to packages/osd-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/deep/d.js diff --git a/packages/kbn-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/index_patterns/index.js b/packages/osd-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/index_patterns/index.js similarity index 100% rename from packages/kbn-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/index_patterns/index.js rename to packages/osd-eslint-plugin-eslint/rules/__tests__/files/no_restricted_paths/server/index_patterns/index.js diff --git a/packages/kbn-eslint-plugin-eslint/rules/__tests__/no_restricted_paths.js b/packages/osd-eslint-plugin-eslint/rules/__tests__/no_restricted_paths.js similarity index 99% rename from packages/kbn-eslint-plugin-eslint/rules/__tests__/no_restricted_paths.js rename to packages/osd-eslint-plugin-eslint/rules/__tests__/no_restricted_paths.js index f75675f2d777..3931a761b3c7 100644 --- a/packages/kbn-eslint-plugin-eslint/rules/__tests__/no_restricted_paths.js +++ b/packages/osd-eslint-plugin-eslint/rules/__tests__/no_restricted_paths.js @@ -39,7 +39,7 @@ const ruleTester = new RuleTester({ }, }); -ruleTester.run('@kbn/eslint/no-restricted-paths', rule, { +ruleTester.run('@osd/eslint/no-restricted-paths', rule, { valid: [ { code: 'import a from "../client/a.js"', diff --git a/packages/kbn-eslint-plugin-eslint/rules/__tests__/require_license_header.js b/packages/osd-eslint-plugin-eslint/rules/__tests__/require_license_header.js similarity index 98% rename from packages/kbn-eslint-plugin-eslint/rules/__tests__/require_license_header.js rename to packages/osd-eslint-plugin-eslint/rules/__tests__/require_license_header.js index a328d79cf407..383d3961b0ec 100644 --- a/packages/kbn-eslint-plugin-eslint/rules/__tests__/require_license_header.js +++ b/packages/osd-eslint-plugin-eslint/rules/__tests__/require_license_header.js @@ -28,7 +28,7 @@ const ruleTester = new RuleTester({ }, }); -ruleTester.run('@kbn/eslint/require-license-header', rule, { +ruleTester.run('@osd/eslint/require-license-header', rule, { valid: [ { code: dedent` diff --git a/packages/kbn-eslint-plugin-eslint/rules/disallow_license_headers.js b/packages/osd-eslint-plugin-eslint/rules/disallow_license_headers.js similarity index 100% rename from packages/kbn-eslint-plugin-eslint/rules/disallow_license_headers.js rename to packages/osd-eslint-plugin-eslint/rules/disallow_license_headers.js diff --git a/packages/kbn-eslint-plugin-eslint/rules/module_migration.js b/packages/osd-eslint-plugin-eslint/rules/module_migration.js similarity index 95% rename from packages/kbn-eslint-plugin-eslint/rules/module_migration.js rename to packages/osd-eslint-plugin-eslint/rules/module_migration.js index 6027a939f1a6..00ac61337b0b 100644 --- a/packages/kbn-eslint-plugin-eslint/rules/module_migration.js +++ b/packages/osd-eslint-plugin-eslint/rules/module_migration.js @@ -18,7 +18,7 @@ */ const path = require('path'); -const KIBANA_ROOT = path.resolve(__dirname, '../../..'); +const OPENSEARCH_DASHBOARDS_ROOT = path.resolve(__dirname, '../../..'); function checkModuleNameNode(context, mappings, node) { const mapping = mappings.find( @@ -44,7 +44,7 @@ function checkModuleNameNode(context, mappings, node) { if (mapping.toRelative) { const sourceDirectory = path.dirname(context.getFilename()); const localModulePath = node.value.replace(new RegExp(`^${mapping.from}\/`), ''); - const modulePath = path.resolve(KIBANA_ROOT, mapping.toRelative, localModulePath); + const modulePath = path.resolve(OPENSEARCH_DASHBOARDS_ROOT, mapping.toRelative, localModulePath); const relativePath = path.relative(sourceDirectory, modulePath); newSource = relativePath.startsWith('.') ? relativePath : `./${relativePath}`; diff --git a/packages/kbn-eslint-plugin-eslint/rules/no_restricted_paths.js b/packages/osd-eslint-plugin-eslint/rules/no_restricted_paths.js similarity index 100% rename from packages/kbn-eslint-plugin-eslint/rules/no_restricted_paths.js rename to packages/osd-eslint-plugin-eslint/rules/no_restricted_paths.js diff --git a/packages/kbn-eslint-plugin-eslint/rules/require_license_header.js b/packages/osd-eslint-plugin-eslint/rules/require_license_header.js similarity index 100% rename from packages/kbn-eslint-plugin-eslint/rules/require_license_header.js rename to packages/osd-eslint-plugin-eslint/rules/require_license_header.js diff --git a/packages/kbn-eslint-plugin-eslint/yarn.lock b/packages/osd-eslint-plugin-eslint/yarn.lock similarity index 100% rename from packages/kbn-eslint-plugin-eslint/yarn.lock rename to packages/osd-eslint-plugin-eslint/yarn.lock