Skip to content

Commit 23b379b

Browse files
iamkritika-officialrahulkumaar03DennisOSRMCopilot
authored
fix: replace Browserify with Webpack to resolve security vulnerabilities (#399)
* fix: replace Browserify with Webpack to resolve security vulnerabilities * fix: add clean script and update start scripts - Add 'clean' script to remove stale bundle.raw.js artifact - Update 'build' script to run clean before replace and compile - Replace deprecated budo/bistre with webpack-dev-server for development - Add webpack-dev-server to devDependencies - Simplify start-prod to just run build - Configure webpack-dev-server to serve static files from project root Prevents stale Browserify output from being confused with active build artifacts. Addresses reviewer feedback on PR #399 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Migrate ESLint to v9+ flat config format - Replace .eslintrc (deprecated) with eslint.config.js - Move ignore patterns from .eslintignore to ignores property - Update languageOptions with proper globals for Node and browser - Add type: module to package.json to eliminate Node warnings This resolves ESLint v10.2.0 compatibility issues. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove unused no-eq-null eslint-disable directive The directive on line 2 was unused since the actual comparisons with null already have their own disable comments on lines 6 and 14. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove type: module from package.json Adding type: module breaks CommonJS scripts used in the build process. ESLint can handle eslint.config.js as ESM without the type field. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Rename eslint.config.js to eslint.config.mjs Using .mjs extension explicitly marks the file as an ES module, eliminating the MODULE_TYPELESS_PACKAGE_JSON warning without requiring type: module in package.json (which breaks build scripts). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: rahulkumaar03 <techieeboy04@gmail.com> Co-authored-by: Dennis Luxen <ich@dennisluxen.de> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e1710c5 commit 23b379b

File tree

8 files changed

+6943
-13552
lines changed

8 files changed

+6943
-13552
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc

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

bundle.js.LICENSE.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* @preserve
2+
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
3+
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4+
*/
5+
6+
/* @preserve
7+
* Leaflet Control Geocoder
8+
* https://github.com/perliedman/leaflet-control-geocoder
9+
*
10+
* Copyright (c) 2012 sa3m (https://github.com/sa3m)
11+
* Copyright (c) 2018 Per Liedman
12+
* All rights reserved.
13+
*/

eslint.config.mjs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import js from '@eslint/js';
2+
3+
export default [
4+
{
5+
ignores: ['node_modules/**', 'bundle*.js', 'dist/**', 'debug/**']
6+
},
7+
{
8+
files: ['src/**/*.js', 'i18n/**/*.js'],
9+
languageOptions: {
10+
ecmaVersion: 2021,
11+
sourceType: 'module',
12+
globals: {
13+
L: 'readonly',
14+
// Node globals
15+
global: 'readonly',
16+
process: 'readonly',
17+
Buffer: 'readonly',
18+
__dirname: 'readonly',
19+
__filename: 'readonly',
20+
// Browser globals
21+
window: 'readonly',
22+
document: 'readonly',
23+
navigator: 'readonly',
24+
console: 'readonly'
25+
}
26+
},
27+
rules: {
28+
indent: [2, 2],
29+
'comma-dangle': [2, 'never'],
30+
'space-before-blocks': 2,
31+
'keyword-spacing': 2,
32+
'space-unary-ops': 2,
33+
'no-use-before-define': [2, 'nofunc'],
34+
camelcase: 0,
35+
'comma-style': 2,
36+
eqeqeq: 0,
37+
'new-cap': 2,
38+
'no-new': 2,
39+
'brace-style': 2,
40+
'no-multi-spaces': 0,
41+
'no-underscore-dangle': 0,
42+
'no-self-compare': 2,
43+
'no-void': 2,
44+
'no-eq-null': 2,
45+
quotes: 0,
46+
curly: 0,
47+
'dot-notation': 0,
48+
'no-shadow': 0,
49+
'no-alert': 0,
50+
'consistent-return': 0
51+
}
52+
}
53+
];

0 commit comments

Comments
 (0)