Skip to content

Conversation

@KristjanESPERANTO
Copy link
Collaborator

This PR updates the project's linting, build configuration, and package distribution.

Linting & Code Quality

  • Migrate to new ESLint config patterns
  • Replace stylelint with @eslint/css for unified linting
  • Add GitHub Actions workflow for automated linting
  • Enable some recommended rules via @eslint/js
    • Fix linting issues in source and demo files

Build Configuration

  • Remove unused Rollup plugins (node-resolve, commonjs)
    • Only external dependency is leaflet, no module resolution needed
  • Use modern JSON imports with import attributes
  • Add version banner to all builds (ESM, UMD, minified)

Package Distribution

  • Add exports field for modern module resolution
  • Add files field to explicitly list published content
  • Add sideEffects field to enable tree-shaking for ESM builds
  • Remove redundant unpkg/jsdelivr fields (they fallback to main)
  • Remove .npmignore (superseded by files field)

Impact

  • Smaller npm package (only ships dist/, not src/ or demo/)
  • Better tree-shaking for modern bundlers
  • Cleaner, more maintainable configuration

Happy new year! 🎆

- use `defineConfig` and `globalIgnores`
- remove sourceType (`module` is default)
- remove unused global `myCustomGlobal`
- Add `exports` field for modern module resolution
- Add `files` field to explicitly define published files
- Add `sideEffects` for better tree-shaking (ESM is side-effect free)
- Remove redundant `unpkg` and `jsdelivr` fields (fallback to `main`)
- Remove `.npmignore` (superseded by `files` field)
@domoritz domoritz merged commit 672a617 into domoritz:gh-pages Jan 2, 2026
1 check passed
@domoritz
Copy link
Owner

domoritz commented Jan 2, 2026

Thank you

@KristjanESPERANTO KristjanESPERANTO deleted the tooling branch January 12, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants