learningequality / kolibri

Kolibri Learning Platform: the offline app for universal education
https://learningequality.org/kolibri/
MIT License
811 stars 684 forks source link

Migrate kolibri, kolibri-common, and kolibri-format code into a src folder once eslint imports plugin supports resolution via the `exports` field #12780

Open rtibbles opened 2 weeks ago

rtibbles commented 2 weeks ago

For consistency with our other packages, and to separate out package metadata from functional code, it would be useful to migrate all source code in the kolibri and kolibri-common packages inside the packages directory into a src subfolder.

This will mean that other package metadata like the package.json .npmignore etc. does not have to be mixed into the code.

However, to achieve this, this would be best done by specifying the exports field to map from the desired import path to the actual location within the package (which would now have a src prefix). This is supported by our code bundler, webpack, but not by the eslint import plugin which gives us linting warnings if we import undefined packages. Rather than lose the utility of being told that our package imports are incorrect, we will wait until the eslint import plugin has this support.