mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-23 00:34:55 +00:00
Upgrade to ESLint 9+ and flat config (#9410)
This commit is contained in:

committed by
GitHub

parent
688033d412
commit
54f49b5bd4
@ -1,10 +0,0 @@
|
||||
/** @type {import('eslint').Linter.Config } */
|
||||
module.exports = {
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
'no-unused-expressions': 'off'
|
||||
},
|
||||
env: {
|
||||
mocha: true,
|
||||
}
|
||||
};
|
@ -67,7 +67,6 @@ module.exports = function (/** @type {import('karma').Config} */ config) {
|
||||
browserConsoleLogOptions: {level: 'error'},
|
||||
client: {
|
||||
mocha: {
|
||||
// eslint-disable-next-line no-undef
|
||||
forbidOnly: process.env.CI || false
|
||||
}
|
||||
}
|
||||
|
@ -602,9 +602,8 @@ describe('DomEvent', () => {
|
||||
function isPrevented(e) {
|
||||
if ('defaultPrevented' in e) {
|
||||
return e.defaultPrevented;
|
||||
} else { // IE<11
|
||||
return !e.returnValue;
|
||||
}
|
||||
return !e.returnValue; // IE<11
|
||||
}
|
||||
|
||||
it('prevents the default action of event', (done) => {
|
||||
|
@ -127,7 +127,7 @@ describe('DomUtil', () => {
|
||||
expect(el.style.transform).to.equal('translate3d(1px, 1px, 0px)');
|
||||
});
|
||||
|
||||
it('set 3d CSS transform to translate3d(0px, 0px, 0) and add to it scale(${scalevalue}) if only scale is specified', () => {
|
||||
it('set 3d CSS transform to translate3d(0px, 0px, 0) and add to it scale(<scalevalue>) if only scale is specified', () => {
|
||||
DomUtil.setTransform(el, undefined, 5);
|
||||
expect(el.style.transform).to.equal('translate3d(0px, 0px, 0px) scale(5)');
|
||||
});
|
||||
|
@ -578,9 +578,8 @@ describe('GridLayer', () => {
|
||||
map.fire('_frame');
|
||||
Util.requestAnimFrame(_runFrames(n - 1));
|
||||
};
|
||||
} else {
|
||||
return Util.falseFn;
|
||||
}
|
||||
return Util.falseFn;
|
||||
}
|
||||
|
||||
it('Loads 32, unloads 16 tiles zooming in 10-11', (done) => {
|
||||
|
@ -202,9 +202,8 @@ describe('TileLayer', () => {
|
||||
map.fire('_frame');
|
||||
Util.requestAnimFrame(_runFrames(n - 1));
|
||||
};
|
||||
} else {
|
||||
return Util.falseFn;
|
||||
}
|
||||
return Util.falseFn;
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
|
Reference in New Issue
Block a user