Skip to content

Commit

Permalink
Fix some lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Aug 8, 2021
1 parent 1d76444 commit 140ad58
Show file tree
Hide file tree
Showing 42 changed files with 169 additions and 127 deletions.
2 changes: 1 addition & 1 deletion build/test/build-tape.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export default function() {
});
});
});
};
}
2 changes: 1 addition & 1 deletion debug/2762.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}
});

map.on('click', function(e) {
map.on('click', function(_) {
map.setPaintProperty("circle", "circle-color", "red");
map.setPaintProperty("circle", "circle-translate", [50, 50]);
});
Expand Down
2 changes: 1 addition & 1 deletion debug/canvas.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
}]
};

var map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
minZoom: 14,
zoom: 17,
Expand Down
2 changes: 1 addition & 1 deletion debug/cluster.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
});
});

map.on('mouseleave', 'cluster', (e) => {
map.on('mouseleave', 'cluster', (_) => {
map.getCanvas().style.cursor = '';
updateHover([]);
});
Expand Down
2 changes: 1 addition & 1 deletion debug/csp-static.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

maplibregl.workerUrl = '/dist/maplibre-gl-csp-worker.js';

var map = window.map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
zoom: 12.5,
center: [-77.01866, 38.888],
Expand Down
2 changes: 1 addition & 1 deletion debug/csp.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script src='../dist/maplibre-gl-dev.js'></script>
<script nonce="dummy">

var map = window.map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
zoom: 12.5,
center: [-77.01866, 38.888],
Expand Down
2 changes: 1 addition & 1 deletion debug/debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
map.on('mouseenter', 'marker', function(e) {
map.setFilter('marker-hover', ['==', 'name', e.features[0].properties.name]);
});
map.on('mouseleave', 'marker', function(e) {
map.on('mouseleave', 'marker', function(_) {
map.setFilter('marker-hover', ['==', 'name', '']);
});

Expand Down
2 changes: 1 addition & 1 deletion debug/image.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}]
};

var map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
minZoom: 14,
zoom: 17,
Expand Down
2 changes: 1 addition & 1 deletion debug/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script src='../dist/maplibre-gl-dev.js'></script>
<script>

var map = window.map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
zoom: 12.5,
center: [-77.01866, 38.888],
Expand Down
2 changes: 1 addition & 1 deletion debug/mobile_scroll.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script src='../dist/maplibre-gl-dev.js'></script>
<script>

var map = window.map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
zoom: 12.5,
center: [-77.01866, 38.888],
Expand Down
2 changes: 1 addition & 1 deletion debug/no_wrap.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script src='../dist/maplibre-gl-dev.js'></script>
<script>

var map = window.map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
zoom: 12.5,
center: [-77.01866, 38.888],
Expand Down
2 changes: 1 addition & 1 deletion debug/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
hash: true
});

var popup = new maplibregl.Popup({closeButton: false, closeOnClick: false})
new maplibregl.Popup({closeButton: false, closeOnClick: false})
.trackPointer()
.setHTML('<h1>Hello World!</h1>')
.addTo(map);
Expand Down
2 changes: 1 addition & 1 deletion debug/raster-streets.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script src='../dist/maplibre-gl-dev.js'></script>
<script>

var map = window.map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
zoom: 12.5,
center: [-77.01866, 38.888],
Expand Down
2 changes: 1 addition & 1 deletion debug/rtl.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// badPluginURL allows us to simulate a NetworkError that we can recover from by retrying plugin loading
var badPluginURL = 'http://localhost:9966/debug/2762.html';
var goodPluginURL = 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js';
var map = window.map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
zoom: 16.5,
center: [44.355435, 33.258814],
Expand Down
2 changes: 1 addition & 1 deletion debug/satellite.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script src='../dist/maplibre-gl-dev.js'></script>
<script>

var map = window.map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
zoom: 12.5,
center: [-77.01866, 38.888],
Expand Down
2 changes: 1 addition & 1 deletion debug/token.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
var mapToken = maplibregl.accessToken;
maplibregl.accessToken = 'notAToken';

var map = window.map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
zoom: 12.5,
center: [-77.01866, 38.888],
Expand Down
2 changes: 1 addition & 1 deletion debug/variable-anchor-with-icon-text-fit.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
}]
};

var map = window.map = new maplibregl.Map({
new maplibregl.Map({
container: 'map',
style
});
Expand Down
110 changes: 87 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@
"ejs": "^2.5.7",
"eslint": "^7.15.0",
"eslint-config-mourner": "^3.0.0",
"eslint-plugin-html": "^5.0.5",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^30.7.8",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-html": "^6.1.2",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsdoc": "^36.0.6",
"eslint-plugin-react": "^7.24.0",
"gl": "^4.5.3",
"glob": "^7.1.4",
"is-builtin-module": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions test/build/min.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path, {dirname} from 'path';
import reference from '../../rollup/build/tsc/style-spec/reference/latest';
import packageJson from '../../package.json';
import browserify from 'browserify';
import { fileURLToPath } from 'url';
import {fileURLToPath} from 'url';

const __dirname = dirname(fileURLToPath(import.meta.url));
const minBundle = fs.readFileSync('dist/maplibre-gl.js', 'utf8');
Expand Down Expand Up @@ -47,7 +47,7 @@ test('evaluates without errors', async (t) => {
global.performance = {};
global.navigator = {};
try {
await import ('../../dist/maplibre-gl.js');
await import('../../dist/maplibre-gl.js');
} catch (e) {
t.error(e);
}
Expand Down
7 changes: 0 additions & 7 deletions test/build/style-spec.test.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import fs from 'fs';
import isBuiltin from 'is-builtin-module';

import {Linter} from 'eslint';
import * as rollup from 'rollup';

import {test} from '../util/test';
import rollupConfig from '../../rollup.config.style-spec';
import styleSpecPackage from '../../src/style-spec/package.json';
import * as spec from '../../dist/style-spec/index.es.js';


const styleSpecDistBundle = fs.readFileSync('./dist/style-spec/index.js', 'utf-8');

test('@mapbox/mapbox-gl-style-spec npm package', (t) => {
t.test('build plain ES5 bundle in prepublish', (t) => {
t.stub(console, 'warn');
Expand Down
4 changes: 2 additions & 2 deletions test/integration/lib/expression.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import path, { dirname } from 'path';
import path, {dirname} from 'path';
import * as diff from 'diff';
import fs from 'fs';
import harness from './harness';
import compactStringify from 'json-stringify-pretty-compact';
import { fileURLToPath } from 'url';
import {fileURLToPath} from 'url';

const __dirname = dirname(fileURLToPath(import.meta.url));

Expand Down
6 changes: 3 additions & 3 deletions test/integration/lib/generate-fixture-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import localizeURLs from './localize-urls.js';
const OUTPUT_FILE = 'fixtures.json';

export default {
generateFixtureJson: generateFixtureJson,
getAllFixtureGlobs: getAllFixtureGlobs
}
generateFixtureJson,
getAllFixtureGlobs
};

/**
* Analyzes the contents of the specified `path.join(rootDirectory, suiteDirectory)`, and inlines
Expand Down
Loading

0 comments on commit 140ad58

Please sign in to comment.