CONTRIBUTING.md
May 1, 2025 ยท View on GitHub
Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.
Before filing an issue
Please take a look at previous issues that resolve common problems.
If you're just looking for help, you'll probably attract the most eyes if you post in GIS Stackexchange or the Esri Leaflet Community on GeoNet.
If you think you're encountering a new bug, please feel free to log an issue and include the steps to reproduce the problem (and preferably a running sample).
Please include the following in your issue:
- Browser
- Browser version
- Leaflet version
L.version - Esri Leaflet version
L.esri.VERSION - Bundling tool (webpack, browserify, Require JS) if any
I want to contribute, what should I work on?
There is a lot of room for contributions to Esri Leaflet. Make sure you check out the development instructions in the readme to help you get started.
More samples
If you'd like to add an additional sample to the Esri Leaflet documentation, let us know by creating an issue in this repository.
More tests
Esri Leaflet has a fairly comprehensive test suite built with Mocha, Chai, Sinon, and Karma. The tests can be found in the spec folder.
You can run the tests with npm test.
Support for new services and layer types
Support for new layer types and services are always needed. The plugin candidates list is a good place to start.
Can I publish my own Esri Leaflet plugins?
Of course! If you develop reusable components for use with Esri Leaflet that you think would be helpful to share with other developers, please file an issue so we can discuss it.
Setting up a dev environment
- Fork and clone Esri Leaflet
cdinto theesri-leafletfolder- Install the
package.jsondependencies by runningnpm install - In order to compile/minify the source code of the API in a newly created
distfolder, runnpm run build. - If you'd like to debug interactively, run
npm start. This will start the web server at http://localhost:5000 and start watching the raw source for changes. - http://localhost:5000/debug/sample.html is a demo app that you can use to get the lay of the land.
- If you'd like to share your changes, just create a pull request
If you'd like to build the Esri Leaflet website locally, make sure you have the Grunt CLI installed.
Linting and Code Formatting
Please make sure your changes pass ESLint and Prettier. This will help make sure code is consistent throughout Esri Leaflet. To check this, run npm run lint which will check both. Other helpful commands:
npm run lint- tests code for ESLint and Prettiernpm run eslint- tests code for ESLintnpm run eslintfix- fixes ESLint errorsnpm run prettier- tests code for Prettiernpm run prettierfix- fixes Prettier errors
Testing
Please make sure your changes don't break existing tests. Testing is essential for determining backward compatibility and catching breaking changes. You can run tests with npm test (or npm t, or npm run test if you're not into the whole brevity thing).