Skip to content

Commit

Permalink
Use "plugin:prettier/recommended". (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfbyker authored Aug 30, 2021
1 parent 6056ed6 commit a3474bc
Show file tree
Hide file tree
Showing 42 changed files with 616 additions and 533 deletions.
12 changes: 2 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
const warning = process.env['CI'] ? 2 : 1;

module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
},
extends: [
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'prettier'],
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-var-requires': 'off',
'no-unused-vars': [warning, { vars: 'all', args: 'none' }],
'no-console': 'off',
'no-var': 2,
'no-debugger': warning,
'prefer-const': warning,
'no-fallthrough': warning
},
env: {
node: true,
Expand Down
5 changes: 1 addition & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always",
"endOfLine": "lf"
"singleQuote": true
}
11 changes: 7 additions & 4 deletions lib/client.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { RequestOptions } from 'https';
import * as http from 'http'
import * as https from 'https'
import * as http from 'http';
import * as https from 'https';
const JSONbig = require('json-bigint');
import { SolrError } from './error/solr-error'
import { SolrError } from './error/solr-error';
import { ClientRequest } from 'http';
import { CallbackFn } from './types';

Expand Down Expand Up @@ -88,7 +88,10 @@ function handleJSONResponse(request, bigint, callback) {
*
* @api private
*/
function postJSON(params: Record<string, any>, callback: CallbackFn): ClientRequest {
function postJSON(
params: Record<string, any>,
callback: CallbackFn
): ClientRequest {
const headers = {
'content-type': 'application/json; charset=utf-8',
'content-length': Buffer.byteLength(params.json),
Expand Down
Loading

0 comments on commit a3474bc

Please sign in to comment.