cesium/Tools/eslint-config-cesium
Gabby Getz 31c154a299 Remove when.js and replace with native promises
There were a few areas in Source where a function was assumed to be executed synchronously when a function was resolved. Native Promises however, by spec, will resolve at the end of a frame. There were also some strange handling of promise rejection in imagery providers that I cleaned up a bit in order to make them testable.

- In LabelCollection and EntityCluster, order of execution adjustment where made.
- Added TextureAtlas.addImageSync to support the order of execution fix in LabelCollection
- ArcGisMapServerImageryProvider.readyPromise will not reject if there is a failure unless the request cannot be retried.
- SingleTileImageryProvider.readyPromise will not reject if there is a failure unless the request cannot be retried.

The majority of the changes lie in the Specs, where unresolved promises weren’t being awaited before finishing executions, and where resolved promises are assumed to be synchronous all over the place and needed a good amount of fixes. Another issue which came up was calling Promise.reject in the body of a spec can cause node to halt execution when running via the command line.
2022-03-16 09:38:39 -04:00
..
.eslintrc.json Remove more eslint-config-cesium package dependencies 2017-06-09 10:37:58 -04:00
CHANGES.md Format all code with prettier 2020-04-16 20:31:36 -04:00
README.md change cesiumjs.org urls in docs to cesium.com 2021-03-13 12:52:56 -05:00
browser.js Remove when.js and replace with native promises 2022-03-16 09:38:39 -04:00
index.js Format all code with prettier 2020-04-16 20:31:36 -04:00
node.js enable template literals in linter settings 2022-02-02 15:34:23 -05:00
package.json master -> main 2021-07-16 19:01:30 -04:00

README.md

The official shareable ESLint config for the Cesium ecosystem.

Usage


We export three ESLint configurations.

eslint-config-cesium

This config contains basic Cesium syntax and style config, from which browser and node extend. Extends eslint:recommended with additional rules.

eslint-config-cesium/browser

For use in AMD modules and browser code.

eslint-config-cesium/node

For use in node packages.


To use any of these configs,

  1. npm install eslint-config-cesium --save-dev

    If using the browser config: npm install eslint-plugin-html --save-dev

  2. Add "extends": "cesium" to your .eslintrc.* files