Skip to content

Commit 0197286

Browse files
committed
Fix style and add eslint 9.x config
1 parent ec3d2df commit 0197286

7 files changed

Lines changed: 1050 additions & 274 deletions

File tree

‎.eslintignore‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎.eslintrc.json‎

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

‎JavaScript/2-query-builder.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ class QueryBuilder {
2222

2323
then(resolve) {
2424
const { table, fields, where, limit, order } = this.options;
25-
const cond = Object.entries(where).map((e) => e.join('=')).join(' AND ');
25+
const cond = Object.entries(where)
26+
.map((e) => e.join('='))
27+
.join(' AND ');
2628
const sql = `SELECT ${fields} FROM ${table} WHERE ${cond}`;
2729
const opt = `ORDER BY ${order} LIMIT ${limit}`;
2830
const query = sql + ' ' + opt;

‎eslint.config.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
const init = require('eslint-config-metarhia');
4+
5+
module.exports = [
6+
...init,
7+
{
8+
rules: {
9+
'class-methods-use-this': 'off',
10+
},
11+
},
12+
];

0 commit comments

Comments
 (0)