Skip to content

Commit abea959

Browse files
authored
Merge branch 'main' into 3601-my-location-error
2 parents 6524944 + 7bf2f92 commit abea959

File tree

79 files changed

+487
-636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+487
-636
lines changed
Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,78 @@
1-
{
2-
"root": true,
3-
"extends": [
1+
"use strict";
2+
3+
module.exports = {
4+
root: true,
5+
extends: [
46
"eslint:recommended",
57
// https://github.com/typescript-eslint/typescript-eslint/blob/v6/packages/eslint-plugin/src/configs/recommended.ts
68
"plugin:@typescript-eslint/recommended",
79
"plugin:react/recommended",
810
"plugin:react-hooks/recommended",
911
"prettier"
1012
],
11-
"parser": "@typescript-eslint/parser",
12-
"parserOptions": {
13-
"requireConfigFile": false,
14-
"ecmaVersion": 2019,
15-
"ecmaFeatures": {
16-
"jsx": true,
17-
"modules": true,
18-
"legacyDecorators": true
13+
parser: "@typescript-eslint/parser",
14+
parserOptions: {
15+
requireConfigFile: false,
16+
ecmaVersion: 2019,
17+
ecmaFeatures: {
18+
jsx: true,
19+
modules: true,
20+
legacyDecorators: true
1921
}
2022
},
21-
"env": {
22-
"browser": true,
23-
"commonjs": true,
24-
"es6": true
23+
env: {
24+
browser: true,
25+
commonjs: true,
26+
es6: true
2527
},
26-
"ignorePatterns": ["*.scss.d.ts"],
27-
"plugins": ["react", "react-hooks", "@typescript-eslint"],
28-
"globals": {
29-
"process": true
28+
ignorePatterns: ["*.scss.d.ts", "/lib/ThirdParty"],
29+
plugins: ["react", "react-hooks", "@typescript-eslint"],
30+
globals: {
31+
process: true
3032
},
31-
"settings": {
32-
"react": {
33-
"version": "detect"
33+
settings: {
34+
react: {
35+
version: "detect"
3436
}
3537
},
36-
"rules": {
38+
rules: {
39+
// TODO: re-enable the disabled @typescript-eslint rules.
3740
"@typescript-eslint/no-explicit-any": "off",
3841
"@typescript-eslint/no-namespace": "off",
39-
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
4042
"@typescript-eslint/no-this-alias": "off",
4143
"@typescript-eslint/no-var-requires": "off",
4244
"@typescript-eslint/unified-signatures": "error",
4345
"react-hooks/exhaustive-deps": "error",
44-
"react/jsx-boolean-value": ["error", "never", { "always": [] }],
46+
"react/jsx-boolean-value": ["error", "never", { always: [] }],
4547
"react/no-arrow-function-lifecycle": "error",
4648
"react/no-invalid-html-attribute": "error",
4749
"react/jsx-no-useless-fragment": "error",
4850
"react/jsx-no-constructed-context-values": "error",
4951
"react/jsx-fragments": ["error", "syntax"],
50-
"react/jsx-no-duplicate-props": ["error", { "ignoreCase": true }],
52+
"react/jsx-no-duplicate-props": ["error", { ignoreCase: true }],
5153
"react/jsx-pascal-case": [
5254
"error",
5355
{
54-
"allowAllCaps": true,
55-
"ignore": []
56+
allowAllCaps: true,
57+
ignore: []
5658
}
5759
],
5860
"react/no-danger": "warn",
5961
"react/no-did-update-set-state": "error",
6062
"react/no-will-update-set-state": "error",
6163
"react/self-closing-comp": "error",
62-
"react/jsx-no-undef": ["error", { "allowGlobals": true }],
64+
"react/jsx-no-undef": ["error", { allowGlobals: true }],
6365

6466
/*Possible Errors */
6567
"no-console": "off",
6668
"no-inner-declarations": [1, "functions"],
6769

6870
/* Best Practices */
69-
"eqeqeq": ["error"],
71+
eqeqeq: ["error"],
7072
"no-alert": ["error"],
7173
"no-caller": ["error"],
7274
"no-div-regex": ["error"],
75+
"no-empty": ["error", { allowEmptyCatch: true }],
7376
"no-eval": ["error"],
7477
"no-extend-native": ["error"],
7578
"no-fallthrough": 0,
@@ -86,29 +89,29 @@
8689
"no-return-assign": ["error"],
8790
"no-script-url": ["error"],
8891
"no-sequences": ["error"],
89-
"radix": "error",
92+
radix: "error",
9093

9194
/* Strict Mode */
92-
"strict": [0, "global"],
95+
strict: [0, "global"],
9396

9497
/* Variables */
9598
"no-label-var": 1,
9699
"@typescript-eslint/no-unused-vars": [
97100
"warn",
98101
{
99-
"args": "all",
100-
"argsIgnorePattern": "^_",
101-
"varsIgnorePattern": "^_",
102-
"caughtErrors": "all",
103-
"caughtErrorsIgnorePattern": "^_",
104-
"destructuredArrayIgnorePattern": "^_",
105-
"ignoreRestSiblings": true
102+
args: "all",
103+
argsIgnorePattern: "^_",
104+
varsIgnorePattern: "^_",
105+
caughtErrors: "all",
106+
caughtErrorsIgnorePattern: "^_",
107+
destructuredArrayIgnorePattern: "^_",
108+
ignoreRestSiblings: true
106109
}
107110
],
108-
"camelcase": [
111+
camelcase: [
109112
0,
110113
{
111-
"properties": "always"
114+
properties: "always"
112115
}
113116
],
114117
"no-array-constructor": "error",
@@ -118,12 +121,12 @@
118121
/* See https://stackoverflow.com/questions/64646248/eslintrc-js-for-react-17-and-jsx-without-import-react/64646593#64646593 */
119122
"react/jsx-uses-react": "off",
120123
"react/react-in-jsx-scope": "off",
121-
"react/no-unknown-property": ["error", { "ignore": ["css"] }]
124+
"react/no-unknown-property": ["error", { ignore: ["css"] }]
122125
},
123-
"overrides": [
126+
overrides: [
124127
{
125-
"files": ["**/*.ts", "**/*.tsx"],
126-
"rules": {
128+
files: ["**/*.ts", "**/*.tsx"],
129+
rules: {
127130
/* The no-useless-constructor needs to be disabled for
128131
the @typescript-eslint-rule. */
129132
"no-useless-constructor": "off",
@@ -135,4 +138,4 @@
135138
}
136139
}
137140
]
138-
}
141+
};

CHANGES.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
# Change Log
22

3-
#### next release (8.7.11)
3+
#### next release (8.7.12)
44

5-
- Explicitly set prettier tab-width
6-
- Move release guide from README.md to RELEASE_GUIDE.md
5+
- support URL parameters in a GetLegendGraphic request for a layer without a style configured
76
- Enhanced error processing for obtaining user location
87
- [The next improvement]
98

9+
#### 8.7.11 - 2024-12-18
10+
11+
- Explicitly set prettier tab-width
12+
- Move release guide from README.md to RELEASE_GUIDE.md
13+
- Add `clampToGround` to `KmlCatalogItemTraits` (defaults to `true`) - this is now passed to `KmlDataSource.load`. Terria no longer clamps polygon geometries to terrain manually. All clamping logic is now handled by Cesium.
14+
- Add `dataSourceUri` to `KmlCatalogItemTraits` - Overrides the url to use for resolving relative links and other KML network features
15+
1016
#### 8.7.10 - 2024-11-29
1117

1218
- Add OpenStreetMap as a basemap option.
@@ -227,6 +233,11 @@
227233
- Fix share links with picked features from `ProtomapsImageryProvider`
228234
- Added on screen attribution and Google logo for Google Photorealistic 3D Tiles.
229235
- Add `hideDefaultDescription` to `CatalogMemberTraits` - if true, then no generic default description will be shown when `description` is empty.
236+
- Add `hideDefaultDescription` to `CatalogMemberTraits` - if true, then no generic default description will be shown when `description` is empty.
237+
- Add `clampPolygonsToGround` to `KmlCatalogItemTraits` (defaults to true`)
238+
- [The next improvement]
239+
- Added on screen attribution and Google logo for Google Photorealistic 3D Tiles.
240+
- Add `hideDefaultDescription` to `CatalogMemberTraits` - if true, then no generic default description will be shown when `description` is empty.
230241

231242
#### 8.3.6 - 2023-10-03
232243

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,7 @@ representative at an online or offline event.
6060

6161
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6262
reported to the community leaders responsible for enforcement. Please send these
63-
reports via email addressed to at least 2 of the following community leaders:
64-
65-
- Ana Belgun: ana.belgun@data61.csiro.au
66-
- Stephen Davies: stephen.davies@data61.csiro.au
67-
- Nick Forbes-Smith: nick.forbes-smith@data61.csiro.au
68-
- Peter Hassall: peter.hassall@data61.csiro.au
63+
reports via email to support@terria.io.
6964

7065
All complaints will be reviewed and investigated promptly and fairly.
7166

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@ The following people have contributed to TerriaJS:
6666
- [Peter A. Jonsson](https://github.com/pjonsson)
6767
- [Giovanni Lughi](https://github.com/glughi)
6868
- [Andrew Cleland](https://github.com/aclel)
69+
- [Sidney Gijzen](https://github.com/sidneygijzen)

buildprocess/.eslintrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

buildprocess/.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"use strict";
2+
3+
module.exports = {
4+
env: {
5+
browser: false,
6+
node: true
7+
},
8+
rules: {
9+
"no-sync": 0
10+
}
11+
};

doc/contributing/development-environment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Run any of these tasks with `yarn gulp <task name>` from within the TerriaJS dir
142142
- `build` - Builds a non-minified version of the TerriaJS tests. This task may take 10 seconds or more, which is the main reason for the next task.
143143
- `watch` - Starts the same as `build` but then it stays running and watches for changes to any TerriaJS or Cesium source file that was pulled in to the build. When a change to any of these files is detected, a fast incremental build is automatically kicked off. The incremental build is much faster than the full rebuild because dependencies between source files are cached.
144144
- `release` - The same as `build` except that it also minifies the build tests.
145-
- `lint` - Runs ESLint on the files in the `lib` folder and reports any problems. The ESLint rules are defined in the `.eslintrc` file in the root directory of TerriaJS. A stricter set of rules is also find in the `.eslintrc` file in `lib/ReactViews`.
145+
- `lint` - Runs ESLint on the files in the `lib` folder and reports any problems. The ESLint rules are defined in the `.eslintrc.js` file in the root directory of TerriaJS.
146146
- `docs` - Generates the user guide and reference documentation. The user guide is served at `http://localhost:3002/doc/guide/` and the reference documentation is at `http://localhost:3002/doc/reference/`.
147147
- `make-schema` - Generates [JSON Schema](http://json-schema.org/) for the TerriaJS [Initialization Files](../customizing/initialization-files.md) from the source code. The schema is written to `wwwroot/schema`.
148148
- `test` - Detects browsers available on the local system and launches the test suite in each. The results are reported on the command line.

doc/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ nav:
2626
- Cross-Origin Resource Sharing: connecting-to-data/cross-origin-resource-sharing.md
2727
- Catalog Groups: connecting-to-data/catalog-groups.md
2828
- Catalog Items: connecting-to-data/catalog-items.md
29+
- Item Search: connecting-to-data/item-search/indexed-item-search.md
2930
- Customizing Data Appearance:
3031
- Overview: connecting-to-data/customizing-data-appearance/overview.md
3132
- Imagery Data: connecting-to-data/customizing-data-appearance/imagery-data.md

gulpfile.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,18 @@ gulp.task("watch-specs", function (done) {
4545

4646
gulp.task("lint", function (done) {
4747
var runExternalModule = require("./buildprocess/runExternalModule");
48+
var path = require("path");
4849

49-
runExternalModule("eslint/bin/eslint.js", [
50+
const eslintDir = path.dirname(require.resolve("eslint/package.json"));
51+
const eslintExecutable = path.join(eslintDir, "bin", "eslint.js");
52+
runExternalModule(eslintExecutable, [
5053
"lib",
5154
"test",
5255
"--ext",
5356
".jsx,.js,.ts,.tsx",
54-
"--ignore-pattern",
55-
"lib/ThirdParty",
5657
"--max-warnings",
57-
"0"
58+
"0",
59+
"--report-unused-disable-directives"
5860
]);
5961

6062
done();

lib/Core/uriHelpers.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export const getUriWithoutPath = (anyUri: uri.URI) => {
1+
import type URI from "urijs";
2+
3+
export const getUriWithoutPath = (anyUri: URI) => {
24
if (!anyUri) {
35
return undefined;
46
}

0 commit comments

Comments
 (0)