The official shareable ESLint config for the Cesium ecosystem.
We export three ESLint configurations.
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.
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"
}
},
]
For use in browser environments.
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"
}
},
]
For use in Node.js environments. Extends plugin/n:recommended
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"
}
},
]