Skip to content

Commit 1200dc8

Browse files
committed
chore: use double quotes (default)
1 parent ec180fd commit 1200dc8

File tree

353 files changed

+4323
-4324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

353 files changed

+4323
-4324
lines changed

.eslintrc.cjs

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict'
1+
"use strict"
22

33
module.exports = {
44
env: {
@@ -7,73 +7,73 @@ module.exports = {
77
},
88

99
extends: [
10-
'eslint:recommended',
11-
'eslint-config-airbnb-base',
12-
'plugin:prettier/recommended',
13-
'plugin:unicorn/recommended',
10+
"eslint:recommended",
11+
"eslint-config-airbnb-base",
12+
"plugin:prettier/recommended",
13+
"plugin:unicorn/recommended",
1414
],
1515

1616
parserOptions: {
17-
ecmaVersion: 'latest',
18-
sourceType: 'module',
17+
ecmaVersion: "latest",
18+
sourceType: "module",
1919
},
2020

2121
rules: {
2222
// require file extensions
23-
'import/extensions': [
24-
'error',
25-
'always',
23+
"import/extensions": [
24+
"error",
25+
"always",
2626
{
2727
ignorePackages: true,
2828
},
2929
],
3030

31-
'no-restricted-exports': 'off',
31+
"no-restricted-exports": "off",
3232

33-
'no-restricted-globals': [
34-
'error',
33+
"no-restricted-globals": [
34+
"error",
3535
{
3636
message: "Import 'Buffer' from 'node:buffer' module instead",
37-
name: 'Buffer',
37+
name: "Buffer",
3838
},
3939
{
4040
message: "Import 'process' from 'node:process' module instead",
41-
name: 'process',
41+
name: "process",
4242
},
4343
],
4444

45-
'sort-keys': 'error',
45+
"sort-keys": "error",
4646

4747
// we turn this off here, for all commonjs modules (e.g. test fixtures etc.)
48-
strict: ['off'],
48+
strict: ["off"],
4949

5050
// TODO FIXME turn off temporary, to make eslint pass
51-
'class-methods-use-this': 'off',
52-
'import/no-unresolved': 'off', // eslint-plugin-import has problems with package exports
53-
'no-restricted-syntax': 'off',
54-
'no-underscore-dangle': [
55-
'error',
51+
"class-methods-use-this": "off",
52+
"import/no-unresolved": "off", // eslint-plugin-import has problems with package exports
53+
"no-restricted-syntax": "off",
54+
"no-underscore-dangle": [
55+
"error",
5656
{
57-
allow: ['__dirname', '_rawDebug'],
57+
allow: ["__dirname", "_rawDebug"],
5858
},
5959
],
6060
// unicorn temp off
61-
'unicorn/catch-error-name': 'off',
62-
'unicorn/consistent-destructuring': 'off',
63-
'unicorn/consistent-function-scoping': 'off',
64-
'unicorn/filename-case': 'off',
65-
'unicorn/no-array-callback-reference': 'off',
66-
'unicorn/no-array-for-each': 'off',
67-
'unicorn/no-array-reduce': 'off',
68-
'unicorn/no-await-expression-member': 'off',
69-
'unicorn/no-new-array': 'off',
70-
'unicorn/no-null': 'off',
71-
'unicorn/no-static-only-class': 'off',
72-
'unicorn/no-unreadable-array-destructuring': 'off',
73-
'unicorn/no-useless-undefined': 'off',
74-
'unicorn/prefer-module': 'off',
75-
'unicorn/prefer-spread': 'off',
76-
'unicorn/prefer-string-slice': 'off',
77-
'unicorn/prevent-abbreviations': 'off',
61+
"unicorn/catch-error-name": "off",
62+
"unicorn/consistent-destructuring": "off",
63+
"unicorn/consistent-function-scoping": "off",
64+
"unicorn/filename-case": "off",
65+
"unicorn/no-array-callback-reference": "off",
66+
"unicorn/no-array-for-each": "off",
67+
"unicorn/no-array-reduce": "off",
68+
"unicorn/no-await-expression-member": "off",
69+
"unicorn/no-new-array": "off",
70+
"unicorn/no-null": "off",
71+
"unicorn/no-static-only-class": "off",
72+
"unicorn/no-unreadable-array-destructuring": "off",
73+
"unicorn/no-useless-undefined": "off",
74+
"unicorn/prefer-module": "off",
75+
"unicorn/prefer-spread": "off",
76+
"unicorn/prefer-string-slice": "off",
77+
"unicorn/prevent-abbreviations": "off",
7878
},
7979
}

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
name: 'Bug Report'
2+
name: "Bug Report"
33
about: "If something isn't working as expected."
4-
title: ''
5-
labels: 'i: bug, i: needs triage'
6-
assignees: ''
4+
title: ""
5+
labels: "i: bug, i: needs triage"
6+
assignees: ""
77
---
88

99
## Bug Report
@@ -44,13 +44,13 @@ functions:
4444
- file: handler.js
4545
4646
```js
47-
'use strict'
47+
"use strict"
4848

4949
const { stringify } = JSON
5050

5151
exports.hello = async function hello() {
5252
return {
53-
body: stringify({ foo: 'bar' }),
53+
body: stringify({ foo: "bar" }),
5454
statusCode: 200,
5555
}
5656
}

.github/ISSUE_TEMPLATE/Feature_request.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
name: 'Feature request'
3-
about: 'I have a suggestion (and may want to implement it).'
4-
title: ''
5-
labels: 'i: enhancement, i: needs triage'
6-
assignees: ''
2+
name: "Feature request"
3+
about: "I have a suggestion (and may want to implement it)."
4+
title: ""
5+
labels: "i: enhancement, i: needs triage"
6+
assignees: ""
77
---
88

99
## Feature Request
@@ -40,13 +40,13 @@ functions:
4040
- file: handler.js
4141
4242
```js
43-
'use strict'
43+
"use strict"
4444

4545
const { stringify } = JSON
4646

4747
exports.hello = async function hello() {
4848
return {
49-
body: stringify({ foo: 'bar' }),
49+
body: stringify({ foo: "bar" }),
5050
statusCode: 200,
5151
}
5252
}

.github/ISSUE_TEMPLATE/Question.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
name: 'Question'
3-
about: 'If you have a question.'
4-
title: ''
5-
labels: 'i: question, i: needs triage'
6-
assignees: ''
2+
name: "Question"
3+
about: "If you have a question."
4+
title: ""
5+
labels: "i: question, i: needs triage"
6+
assignees: ""
77
---

.github/workflows/nodejs.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212

1313
jobs:
1414
build:
15-
name: '[${{ matrix.os }}] node.js v${{ matrix.node-version }}'
15+
name: "[${{ matrix.os }}] node.js v${{ matrix.node-version }}"
1616
runs-on: ${{ matrix.os }}
1717

1818
strategy:
@@ -31,20 +31,20 @@ jobs:
3131

3232
- uses: actions/setup-go@v4
3333
with:
34-
go-version: '1'
34+
go-version: "1"
3535

3636
- uses: actions/setup-java@v3
3737
with:
38-
distribution: 'temurin'
39-
java-version: '8'
38+
distribution: "temurin"
39+
java-version: "8"
4040

4141
- uses: actions/setup-python@v4
4242
with:
43-
python-version: '3.9'
43+
python-version: "3.9"
4444

4545
- uses: ruby/setup-ruby@v1
4646
with:
47-
ruby-version: '2.7'
47+
ruby-version: "2.7"
4848

4949
- run: npm ci
5050

.mocharc.cjs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
'use strict'
1+
"use strict"
22

3-
const { env } = require('process')
3+
const { env } = require("process")
44

55
let spec
66

7-
if (env.TEST === undefined || env.TEST === 'all') {
8-
spec = ['./src/**/*.test.js', 'tests/**/*.test.js']
7+
if (env.TEST === undefined || env.TEST === "all") {
8+
spec = ["./src/**/*.test.js", "tests/**/*.test.js"]
99
}
1010

11-
if (env.TEST === 'unit') {
12-
spec = ['./src/**/*.test.js', 'tests/old-unit/**/*.test.js']
11+
if (env.TEST === "unit") {
12+
spec = ["./src/**/*.test.js", "tests/old-unit/**/*.test.js"]
1313
}
1414

15-
if (env.TEST === 'node') {
15+
if (env.TEST === "node") {
1616
spec = [
17-
'./src/**/*.test.js',
18-
'tests/end-to-end/**/*.test.js',
19-
'tests/events/**/*.test.js',
20-
'tests/handler-module-formats/**/*.test.js',
17+
"./src/**/*.test.js",
18+
"tests/end-to-end/**/*.test.js",
19+
"tests/events/**/*.test.js",
20+
"tests/handler-module-formats/**/*.test.js",
2121
// 'tests/integration/**/*.test.js',
22-
'tests/lambda-run-mode/**/*.test.js',
23-
'tests/old-unit/**/*.test.js',
22+
"tests/lambda-run-mode/**/*.test.js",
23+
"tests/old-unit/**/*.test.js",
2424
// 'tests/scneario/**/*.test.js',
25-
'tests/timeout/**/*.test.js',
25+
"tests/timeout/**/*.test.js",
2626
]
2727
}
2828

2929
module.exports = {
30-
exclude: '**/node_modules/**/*',
30+
exclude: "**/node_modules/**/*",
3131
spec,
3232
timeout: 300000,
3333
}

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -304,45 +304,45 @@ the Lambda handler process is running in a child process.
304304
To use `Lambda.invoke` you need to set the lambda endpoint to the `serverless-offline` endpoint:
305305

306306
```js
307-
import { env } from 'node:process'
308-
import aws from 'aws-sdk'
307+
import { env } from "node:process"
308+
import aws from "aws-sdk"
309309
310310
const lambda = new aws.Lambda({
311-
apiVersion: '2015-03-31',
311+
apiVersion: "2015-03-31",
312312
// endpoint needs to be set only if it deviates from the default
313313
endpoint: env.IS_OFFLINE
314-
? 'http://localhost:3002'
315-
: 'https://lambda.us-east-1.amazonaws.com',
314+
? "http://localhost:3002"
315+
: "https://lambda.us-east-1.amazonaws.com",
316316
})
317317
```
318318

319319
All your lambdas can then be invoked in a handler using
320320

321321
```js
322-
import { Buffer } from 'node:buffer'
323-
import aws from 'aws-sdk'
322+
import { Buffer } from "node:buffer"
323+
import aws from "aws-sdk"
324324
325325
const { stringify } = JSON
326326
327327
const lambda = new aws.Lambda({
328-
apiVersion: '2015-03-31',
329-
endpoint: 'http://localhost:3002',
328+
apiVersion: "2015-03-31",
329+
endpoint: "http://localhost:3002",
330330
})
331331
332332
export async function handler() {
333333
const clientContextData = stringify({
334-
foo: 'foo',
334+
foo: "foo",
335335
})
336336
337337
const payload = stringify({
338-
data: 'foo',
338+
data: "foo",
339339
})
340340
341341
const params = {
342-
ClientContext: Buffer.from(clientContextData).toString('base64'),
342+
ClientContext: Buffer.from(clientContextData).toString("base64"),
343343
// FunctionName is composed of: service name - stage - function name, e.g.
344-
FunctionName: 'myServiceName-dev-invokedHandler',
345-
InvocationType: 'RequestResponse',
344+
FunctionName: "myServiceName-dev-invokedHandler",
345+
InvocationType: "RequestResponse",
346346
Payload: payload,
347347
}
348348
@@ -544,8 +544,8 @@ module.exports = function (endpoint, functionKey, method, path) {
544544
}
545545
},
546546

547-
name: 'your strategy name',
548-
scheme: 'your scheme name',
547+
name: "your strategy name",
548+
scheme: "your scheme name",
549549
}
550550
}
551551
```
@@ -697,7 +697,7 @@ custom:
697697
serverless-offline:
698698
resourceRoutes:
699699
YourCloudFormationMethodId:
700-
Uri: 'http://localhost:3001/assets/{proxy}'
700+
Uri: "http://localhost:3001/assets/{proxy}"
701701
```
702702
703703
### Response parameters

0 commit comments

Comments
 (0)