Nuanced Pterodactyl Monk

    eslint-plugin-googlemaps

    1.4.15 • Public • Published

    eslint-plugin-googlemaps

    npm Build Release GitHub contributors semantic-release Discord

    Description

    ESLint plugin with rules specific to Google Maps Platform JavaScript API.

    Install

    Available via npm as the package eslint-plugin-googlemaps.

    npm i -D eslint-plugin-googlemaps

    Usage

    To use rules provided by the plugin, use the following:

    eslintrc.json:

    {
      "extends": ["plugin:googlemaps:recommended"]
      "plugins": ["googlemaps"],
    }

    Some rules are fixable with eslint --fix. For example the place-fields rule.

    service.getDetails({place_id: 'foo'})

    becomes

    service.getDetails({fields: /** TODO: Add necessary fields to the request */ [], place_id: 'foo'})

    Rules

    Rule Description Configurations Type
    no-api-keys Keep API keys out of code. recommended suggest
    place-fields Always use place fields. recommended fixable
    require-js-api-loader Require @googlemaps/js-api-loader. recommended suggest

    Install

    npm i eslint-plugin-googlemaps

    DownloadsWeekly Downloads

    126

    Version

    1.4.15

    License

    Apache-2.0

    Unpacked Size

    50.7 kB

    Total Files

    16

    Last publish

    Collaborators

    • google-wombot