Skip to content

Commit 4cb3d61

Browse files
committed
Update lintest config and fix code style
PR-URL: #240
1 parent 0830324 commit 4cb3d61

File tree

7 files changed

+17
-28
lines changed

7 files changed

+17
-28
lines changed

.eslintrc.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@
66
"node": true
77
},
88
"parserOptions": {
9-
"ecmaVersion": 2020
10-
},
11-
"rules": {
12-
"arrow-parens": ["error", "always"],
13-
"comma-dangle": "off",
14-
"handle-callback-err": "off",
15-
"consistent-return": "off",
16-
"operator-linebreak": [
17-
"error",
18-
"after",
19-
{ "overrides": { "?": "before", ":": "before" } }
20-
],
21-
"no-confusing-arrow": "off"
9+
"ecmaVersion": "latest"
2210
}
2311
}

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"singleQuote": true,
3+
"trailingComma": "all",
34
"overrides": [
45
{
56
"files": ["**/.*rc"],

lib/pg.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ const registerEntity = (model, name) => {
228228
catId('Category') +
229229
') WHERE "id" = (' +
230230
catId(name) +
231-
');'
231+
');',
232232
);
233233
const categoryId = catId(name);
234234
const flat = flatFields(entity.fields);
@@ -242,7 +242,7 @@ const registerEntity = (model, name) => {
242242
catId('Field') +
243243
') WHERE "id" = (' +
244244
fldId(name, field) +
245-
');'
245+
');',
246246
);
247247
}
248248
return { inserts: ins.join('\n'), updates: upd.join('\n') };

metasql.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class Query {
6363
offset(count: number): Query;
6464
then(
6565
resolve?: (rows: Array<object>) => unknown,
66-
reject?: Function
66+
reject?: Function,
6767
): Promise<unknown>;
6868
catch(reject?: Function): Promise<unknown>;
6969
toString(): string;

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
"pg": "^8.7.3"
4747
},
4848
"devDependencies": {
49-
"@types/node": "^17.0.23",
49+
"@types/node": "^18.0.0",
5050
"@types/pg": "^8.6.5",
5151
"eslint": "^8.12.0",
52-
"eslint-config-metarhia": "^7.0.1",
52+
"eslint-config-metarhia": "^8.1.0",
5353
"eslint-config-prettier": "^8.5.0",
5454
"eslint-plugin-import": "^2.25.4",
5555
"eslint-plugin-prettier": "^4.0.0",

test/sql.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const metadomain = require('metadomain');
4141
} catch (error) {
4242
test.assert(
4343
error.stack.includes('test/sql.js'),
44-
'Error stack should have query invocation file in it'
44+
'Error stack should have query invocation file in it',
4545
);
4646
test.assert(error.dbStack, 'Original error stack should be preserved');
4747
} finally {
@@ -159,7 +159,7 @@ const metadomain = require('metadomain');
159159
.update(
160160
'City',
161161
{ name: 'ODESSA', countryId: undefined },
162-
{ name: 'Odessa', cityId: undefined }
162+
{ name: 'Odessa', cityId: undefined },
163163
)
164164
.returning(['cityId']);
165165
test.strictEqual(res2.rowCount, 1);
@@ -189,7 +189,7 @@ const metadomain = require('metadomain');
189189

190190
await db.delete('City', { cityId }).returning('*');
191191
test.end();
192-
}
192+
},
193193
);
194194

195195
metatests.test('Database.insert into registry', async (test) => {
@@ -254,6 +254,6 @@ const metadomain = require('metadomain');
254254

255255
await db.delete('Counter', { counterId });
256256
test.end();
257-
}
257+
},
258258
);
259259
})();

0 commit comments

Comments
 (0)