Skip to content

Commit 774a4bc

Browse files
committed
style: use floydspace opinionated prettier rules; use strict node engine v16 development version
1 parent d976e9f commit 774a4bc

26 files changed

+404
-301
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ about: Create a report to help us improve
44
title: ''
55
labels: bug
66
assignees: ''
7-
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior. If you have an example repository that would be even better:
14+
1515
1. Set X to `true`
1616
2. Run `sls package`
1717

@@ -22,9 +22,10 @@ A clear and concise description of what you expected to happen.
2222
If applicable, add screenshots or logs to help explain your problem.
2323

2424
**Versions (please complete the following information):**
25-
- OS: [e.g. Linux, Mac, Windows]
26-
- Serverless Framework Version: [e.g. 3.0.0]
27-
- Plugin Version: [e.g. 1.25.0]
25+
26+
- OS: [e.g. Linux, Mac, Windows]
27+
- Serverless Framework Version: [e.g. 3.0.0]
28+
- Plugin Version: [e.g. 1.25.0]
2829

2930
**Additional context**
3031
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
44
title: ''
55
labels: enhancement
66
assignees: ''
7-
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

.prettierrc

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

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ The following `esbuild` options are automatically set.
111111

112112
#### Watch Options
113113

114-
| Option | Description | Default |
115-
| --------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
116-
| `pattern` | An [anymatch-compatible definition](https://github.com/es128/anymatch) for the watcher to respond to | `./\*_/_.(js\|ts)` (watches all `.js` and `.ts` files) |
117-
| `ignore` | An [anymatch-compatible definition](https://github.com/es128/anymatch) for the watcher to ignore | `'.esbuild', 'dist', 'node_modules', '.build']` |
114+
| Option | Description | Default |
115+
| --------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
116+
| `pattern` | An [anymatch-compatible definition](https://github.com/es128/anymatch) for the watcher to respond to | `./\*_/_.(js\|ts)` (watches all `.js` and `.ts` files) |
117+
| `ignore` | An [anymatch-compatible definition](https://github.com/es128/anymatch) for the watcher to ignore | `'.esbuild', 'dist', 'node_modules', '.build']` |
118118

119119
## Supported Runtimes
120120

examples/complete/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"name": "complete",
33
"version": "0.1.0",
4+
"scripts": {
5+
"start": "sls offline"
6+
},
7+
"dependencies": {
8+
"isin-validator": "^1.1.1"
9+
},
410
"devDependencies": {
511
"@types/node": "^11.13.0",
612
"esbuild": "^0.14.2",
@@ -9,11 +15,5 @@
915
"serverless-offline": "^6.4.0",
1016
"ts-node": "^8.1.0",
1117
"typescript": "~3.9.7"
12-
},
13-
"dependencies": {
14-
"isin-validator": "^1.1.1"
15-
},
16-
"scripts": {
17-
"start": "sls offline"
1818
}
1919
}

examples/config/config.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,17 @@ module.exports = () => {
55
minify: true,
66
sourcemap: false,
77
keepNames: true,
8-
external: [
9-
'lodash'
10-
],
8+
external: ['lodash'],
119
plugins: [
1210
{
1311
name: 'log-lodash',
1412
setup(build) {
1513
// test interception : log all lodash imports
16-
build.onResolve({ filter: /^lodash$/ }, args => {
14+
build.onResolve({ filter: /^lodash$/ }, (args) => {
1715
console.log(args);
1816
});
1917
},
20-
}
21-
]
18+
},
19+
],
2220
};
2321
};

examples/config/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"main": "handler.js",
3+
"scripts": {
4+
"start": "sls offline"
5+
},
36
"dependencies": {
47
"lodash": "^4.17.4"
58
},
@@ -10,8 +13,5 @@
1013
"serverless": "^2.36.0",
1114
"serverless-esbuild": "file:../..",
1215
"serverless-offline": "^6.4.0"
13-
},
14-
"scripts": {
15-
"start": "sls offline"
1616
}
1717
}

examples/individually/hello1.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as _ from 'lodash';
22

33
// modern module syntax
44
export async function handler(event, context, callback) {
5-
65
// dependencies work as expected
76
console.log(_.VERSION);
87

examples/individually/hello2.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// modern module syntax
32
export async function handler(event, context, callback) {
43
// async/await also works out of the box

examples/individually/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"main": "handler.js",
3+
"scripts": {
4+
"start": "sls offline"
5+
},
36
"dependencies": {
47
"lodash": "^4.17.4"
58
},
@@ -10,8 +13,5 @@
1013
"serverless": "^2.36.0",
1114
"serverless-esbuild": "^1.26.1",
1215
"serverless-offline": "^6.4.0"
13-
},
14-
"scripts": {
15-
"start": "sls offline"
1616
}
1717
}

examples/individually/plugins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ let envPlugin = {
22
name: 'log-lodash',
33
setup(build) {
44
// test interception : log all lodash imports
5-
build.onResolve({ filter: /^lodash$/ }, args => {
5+
build.onResolve({ filter: /^lodash$/ }, (args) => {
66
console.log(args);
77
});
88
},

examples/individually/serverless.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ provider:
1313

1414
custom:
1515
esbuild:
16-
plugins : ./plugins.js
16+
plugins: ./plugins.js
1717
packager: yarn
1818
bundle: true
1919
minify: true
@@ -22,7 +22,6 @@ custom:
2222
external:
2323
- lodash
2424

25-
2625
functions:
2726
hello1:
2827
handler: hello1.handler

examples/minimal/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "minimal",
33
"version": "0.1.0",
4+
"scripts": {
5+
"start": "sls offline"
6+
},
7+
"dependencies": {
8+
"isin-validator": "^1.1.1"
9+
},
410
"devDependencies": {
511
"@types/node": "^11.13.0",
612
"esbuild": "^0.14.2",
713
"serverless": "^2.17.0",
814
"serverless-esbuild": "^1.26.1",
915
"serverless-offline": "^6.4.0"
10-
},
11-
"dependencies": {
12-
"isin-validator": "^1.1.1"
13-
},
14-
"scripts": {
15-
"start": "sls offline"
1616
}
1717
}

0 commit comments

Comments
 (0)