In JavaScript there are a variety of ways to export or import code as ES modules.
To standardize this in our projects, we should include a linting rule to give one allowed way for exporting and one allowed way for importing. This way, we can leverage auto fix of ESLint to standardize it and as well make sure it stays consistent throughout project development.
Relevant template
refarch-frontend, refarch-webcomponent
Problem description (optional)
In JavaScript there are a variety of ways to export or import code as ES modules. To standardize this in our projects, we should include a linting rule to give one allowed way for exporting and one allowed way for importing. This way, we can leverage auto fix of ESLint to standardize it and as well make sure it stays consistent throughout project development.
Desired solution
ESLint has the rules https://eslint.org/docs/latest/rules/no-restricted-imports and https://eslint.org/docs/latest/rules/no-restricted-exports which are not enabled by default. We should discuss about proper ways for exporting and importing and consolidate that in a configuration for those rules.
Considered alternatives (optional)
No response
Additional context (optional)
No response
No duplicate
Code of Conduct