Skip to content

Commit

Permalink
⬆️ Update dependencies and migrate eslint from v8 to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
ENT8R committed Oct 10, 2024
1 parent 0a78ed9 commit 68cc02d
Show file tree
Hide file tree
Showing 5 changed files with 1,459 additions and 1,821 deletions.
57 changes: 0 additions & 57 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion assets/boundaries/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const BRING_TO_BACK = [

fetch(BOUNDARIES.JOSM).then(response => response.text()).then(text => {
const geojson = osmtogeojson(
new DOMParser().parseFromString(text)
new DOMParser().parseFromString(text, 'application/xml')
);

geojson.features.forEach((feature, index) => {
Expand Down
60 changes: 60 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import globals from 'globals';
import js from '@eslint/js';

export default [
js.configs.recommended, {
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
semi: 'warn',
'semi-style': 'error',
'semi-spacing': 'warn',
camelcase: 'error',

quotes: ['warn', 'single', {
avoidEscape: true,
allowTemplateLiterals: false,
}],

'brace-style': 'error',
indent: ['error', 2],
'no-eval': 'error',
'no-implied-eval': 'error',

'prefer-const': 'error',
'no-var': 'warn',
'prefer-arrow-callback': 'warn',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'warn',
'template-curly-spacing': 'warn',
'symbol-description': 'error',
'object-shorthand': 'warn',
'prefer-promise-reject-errors': 'error',
'prefer-destructuring': 'warn',
'prefer-numeric-literals': 'warn',

'no-new-object': 'error',
eqeqeq: ['error', 'smart'],
curly: ['error', 'all'],
'dot-location': ['error', 'property'],
'dot-notation': 'error',
'no-array-constructor': 'error',
'no-throw-literal': 'error',
'no-self-compare': 'error',
'no-useless-call': 'warn',
'spaced-comment': 'warn',
'no-multi-spaces': 'warn',
'no-new-wrappers': 'error',
'no-script-url': 'error',
'no-void': 'warn',
'vars-on-top': 'warn',
'require-await': 'warn'
}
}];
Loading

0 comments on commit 68cc02d

Please sign in to comment.