Skip to content

Commit f4ac49b

Browse files
committed
Bump all dependencies (including eslint, new config file format)
1 parent 44e3703 commit f4ac49b

File tree

4 files changed

+126
-68
lines changed

4 files changed

+126
-68
lines changed

.eslintrc

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

eslint.config.js

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
4+
const common = {
5+
rules: {
6+
"accessor-pairs": "error",
7+
"array-callback-return": "warn",
8+
"arrow-spacing": "warn",
9+
"block-scoped-var": "error",
10+
"block-spacing": ["warn", "always"],
11+
"brace-style": ["warn", "1tbs", { "allowSingleLine": true }],
12+
"complexity": ["warn", 50],
13+
"curly": ["warn", "multi-line"],
14+
"default-case-last": "error",
15+
"default-param-last": "error",
16+
"dot-notation": "error",
17+
"eqeqeq": ["error", "smart"],
18+
"func-call-spacing": ["warn", "never"],
19+
"grouped-accessor-pairs": "error",
20+
"indent": ["off", 4],
21+
"keyword-spacing": "error",
22+
"linebreak-style": ["error", "unix"],
23+
"no-await-in-loop": "error",
24+
"no-caller": "error",
25+
"no-catch-shadow": "error",
26+
"no-console": "warn",
27+
"no-constructor-return": "error",
28+
"no-div-regex": "error",
29+
"no-duplicate-imports": "warn",
30+
"no-eq-null": "error",
31+
"no-eval": "error",
32+
"no-extend-native": "error",
33+
"no-extra-bind": "error",
34+
"no-extra-label": "error",
35+
"no-floating-decimal": "error",
36+
"no-global-assign": "error",
37+
"no-implied-eval": "error",
38+
"no-invalid-this": "off",
39+
"no-iterator": "error",
40+
"no-labels": "error",
41+
"no-label-var": "error",
42+
"no-lone-blocks": "error",
43+
"no-loop-func": "error",
44+
"no-loss-of-precision": "error",
45+
"no-multi-str": "error",
46+
"no-new": "error",
47+
"no-new-func": "error",
48+
"no-new-wrappers": "error",
49+
"no-octal": "error",
50+
"no-octal-escape": "error",
51+
"no-process-env": "error",
52+
"no-promise-executor-return": "error",
53+
"no-proto": "error",
54+
"no-prototype-builtins": "off",
55+
"no-restricted-properties": "error",
56+
"no-return-assign": "off",
57+
"no-return-await": "error",
58+
"no-script-url": "error",
59+
"no-self-compare": "error",
60+
"no-sequences": "error",
61+
"no-shadow": "off",
62+
"no-shadow-restricted-names": "error",
63+
"no-template-curly-in-string": "warn",
64+
"no-throw-literal": "error",
65+
"no-trailing-spaces": "warn",
66+
"no-undef": "error",
67+
"no-undef-init": "warn",
68+
"no-unexpected-multiline": "error",
69+
"no-unneeded-ternary": "error",
70+
"no-unmodified-loop-condition": "error",
71+
"no-unreachable": "warn",
72+
"no-unreachable-loop": "warn",
73+
"no-unused-expressions": "error",
74+
"no-unused-vars": ["warn", { "vars": "all", "args": "none", "caughtErrors": "none" }],
75+
"no-use-before-define": ["off", "nofunc"],
76+
"no-useless-backreference": "warn",
77+
"no-useless-call": "warn",
78+
"no-useless-computed-key": "warn",
79+
"no-useless-concat": "warn",
80+
"no-useless-constructor": "off",
81+
"no-useless-escape": "off",
82+
"no-useless-rename": "warn",
83+
"no-void": "error",
84+
"no-warning-comments": "warn",
85+
"no-whitespace-before-property": "warn",
86+
"no-with": "error",
87+
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
88+
"radix": ["error", "always"],
89+
"require-atomic-updates": "error",
90+
"require-await": "error",
91+
"semi": ["error", "always"],
92+
"semi-spacing": "error",
93+
"space-unary-ops": "error",
94+
"wrap-regex": "off"
95+
}
96+
};
97+
98+
99+
export default [
100+
js.configs.recommended,
101+
common,
102+
103+
{
104+
files: ['src/**'],
105+
languageOptions: {
106+
globals: {
107+
...globals.browser,
108+
Intl: false
109+
}
110+
}
111+
},
112+
{
113+
files: ['test/**'],
114+
languageOptions: {
115+
globals: {
116+
...globals.node
117+
}
118+
}
119+
}
120+
];

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@
3636
"test:node": "c8 node --test test/"
3737
},
3838
"devDependencies": {
39-
"c8": "^9.0.0",
40-
"esbuild": "^0.19.11",
41-
"eslint": "^8.56.0",
39+
"c8": "^9.1.0",
40+
"esbuild": "^0.20.2",
41+
"eslint": "^9.1.1",
42+
"globals": "^15.0.0",
4243
"http-server": "^14.1.1",
4344
"node-localstorage": "^3.0.5",
4445
"npm-run-all": "^4.1.5",
4546
"shx": "^0.3.4"
4647
},
4748
"engines": {
48-
"node": ">=18"
49+
"node": ">=18.18"
4950
}
5051
}

src/osm-auth.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export function osmAuth(o) {
237237
window.authComplete = function (url) {
238238
var params = utilStringQs(url.split('?')[1]);
239239
if (params.state !== state) {
240-
error = new Error('Invalid state');
240+
var error = new Error('Invalid state');
241241
error.status = 'invalid-state';
242242
callback(error);
243243
return;

0 commit comments

Comments
 (0)