Skip to content

Commit 969d5cd

Browse files
authored
Update Node Deps (#6283)
1 parent 6d77d9d commit 969d5cd

File tree

4 files changed

+1979
-1029
lines changed

4 files changed

+1979
-1029
lines changed

assets/js/phoenix/ajax.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export default class Ajax {
1414
return this.xhrRequest(req, method, endPoint, headers, body, timeout, ontimeout, callback)
1515
} else if(global.fetch && global.AbortController){
1616
// Fetch with AbortController for modern browsers
17-
return this.fetchRequest(method, endPoint, headers, body, timeout, ontimeout, callback);
17+
return this.fetchRequest(method, endPoint, headers, body, timeout, ontimeout, callback)
1818
} else {
19-
throw new Error("No suitable XMLHttpRequest implementation found");
19+
throw new Error("No suitable XMLHttpRequest implementation found")
2020
}
2121
}
2222

@@ -25,25 +25,25 @@ export default class Ajax {
2525
method,
2626
headers,
2727
body,
28-
};
29-
let controller = null;
28+
}
29+
let controller = null
3030
if(timeout){
31-
controller = new AbortController();
32-
const timeoutId = setTimeout(() => controller.abort(), timeout);
33-
options.signal = controller.signal;
31+
controller = new AbortController()
32+
const _timeoutId = setTimeout(() => controller.abort(), timeout)
33+
options.signal = controller.signal
3434
}
3535
global.fetch(endPoint, options)
3636
.then(response => response.text())
3737
.then(data => this.parseJSON(data))
3838
.then(data => callback && callback(data))
3939
.catch(err => {
4040
if(err.name === "AbortError" && ontimeout){
41-
ontimeout();
41+
ontimeout()
4242
} else {
43-
callback && callback(null);
43+
callback && callback(null)
4444
}
45-
});
46-
return controller;
45+
})
46+
return controller
4747
}
4848

4949
static xdomainRequest(req, method, endPoint, body, timeout, ontimeout, callback){

eslint.config.mjs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import jest from "eslint-plugin-jest"
22
import js from "@eslint/js"
3-
import stylisticJs from "@stylistic/eslint-plugin-js"
3+
import stylistic from "@stylistic/eslint-plugin"
44

55
export default [
66
{
@@ -24,7 +24,7 @@ export default [
2424

2525
plugins: {
2626
jest,
27-
"@stylistic/js": stylisticJs
27+
"@stylistic": stylistic
2828
},
2929

3030
languageOptions: {
@@ -38,35 +38,35 @@ export default [
3838
},
3939

4040
rules: {
41-
"@stylistic/js/indent": ["error", 2, {
41+
"@stylistic/indent": ["error", 2, {
4242
SwitchCase: 1,
4343
}],
4444

45-
"@stylistic/js/linebreak-style": ["error", "unix"],
46-
"@stylistic/js/quotes": ["error", "double"],
47-
"@stylistic/js/semi": ["error", "never"],
45+
"@stylistic/linebreak-style": ["error", "unix"],
46+
"@stylistic/quotes": ["error", "double"],
47+
"@stylistic/semi": ["error", "never"],
4848

49-
"@stylistic/js/object-curly-spacing": ["error", "never", {
49+
"@stylistic/object-curly-spacing": ["error", "never", {
5050
objectsInObjects: false,
5151
arraysInObjects: false,
5252
}],
5353

54-
"@stylistic/js/array-bracket-spacing": ["error", "never"],
54+
"@stylistic/array-bracket-spacing": ["error", "never"],
5555

56-
"@stylistic/js/comma-spacing": ["error", {
56+
"@stylistic/comma-spacing": ["error", {
5757
before: false,
5858
after: true,
5959
}],
6060

61-
"@stylistic/js/computed-property-spacing": ["error", "never"],
61+
"@stylistic/computed-property-spacing": ["error", "never"],
6262

63-
"@stylistic/js/space-before-blocks": ["error", {
63+
"@stylistic/space-before-blocks": ["error", {
6464
functions: "never",
6565
keywords: "never",
6666
classes: "always",
6767
}],
6868

69-
"@stylistic/js/keyword-spacing": ["error", {
69+
"@stylistic/keyword-spacing": ["error", {
7070
overrides: {
7171
if: {
7272
after: false,
@@ -86,7 +86,7 @@ export default [
8686
},
8787
}],
8888

89-
"@stylistic/js/eol-last": ["error", "always"],
89+
"@stylistic/eol-last": ["error", "always"],
9090

9191
"no-unused-vars": ["error", {
9292
argsIgnorePattern: "^_",

0 commit comments

Comments
 (0)