Fix prettier pattern (#1554)

This commit is contained in:
Jonatan Kłosko 2022-11-30 00:26:28 +01:00 committed by GitHub
parent a9d455d377
commit 24f4d78cc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 25 deletions

View file

@ -21,7 +21,7 @@ jobs:
otp-version: ${{ env.otp }}
elixir-version: ${{ env.elixir }}
- name: Cache Mix
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
deps
@ -33,11 +33,11 @@ jobs:
- name: Install mix dependencies
run: mix deps.get
- name: Install Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "14.x"
node-version: "18.x"
- name: Cache npm dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

View file

@ -21,7 +21,7 @@ jobs:
otp-version: ${{ env.otp }}
elixir-version: ${{ env.elixir }}
- name: Cache Mix
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
deps
@ -38,11 +38,11 @@ jobs:
- name: Run tests
run: mix test
- name: Install Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "14.x"
node-version: "18.x"
- name: Cache npm dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@ -77,7 +77,7 @@ jobs:
run: |
"C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Cache Mix
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
deps
@ -98,12 +98,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Cache Mix Deps
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Cache Bootstrap
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: tmp
key: ${{ runner.os }}-app-${{ hashFiles('.github/scripts/app/bootstrap_mac.sh') }}

View file

@ -21,17 +21,21 @@ const csrfToken = document
.querySelector("meta[name='csrf-token']")
.getAttribute("content");
const liveSocket = new LiveSocket(window.LIVEBOOK_BASE_URL_PATH + "/live", Socket, {
params: (liveViewName) => {
return {
_csrf_token: csrfToken,
// Pass the most recent user data to the LiveView in `connect_params`
user_data: loadUserData(),
};
},
hooks: hooks,
dom: morphdomOptions,
});
const liveSocket = new LiveSocket(
window.LIVEBOOK_BASE_URL_PATH + "/live",
Socket,
{
params: (liveViewName) => {
return {
_csrf_token: csrfToken,
// Pass the most recent user data to the LiveView in `connect_params`
user_data: loadUserData(),
};
},
hooks: hooks,
dom: morphdomOptions,
}
);
// Show progress bar on live navigation and form submits
registerTopbar();

View file

@ -4,7 +4,9 @@ const csrfToken = document
.querySelector("meta[name='csrf-token']")
.getAttribute("content");
const socket = new Socket(window.LIVEBOOK_BASE_URL_PATH + "/socket", { params: { _csrf_token: csrfToken } });
const socket = new Socket(window.LIVEBOOK_BASE_URL_PATH + "/socket", {
params: { _csrf_token: csrfToken },
});
let channel = null;

View file

@ -3,8 +3,8 @@
"scripts": {
"deploy": "NODE_ENV=production webpack --mode production",
"watch": "webpack --mode development --watch",
"format": "prettier --trailing-comma es5 --write {js,test,css}/**/*.{js,json,css,scss,md} --no-error-on-unmatched-pattern",
"format-check": "prettier --trailing-comma es5 --check {js,test,css}/**/*.{js,json,css,scss,md} --no-error-on-unmatched-pattern",
"format": "prettier --trailing-comma es5 --write '{js,test,css}/**/*.{js,json,css,scss,md}' --no-error-on-unmatched-pattern",
"format-check": "prettier --trailing-comma es5 --check '{js,test,css}/**/*.{js,json,css,scss,md}' --no-error-on-unmatched-pattern",
"test": "jest",
"test:watch": "jest --watch"
},