| module.exports = { |
| rules: { |
| 'no-restricted-imports': [ |
| 'error', |
| { |
| patterns: [ |
| { |
| group: [ |
| 'calypso/*', |
| |
| '!calypso/data', |
| 'calypso/data/*', |
| '!calypso/data/php-versions', |
| |
| '!calypso/data/data-center', |
| |
| '!calypso/lib', |
| 'calypso/lib/*', |
| '!calypso/lib/wp', |
| |
| |
| '!calypso/assets', |
| 'calypso/assets/*', |
| '!calypso/assets/icons', |
| '!calypso/assets/images', |
| |
| |
| ], |
| message: 'Importing from calypso/ is not allowed in the dashboard folder.', |
| }, |
| { |
| group: [ |
| '@automattic/*', |
| '!@automattic/calypso-config', |
| '!@automattic/components', |
| '@automattic/components/*', |
| '!@automattic/components/src', |
| '@automattic/components/src/*', |
| '!@automattic/components/src/circular-progress-bar', |
| '!@automattic/components/src/summary-button', |
| '!@automattic/components/src/breadcrumbs', |
| '!@automattic/components/src/breadcrumbs/types', |
| '!@automattic/components/src/logos', |
| '!@automattic/calypso-analytics', |
| '!@automattic/domains-table', |
| '!@automattic/domains-table/src/utils/*', |
| '!@automattic/number-formatters', |
| '!@automattic/ui', |
| '!@automattic/viewport', |
| |
| |
| ], |
| message: 'Importing from @automattic/ is not allowed in the dashboard folder.', |
| }, |
| ], |
| }, |
| ], |
| }, |
| }; |
|
|