Skip to content

Commit

Permalink
Add eslint rule to forbid imports from path containing packages/ from…
Browse files Browse the repository at this point in the history
… root dir of OSD (opensearch-project#1500)

* Add lint rule to forbid imports from packages

Signed-off-by: Craig Perkins <[email protected]>

* Add eslint rule to forbid imports from path containing packages/ from root dir of OSD

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
Co-authored-by: Stephen Crawford <[email protected]>
Co-authored-by: Peter Nied <[email protected]>
  • Loading branch information
3 people authored Jul 19, 2023
1 parent 29a8d9c commit 91faa3d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ module.exports = {
extends: ['@elastic/eslint-config-kibana', 'plugin:@elastic/eui/recommended'],
rules: {
// "@osd/eslint/require-license-header": "off"
'@osd/eslint/no-restricted-paths': [
'error',
{
basePath: __dirname,
zones: [
{
target: ['(public|server)/**/*'],
from: ['../../packages/**/*','packages/**/*']
},
]
}
]
},
overrides: [
{
Expand Down
1 change: 0 additions & 1 deletion server/saved_objects/saved_objects_wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {
SavedObjectsUpdateOptions,
SavedObjectsUpdateResponse,
} from 'opensearch-dashboards/server';
import { Config } from 'packages/osd-config/target';
import { SecurityPluginConfigType } from '..';
import { OpenSearchDashboardsAuthState } from '../auth/types/authentication_type';
import {
Expand Down

0 comments on commit 91faa3d

Please sign in to comment.