Imported from IBM/mobx-react-router (
AGENTS.md). Install upstream withnpx skills add IBM/mobx-react-router. Copyright stays with the author.
AGENTS.md
This file provides guidance to agents when working with code in this repository.
Testing
- Jest uses
jest-jasmine2test runner (not default circus) - specified in package.json - Tests must be in
__test__/directory (configured in jest.roots) - Custom jasmine matcher
toEqualLocationdefined in sync.spec.js for location comparisons
Code Style
- ESLint uses
neostandardconfig with custom overrides - No space before function parens:
function()notfunction () - Semicolons required (enforced at warning level)
- Camelcase not enforced (disabled)
no-return-assigndisabled (allowsreturn x = ypattern)
Build
- Webpack builds UMD bundle with
mobxas external dependency - Entry point is
index.js(not src/index.js) - Use
MINIFY=1env var to create minified build - Library exports as
MobxReactRouterglobal
MobX Integration
- RouterStore uses
makeAutoObservablewithautoBind: trueoption - Store location updates via private
_updateLocationmethod (not direct assignment) syncHistoryWithStoreaddssubscribe/unsubscribemethods to history object (non-standard history API extension)