mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-29 15:16:07 +02:00
Merge branch 'openstreetmap:develop' into add-button-to-mapillary
This commit is contained in:
@@ -1,109 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"es6": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended"
|
||||
],
|
||||
"globals": {
|
||||
"d3": false
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"accessor-pairs": "error",
|
||||
"array-callback-return": "warn",
|
||||
"arrow-spacing": "warn",
|
||||
"block-scoped-var": "error",
|
||||
"block-spacing": ["warn", "always"],
|
||||
"brace-style": ["warn", "1tbs", { "allowSingleLine": true }],
|
||||
"complexity": ["warn", 50],
|
||||
"curly": ["warn", "multi-line"],
|
||||
"default-case-last": "error",
|
||||
"default-param-last": "error",
|
||||
"dot-notation": "error",
|
||||
"eqeqeq": ["error", "smart"],
|
||||
"func-call-spacing": ["warn", "never"],
|
||||
"grouped-accessor-pairs": "error",
|
||||
"indent": ["off", 4],
|
||||
"keyword-spacing": "error",
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"no-await-in-loop": "error",
|
||||
"no-caller": "error",
|
||||
"no-catch-shadow": "error",
|
||||
"no-console": "warn",
|
||||
"no-constructor-return": "error",
|
||||
"no-div-regex": "error",
|
||||
"no-duplicate-imports": "warn",
|
||||
"no-eq-null": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-floating-decimal": "error",
|
||||
"no-global-assign": "error",
|
||||
"no-implicit-coercion": ["warn", { "boolean": false, "number": false }],
|
||||
"no-implied-eval": "error",
|
||||
"no-invalid-this": "off",
|
||||
"no-iterator": "error",
|
||||
"no-labels": "error",
|
||||
"no-label-var": "error",
|
||||
"no-lone-blocks": "error",
|
||||
"no-loop-func": "error",
|
||||
"no-loss-of-precision": "error",
|
||||
"no-multi-str": "error",
|
||||
"no-new": "error",
|
||||
"no-new-func": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-process-env": "error",
|
||||
"no-promise-executor-return": "error",
|
||||
"no-proto": "error",
|
||||
"no-prototype-builtins": "off",
|
||||
"no-restricted-properties": "error",
|
||||
"no-return-assign": "off",
|
||||
"no-return-await": "error",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "error",
|
||||
"no-shadow": "off",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-template-curly-in-string": "warn",
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "warn",
|
||||
"no-undef": "error",
|
||||
"no-undef-init": "warn",
|
||||
"no-unexpected-multiline": "error",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unreachable": "warn",
|
||||
"no-unreachable-loop": "warn",
|
||||
"no-unused-expressions": "error",
|
||||
"no-unused-vars": "warn",
|
||||
"no-use-before-define": ["off", "nofunc"],
|
||||
"no-useless-backreference": "warn",
|
||||
"no-useless-call": "warn",
|
||||
"no-useless-computed-key": "warn",
|
||||
"no-useless-concat": "warn",
|
||||
"no-useless-constructor": "warn",
|
||||
"no-useless-escape": "off",
|
||||
"no-useless-rename": "warn",
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "warn",
|
||||
"no-whitespace-before-property": "warn",
|
||||
"no-with": "error",
|
||||
"quotes": ["error", "single"],
|
||||
"radix": ["error", "always"],
|
||||
"require-atomic-updates": "error",
|
||||
"require-await": "error",
|
||||
"semi": ["error", "always"],
|
||||
"semi-spacing": "error",
|
||||
"space-unary-ops": "error",
|
||||
"wrap-regex": "off"
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -46,7 +46,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
* Show Mapillary username and deep link to external viewer on Mapillary photos ([#10135], thanks [@Sushil642])
|
||||
#### :white_check_mark: Validation
|
||||
* Drop validation which checks for [old style multipolygons](https://wiki.openstreetmap.org/wiki/Old_style_multipolygons), as these have long been [fixed](https://blog.jochentopf.com/2017-08-28-polygon-fixing-effort-concluded.html) in OSM
|
||||
* Upgrade closed ways with `traffic_calming=island` to `area:highway=traffic_calming` ([id-tagging-schema#1162])
|
||||
* Upgrade closed ways with `traffic_calming=island` to `area:highway=traffic_island` ([id-tagging-schema#1162])
|
||||
#### :bug: Bugfixes
|
||||
* Prevent (route) relations from getting corrupted while splitting their way members in certain conditions ([#7653], [#8415])
|
||||
* Fix overflowing UI input elements of maxheight field when in imperial units mode on Firefox ([#10175], thanks [@1ec5])
|
||||
|
||||
+2
-1
@@ -228,10 +228,11 @@ new language: it's replaced with a place name when iD presents the text. So a
|
||||
French translation of `Couldn't locate a place named '{name}'` would look like
|
||||
`Impossible de localiser l'endroit nommé '{name}'`.
|
||||
|
||||
The translations for presets consist of the names of presets, labels for
|
||||
The translations for presets, [maintained in the id-tagging-schema repository](https://github.com/openstreetmap/id-tagging-schema), consist of the names of presets, labels for
|
||||
preset fields, and lists of search terms. You do _not_ need to translate the
|
||||
search terms literally -- use a set of synonyms and related terms appropriate
|
||||
to the target language, separated by commas.
|
||||
For more information on translating the presets [please see this id-tagging-schema contribution guide](https://github.com/openstreetmap/id-tagging-schema/blob/main/CONTRIBUTING.md#translating).
|
||||
|
||||
You can check your translations on the [development preview site](https://ideditor.netlify.app),
|
||||
which is updated every time we change the `develop` branch.
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
import js from '@eslint/js';
|
||||
import globals from 'globals';
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
{
|
||||
files: ['**/*.js', '**/*.mjs'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.es6
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'accessor-pairs': 'error',
|
||||
'array-callback-return': 'warn',
|
||||
'arrow-spacing': 'warn',
|
||||
'block-scoped-var': 'error',
|
||||
'block-spacing': ['warn', 'always'],
|
||||
'brace-style': ['warn', '1tbs', { 'allowSingleLine': true }],
|
||||
'complexity': ['warn', 50],
|
||||
'curly': ['warn', 'multi-line'],
|
||||
'default-case-last': 'error',
|
||||
'default-param-last': 'error',
|
||||
'dot-notation': 'error',
|
||||
'eqeqeq': ['error', 'smart'],
|
||||
'func-call-spacing': ['warn', 'never'],
|
||||
'grouped-accessor-pairs': 'error',
|
||||
'indent': ['off', 4],
|
||||
'keyword-spacing': 'error',
|
||||
'linebreak-style': ['error', 'unix'],
|
||||
'no-await-in-loop': 'error',
|
||||
'no-caller': 'error',
|
||||
'no-catch-shadow': 'error',
|
||||
'no-console': 'warn',
|
||||
'no-constructor-return': 'error',
|
||||
'no-div-regex': 'error',
|
||||
'no-duplicate-imports': 'warn',
|
||||
'no-eq-null': 'error',
|
||||
'no-eval': 'error',
|
||||
'no-extend-native': 'error',
|
||||
'no-extra-bind': 'error',
|
||||
'no-extra-label': 'error',
|
||||
'no-floating-decimal': 'error',
|
||||
'no-global-assign': 'error',
|
||||
'no-implicit-coercion': ['warn', { 'boolean': false, 'number': false }],
|
||||
'no-implied-eval': 'error',
|
||||
'no-invalid-this': 'off',
|
||||
'no-iterator': 'error',
|
||||
'no-labels': 'error',
|
||||
'no-label-var': 'error',
|
||||
'no-lone-blocks': 'error',
|
||||
'no-loop-func': 'error',
|
||||
'no-loss-of-precision': 'error',
|
||||
'no-multi-str': 'error',
|
||||
'no-new': 'error',
|
||||
'no-new-func': 'error',
|
||||
'no-new-wrappers': 'error',
|
||||
'no-octal': 'error',
|
||||
'no-octal-escape': 'error',
|
||||
'no-process-env': 'error',
|
||||
'no-promise-executor-return': 'error',
|
||||
'no-proto': 'error',
|
||||
'no-prototype-builtins': 'off',
|
||||
'no-restricted-properties': 'error',
|
||||
'no-return-assign': 'off',
|
||||
'no-return-await': 'error',
|
||||
'no-script-url': 'error',
|
||||
'no-self-compare': 'error',
|
||||
'no-sequences': 'error',
|
||||
'no-shadow': 'off',
|
||||
'no-shadow-restricted-names': 'error',
|
||||
'no-template-curly-in-string': 'warn',
|
||||
'no-throw-literal': 'error',
|
||||
'no-trailing-spaces': 'warn',
|
||||
'no-undef': 'error',
|
||||
'no-undef-init': 'warn',
|
||||
'no-unexpected-multiline': 'error',
|
||||
'no-unneeded-ternary': 'error',
|
||||
'no-unmodified-loop-condition': 'error',
|
||||
'no-unreachable': 'warn',
|
||||
'no-unreachable-loop': 'warn',
|
||||
'no-unused-expressions': 'error',
|
||||
'no-unused-vars': 'warn',
|
||||
'no-use-before-define': ['off', 'nofunc'],
|
||||
'no-useless-backreference': 'warn',
|
||||
'no-useless-call': 'warn',
|
||||
'no-useless-computed-key': 'warn',
|
||||
'no-useless-concat': 'warn',
|
||||
'no-useless-constructor': 'warn',
|
||||
'no-useless-escape': 'off',
|
||||
'no-useless-rename': 'warn',
|
||||
'no-void': 'error',
|
||||
'no-warning-comments': 'warn',
|
||||
'no-whitespace-before-property': 'warn',
|
||||
'no-with': 'error',
|
||||
'quotes': ['error', 'single'],
|
||||
'radix': ['error', 'always'],
|
||||
'require-atomic-updates': 'error',
|
||||
'require-await': 'error',
|
||||
'semi': ['error', 'always'],
|
||||
'semi-spacing': 'error',
|
||||
'space-unary-ops': 'error',
|
||||
'wrap-regex': 'off'
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['test/**/*.js', 'test/**/*.mjs'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.es6,
|
||||
...globals.mocha,
|
||||
'd3': 'readonly',
|
||||
'iD': 'readonly',
|
||||
'sinon': 'readonly',
|
||||
'happen': 'readonly',
|
||||
'fetchMock': 'readonly',
|
||||
'expect': 'writable'
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'no-unused-expressions': 'off'
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['scripts/**/*.js', 'scripts/**/*.mjs', 'config/**/*.js', 'config/**/*.mjs'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.es6
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -497,7 +497,7 @@ export function behaviorDrawWay(context, wayID, mode, startGraph) {
|
||||
id: nextNode.id,
|
||||
properties: { target: true, entity: nextNode },
|
||||
});
|
||||
} catch (ex) {
|
||||
} catch {
|
||||
context.ui().flash
|
||||
.duration(4000)
|
||||
.iconName('#iD-icon-no')
|
||||
|
||||
@@ -109,7 +109,7 @@ export class LocationManager {
|
||||
|
||||
this._knownLocationSets.set(locationSetID, area);
|
||||
|
||||
} catch (err) {
|
||||
} catch {
|
||||
obj.locationSet = { include: ['Q2'] }; // default worldwide
|
||||
obj.locationSetID = '+[Q2]';
|
||||
}
|
||||
@@ -144,7 +144,7 @@ export class LocationManager {
|
||||
geojson.properties.id = locationSetID;
|
||||
this._resolved.set(locationSetID, geojson);
|
||||
|
||||
} catch (err) {
|
||||
} catch {
|
||||
obj.locationSet = { include: ['Q2'] }; // default worldwide
|
||||
obj.locationSetID = '+[Q2]';
|
||||
}
|
||||
@@ -244,7 +244,7 @@ export class LocationManager {
|
||||
let locationSetID;
|
||||
try {
|
||||
locationSetID = _loco.validateLocationSet(locationSet).id;
|
||||
} catch (err) {
|
||||
} catch {
|
||||
locationSetID = '+[Q2]'; // the world
|
||||
}
|
||||
return locationSetID;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// https://github.com/openstreetmap/iD/issues/772
|
||||
// http://mathiasbynens.be/notes/localstorage-pattern#comment-9
|
||||
let _storage;
|
||||
try { _storage = localStorage; } catch (e) {} // eslint-disable-line no-empty
|
||||
try { _storage = localStorage; } catch {} // eslint-disable-line no-empty
|
||||
_storage = _storage || (() => {
|
||||
let s = {};
|
||||
return {
|
||||
@@ -32,7 +32,7 @@ function corePreferences(k, v) {
|
||||
_listeners[k].forEach(handler => handler(v));
|
||||
}
|
||||
return true;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
/* eslint-disable no-console */
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error('localStorage quota exceeded');
|
||||
|
||||
@@ -1030,7 +1030,7 @@ export default {
|
||||
try {
|
||||
var regex = new RegExp(regexString);
|
||||
regexes.push(regex);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
/* noop */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ export function svgLocalPhotos(projection, context, dispatch) {
|
||||
_photos.push(photo);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
} catch {
|
||||
// skip files which are not a supported image file
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ export function uiFieldText(field, context) {
|
||||
if (field.type === 'url' && value) {
|
||||
try {
|
||||
return (new URL(value)).href;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+381
-308
File diff suppressed because it is too large
Load Diff
+12
-12
@@ -33,8 +33,8 @@
|
||||
"dist:svg:roentgen": "svg-sprite --shape-id-generator \"roentgen-%s\" --shape-dim-width 16 --shape-dim-height 16 --symbol --symbol-dest . --symbol-sprite dist/img/roentgen-sprite.svg svg/roentgen/*.svg",
|
||||
"dist:svg:temaki": "svg-sprite --symbol --symbol-dest . --shape-id-generator \"temaki-%s\" --symbol-sprite dist/img/temaki-sprite.svg node_modules/@rapideditor/temaki/icons/*.svg",
|
||||
"imagery": "node scripts/update_imagery.js",
|
||||
"lint": "eslint config scripts test/spec modules --ext js,mjs",
|
||||
"lint:fix": "eslint scripts test/spec modules --fix",
|
||||
"lint": "eslint config scripts test/spec modules -c config/eslint.config.mjs",
|
||||
"lint:fix": "eslint scripts test/spec modules -c config/eslint.config.mjs --fix",
|
||||
"start": "run-s start:watch",
|
||||
"start:single-build": "run-p build:js start:server",
|
||||
"start:watch": "run-p build:js:watch start:server",
|
||||
@@ -72,16 +72,16 @@
|
||||
"which-polygon": "2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "~6.5.1",
|
||||
"@fortawesome/free-brands-svg-icons": "~6.5.1",
|
||||
"@fortawesome/free-regular-svg-icons": "~6.5.1",
|
||||
"@fortawesome/free-solid-svg-icons": "~6.5.1",
|
||||
"@fortawesome/fontawesome-svg-core": "~6.5.2",
|
||||
"@fortawesome/free-brands-svg-icons": "~6.5.2",
|
||||
"@fortawesome/free-regular-svg-icons": "~6.5.2",
|
||||
"@fortawesome/free-solid-svg-icons": "~6.5.2",
|
||||
"@mapbox/maki": "^8.0.1",
|
||||
"@openstreetmap/id-tagging-schema": "^6.7.2",
|
||||
"@openstreetmap/id-tagging-schema": "^6.7.3",
|
||||
"@rapideditor/mapillary_sprite_source": "^1.8.0",
|
||||
"@rapideditor/temaki": "^5.8.0",
|
||||
"@transifex/api": "^7.1.0",
|
||||
"autoprefixer": "^10.4.18",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"browserslist": "^4.23.0",
|
||||
"browserslist-to-esbuild": "^2.1.1",
|
||||
"chai": "^4.4.1",
|
||||
@@ -94,10 +94,10 @@
|
||||
"editor-layer-index": "github:osmlab/editor-layer-index#gh-pages",
|
||||
"esbuild": "^0.20.2",
|
||||
"esbuild-visualizer": "^0.6.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint": "^9.0.0",
|
||||
"fetch-mock": "^9.11.0",
|
||||
"gaze": "^1.1.3",
|
||||
"glob": "^10.3.10",
|
||||
"glob": "^10.3.12",
|
||||
"happen": "^0.3.2",
|
||||
"js-yaml": "^4.0.0",
|
||||
"json-stringify-pretty-compact": "^3.0.0",
|
||||
@@ -108,7 +108,7 @@
|
||||
"karma-remap-istanbul": "^0.6.0",
|
||||
"mapillary-js": "4.1.2",
|
||||
"minimist": "^1.2.8",
|
||||
"mocha": "^10.3.0",
|
||||
"mocha": "^10.4.0",
|
||||
"name-suggestion-index": "~6.0",
|
||||
"npm-run-all": "^4.0.0",
|
||||
"osm-community-index": "~5.6.2",
|
||||
@@ -120,7 +120,7 @@
|
||||
"sinon-chai": "^3.7.0",
|
||||
"smash": "0.0",
|
||||
"static-server": "^2.2.1",
|
||||
"svg-sprite": "2.0.3",
|
||||
"svg-sprite": "2.0.4",
|
||||
"vparse": "~1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-console */
|
||||
/* Downloads the latest translations from Transifex */
|
||||
const fs = require('fs');
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-console */
|
||||
const fs = require('fs');
|
||||
const prettyStringify = require('json-stringify-pretty-compact');
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"mocha": true
|
||||
},
|
||||
"globals": {
|
||||
"expect": true,
|
||||
"fakeFetch": true,
|
||||
"happen": false,
|
||||
"iD": false,
|
||||
"sinon": false,
|
||||
"fetchMock": true
|
||||
},
|
||||
"rules": {
|
||||
"no-unused-expressions": "off"
|
||||
}
|
||||
}
|
||||
@@ -562,7 +562,7 @@ describe('maprules', function() {
|
||||
|
||||
expect(issues.length).to.eql(1);
|
||||
expect(issue.entityIds).to.eql([entity.id]);
|
||||
expect(issue.message(context)).to.eql(selector[type]);
|
||||
expect(issue.message(iD.coreContext())).to.eql(selector[type]);
|
||||
expect(type).to.eql(issue.severity);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -4,7 +4,6 @@ describe('iD.uiCmd', function () {
|
||||
var uaMock = function () { return ua; };
|
||||
|
||||
beforeEach(function() {
|
||||
/* eslint-disable no-global-assign */
|
||||
/* mock userAgent */
|
||||
orig = navigator.__lookupGetter__('userAgent');
|
||||
navigator.__defineGetter__('userAgent', uaMock);
|
||||
@@ -13,7 +12,6 @@ describe('iD.uiCmd', function () {
|
||||
afterEach(function() {
|
||||
/* restore userAgent */
|
||||
navigator.__defineGetter__('userAgent', orig);
|
||||
/* eslint-enable no-global-assign */
|
||||
});
|
||||
|
||||
it('does not overwrite mac keybindings', function () {
|
||||
|
||||
@@ -131,7 +131,7 @@ describe('iD.uiFieldWikipedia', function() {
|
||||
describe('encodeURIAnchorFragment', function() {
|
||||
it('returns an encoded URI anchor fragment', function(done) {
|
||||
var wikipedia = iD.uiFieldWikipedia(field, context).entityIDs([entity.id]);
|
||||
// this can be similarily tested by entering 'Section#Arts, entertainment and media' in the search box before focusing out'
|
||||
// this can be similarly tested by entering 'Section#Arts, entertainment and media' in the search box before focusing out'
|
||||
expect(wikipedia.encodeURIAnchorFragment('Theme?')).to.equal('#Theme%3F');
|
||||
done();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user