@cesium/eslint-config

12.0.0 • Public • Published

eslint-config-cesium

The official shareable ESLint config for the Cesium ecosystem.

Usage

We export three ESLint configurations.

eslint-config-cesium default

This config contains basic Cesium syntax and style config, from which browser and node extend. Extends @eslint/js recommended rules and eslint-config/prettier with additional rules.

eslint.config.js

import configCesium from "eslint-config-cesium";

exports default [
    // Apply recommended rules to all files
    configCesium.configs.recommended,
    // Apply recommended rules to JS files with an override
    {
        files: ["**/*.js"],
        rules: {
            ...configCesium.configs.recommended.rules,
            "no-unused-vars": "off"
        } 
    },
]

eslint-config-cesium/browser

For use in browser environments.

eslint.config.js

import configCesium from "eslint-config-cesium";

exports default [
    // Apply recommended rules to all files
    configCesium.configs.browser,
    // Apply recommended rules to JS files with an override
    {
        files: ["**/*.js"],
        ...configCesium.configs.browser,
        rules: {
            ...configCesium.configs.browser.rules,
            "no-unused-vars": "off"
        } 
    },
]

eslint-config-cesium/node

For use in Node.js environments. Extends plugin/n:recommended

eslint.config.js

import configCesium from "eslint-config-cesium";

exports default [
    // Apply recommended rules to all files
    configCesium.configs.node,
    // Apply recommended rules to JS files with an override
    {
        files: ["**/*.js"],
        ...configCesium.configs.node,
        rules: {
            ...configCesium.configs.node.rules,
            "no-unused-vars": "off"
        } 
    },
]

Readme

Keywords

Package Sidebar

Install

npm i @cesium/eslint-config

Homepage

cesium.com/

Weekly Downloads

275

Version

12.0.0

License

Apache-2.0

Unpacked Size

21 kB

Total Files

9

Last publish

Collaborators

  • cesiumgsadmin
  • ggetz
  • lukemckinstry
  • jjspace
  • jjhembd
  • adamcesium