Skip to content

Commit 8a26f4b

Browse files
committed
style: upgrade eslint config
1 parent f552c6d commit 8a26f4b

File tree

7 files changed

+30
-24
lines changed

7 files changed

+30
-24
lines changed

.eslintrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
22
"root": true,
3-
"extends": ["@shelf/eslint-config/backend"]
3+
"extends": [
4+
"@shelf/eslint-config/typescript"
5+
],
6+
"rules": {
7+
"@typescript-eslint/no-var-requires": "off"
8+
}
49
}

index-another-concurrent-test.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ const ddb = DynamoDBDocument.from(
88
region: 'local-env',
99
credentials: {
1010
accessKeyId: 'fakeMyKeyId',
11-
secretAccessKey: 'fakeSecretAccessKey'
12-
}
11+
secretAccessKey: 'fakeSecretAccessKey',
12+
},
1313
}),
1414
{
1515
marshallOptions: {
16-
convertEmptyValues: true
17-
}
16+
convertEmptyValues: true,
17+
},
1818
}
1919
);
2020

@@ -25,6 +25,6 @@ it('should insert item into another table concurrently', async () => {
2525

2626
expect(Item).toEqual({
2727
id: '1',
28-
hello: 'world'
28+
hello: 'world',
2929
});
3030
});

index.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ const ddb = DynamoDBDocument.from(
88
region: 'local-env',
99
credentials: {
1010
accessKeyId: 'fakeMyKeyId',
11-
secretAccessKey: 'fakeSecretAccessKey'
12-
}
11+
secretAccessKey: 'fakeSecretAccessKey',
12+
},
1313
}),
1414
{
1515
marshallOptions: {
16-
convertEmptyValues: true
17-
}
16+
convertEmptyValues: true,
17+
},
1818
}
1919
);
2020

@@ -25,6 +25,6 @@ it('should insert item into table', async () => {
2525

2626
expect(Item).toEqual({
2727
id: '1',
28-
hello: 'world'
28+
hello: 'world',
2929
});
3030
});

jest-dynamodb-config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ module.exports = {
44
TableName: `files`,
55
KeySchema: [{AttributeName: 'id', KeyType: 'HASH'}],
66
AttributeDefinitions: [{AttributeName: 'id', AttributeType: 'S'}],
7-
ProvisionedThroughput: {ReadCapacityUnits: 1, WriteCapacityUnits: 1}
7+
ProvisionedThroughput: {ReadCapacityUnits: 1, WriteCapacityUnits: 1},
88
},
99
{
1010
TableName: `users`,
1111
KeySchema: [{AttributeName: 'id', KeyType: 'HASH'}],
1212
AttributeDefinitions: [{AttributeName: 'id', AttributeType: 'S'}],
13-
ProvisionedThroughput: {ReadCapacityUnits: 1, WriteCapacityUnits: 1}
14-
}
13+
ProvisionedThroughput: {ReadCapacityUnits: 1, WriteCapacityUnits: 1},
14+
},
1515
],
1616
port: 8000,
17-
options: ['-sharedDb']
17+
options: ['-sharedDb'],
1818
};

jest-preset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ const {resolve} = require('path');
33
module.exports = {
44
globalSetup: resolve(__dirname, './setup.js'),
55
globalTeardown: resolve(__dirname, './teardown.js'),
6-
testEnvironment: resolve(__dirname, './environment.js')
6+
testEnvironment: resolve(__dirname, './environment.js'),
77
};

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@
5252
"@aws-sdk/client-dynamodb": "^3.26.0",
5353
"@aws-sdk/lib-dynamodb": "^3.26.0",
5454
"@aws-sdk/util-dynamodb": "^3.26.0",
55-
"@shelf/eslint-config": "0.19.0",
56-
"@shelf/prettier-config": "0.0.7",
55+
"@shelf/eslint-config": "2.7.0",
56+
"@shelf/prettier-config": "1.0.0",
5757
"eslint": "8.4.1",
5858
"husky": "7.0.4",
59-
"jest": "26.2.2",
60-
"lint-staged": "10.2.11",
61-
"prettier": "2.5.1"
59+
"jest": "27.4.5",
60+
"lint-staged": "12.1.2",
61+
"prettier": "2.5.1",
62+
"typescript": "4.5.4"
6263
},
6364
"peerDependencies": {
6465
"@aws-sdk/client-dynamodb": "3.x.x",

setup.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = async function () {
2121
clientConfig,
2222
installerConfig,
2323
port: port = DEFAULT_PORT,
24-
options: options = DEFAULT_OPTIONS
24+
options: options = DEFAULT_OPTIONS,
2525
} = typeof config === 'function' ? await config() : config;
2626

2727
const dynamoDB = new DynamoDB({
@@ -30,9 +30,9 @@ module.exports = async function () {
3030
region: 'local-env',
3131
credentials: {
3232
accessKeyId: 'fakeMyKeyId',
33-
secretAccessKey: 'fakeSecretAccessKey'
33+
secretAccessKey: 'fakeSecretAccessKey',
3434
},
35-
...clientConfig
35+
...clientConfig,
3636
});
3737

3838
global.__DYNAMODB_CLIENT__ = dynamoDB;

0 commit comments

Comments
 (0)