Skip to content

Commit 01d498e

Browse files
committed
apply formatting
1 parent acdcd1e commit 01d498e

File tree

6 files changed

+21
-34
lines changed

6 files changed

+21
-34
lines changed

.eslintrc.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,12 @@ module.exports = {
1919
files: [ '.eslintrc.js', 'jest.config.js' ],
2020
rules: {
2121
'sort-keys': 'off',
22-
'array-element-newline': [ 'warn', { multiline: true, minItems: 4 }],
22+
'array-element-newline': 'off', //['warn', { multiline: true, minItems: 6 }],
2323
},
2424
},
2525
],
2626
plugins: [ 'jest' ],
27-
extends: [
28-
'eslint:recommended',
29-
'plugin:@typescript-eslint/recommended',
30-
'plugin:jest/recommended',
31-
'plugin:node/recommended'
32-
],
27+
extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:jest/recommended', 'plugin:node/recommended' ],
3328
rules: {
3429
'@typescript-eslint/ban-ts-comment': 'off',
3530
'@typescript-eslint/explicit-function-return-type': 'off',
@@ -47,15 +42,17 @@ module.exports = {
4742
'node/no-process-exit': 'off',
4843
'node/no-unpublished-require': 'off',
4944
'node/no-unsupported-features/es-syntax': 'off',
50-
'array-bracket-newline': [ 'warn', { multiline: true, minItems: 4 }],
45+
'array-bracket-newline': [ 'warn', { multiline: true, minItems: 6 }],
5146
'array-bracket-spacing': [ 'warn', 'always', { objectsInArrays: false }],
52-
'array-element-newline': [ 'warn', { multiline: true, minItems: 3 }],
47+
'array-element-newline': [ 'warn', { multiline: true, minItems: 6 }],
5348
'eqeqeq': [ 'error', 'smart' ],
5449
'indent': [ 'warn', 4, { SwitchCase: 1 }],
5550
'no-eval': 'error',
5651
'no-var': 'error',
57-
'object-curly-newline': [ 'warn', { ObjectExpression: { multiline: true, minProperties: 4 }, ObjectPattern: { multiline: true, minProperties: 4 }, ImportDeclaration: 'never' },],
58-
'sort-keys': [ 'warn', 'asc', { caseSensitive: false, minKeys: 5, natural: true }],
52+
'object-curly-newline': [
53+
'warn',
54+
{ ObjectExpression: { multiline: true, minProperties: 4 }, ObjectPattern: { multiline: true, minProperties: 4 }, ImportDeclaration: 'never' },
55+
],
5956
},
60-
ignorePatterns: [ 'dist/*', 'configure-package.js' ],
57+
ignorePatterns: [ 'dist/*', 'node_modules/*', '.vscode/*', 'configure-package.js' ],
6158
};

.madgerc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"detectiveOptions": {
3-
"ts": {
4-
"mixedImports": true
5-
}
6-
},
7-
"graphVizOptions": {
2+
"detectiveOptions": {
3+
"ts": {
4+
"mixedImports": true
5+
}
6+
},
7+
"graphVizOptions": {
88
"G": {
99
"pad": 0.25,
1010
"ranksep": 0.18,
@@ -19,5 +19,5 @@
1919
"minlen": 2,
2020
"constraint": true
2121
}
22-
}
22+
}
2323
}

features/serverless/feature.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ const packages = {
1414
/** @type string[] */
1515
dependencies: [],
1616
/** @type string[] */
17-
devDependencies: [
18-
'serverless',
19-
'serverless-api-compression',
20-
'serverless-prune-plugin',
21-
'serverless-offline',
22-
'serverless-bundle'
23-
],
17+
devDependencies: [ 'serverless', 'serverless-api-compression', 'serverless-prune-plugin', 'serverless-offline', 'serverless-bundle' ],
2418
};
2519

2620
const scripts = {
@@ -34,4 +28,4 @@ const feature = {
3428
scripts,
3529
};
3630

37-
module.exports = {feature,};
31+
module.exports = { feature };

features/serverless/src/handlers/get-articles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export async function handler(event: any, context: any) {
1515
],
1616
});
1717

18-
const headers = {'content-length': body.length,};
18+
const headers = { 'content-length': body.length };
1919

2020
return { body, headers, statusCode: 200 };
2121
}

features/serverless/src/handlers/get-users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export async function handler(event: any, context: any) {
1515
],
1616
});
1717

18-
const headers = {'content-length': body.length,};
18+
const headers = { 'content-length': body.length };
1919

2020
return { body, headers, statusCode: 200 };
2121
}

scripts/build.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,7 @@ class Builder {
116116
}
117117

118118
compileBinaries() {
119-
const platforms = [
120-
'linux',
121-
'macos',
122-
'win'
123-
];
119+
const platforms = [ 'linux', 'macos', 'win' ];
124120
const filename = basename(buildConfig.entry).replace(/\.ts$/, '.js');
125121
const targets = platforms.map(t => `node16-${t.toLowerCase()}-x64`);
126122
const cmd = `npx pkg --compress Brotli --targets ${targets.join(',')} --out-path ${buildConfig.outdir} ${buildConfig.outdir}/${filename}`;

0 commit comments

Comments
 (0)