build: adjust for updates to @xrplf/eslint-config (#1633)

This commit is contained in:
Nathan Nichols
2021-09-23 21:04:07 -07:00
committed by Mayukha Vadari
parent f2216446e5
commit dd068c2710
6 changed files with 19 additions and 25 deletions

View File

@@ -68,22 +68,13 @@ module.exports = {
{ {
files: ['test/**/*.ts'], files: ['test/**/*.ts'],
rules: { rules: {
// Removed the max for test files and test helper files, since tests usually need to import more things
'import/max-dependencies': 'off',
// describe blocks count as a function in Mocha tests, and can be insanely long
'max-lines-per-function': 'off',
// Tests can be very long turns off max-line count
'max-lines': 'off',
// We have lots of statements in tests
'max-statements': 'off',
// We have lots of magic numbers in tests // We have lots of magic numbers in tests
'no-magic-number': 'off',
'@typescript-eslint/no-magic-numbers': 'off', '@typescript-eslint/no-magic-numbers': 'off',
// We have files with a lot of tests
'max-lines-per-function': 'off',
'max-lines': 'off',
// We need to test things without type guards sometimes // We need to test things without type guards sometimes
'@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-call': 'off',
@@ -117,7 +108,6 @@ module.exports = {
{ {
files: ['test/models/*.ts'], files: ['test/models/*.ts'],
rules: { rules: {
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-explicit-any': 'off',
}, },
}, },
@@ -129,6 +119,9 @@ module.exports = {
// Removed this as eslint prevents us from doing this differently // Removed this as eslint prevents us from doing this differently
'import/unambiguous': 'off', 'import/unambiguous': 'off',
// Javascript files have CommonJS exports
'import/no-unused-modules': 'off',
}, },
}, },
], ],

14
package-lock.json generated
View File

@@ -29,7 +29,7 @@
"@types/puppeteer": "5.4.4", "@types/puppeteer": "5.4.4",
"@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.0.0", "@typescript-eslint/parser": "^4.0.0",
"@xrplf/eslint-config": "^1.3.0", "@xrplf/eslint-config": "^1.4.0",
"@xrplf/prettier-config": "^1.2.0", "@xrplf/prettier-config": "^1.2.0",
"assert": "^2.0.0", "assert": "^2.0.0",
"buffer": "^6.0.2", "buffer": "^6.0.2",
@@ -1294,9 +1294,9 @@
} }
}, },
"node_modules/@xrplf/eslint-config": { "node_modules/@xrplf/eslint-config": {
"version": "1.3.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/@xrplf/eslint-config/-/eslint-config-1.3.0.tgz", "resolved": "https://registry.npmjs.org/@xrplf/eslint-config/-/eslint-config-1.4.0.tgz",
"integrity": "sha512-Zk3ZgzHxj8vozA87LF6Gv4B9v8KXH51Q4oW2sG4fCFHsqiSWVG+n4ZPr7DhTqPNhaxV21yL3OqsT7G6FgD1wXg==", "integrity": "sha512-tSpFzcQinykGrmF/kFgKumtQrIkpeOwAsCCEOmJC7f2uo6soZVB4EK0GPJ+l1uYN5o35YR34cEAPz+bBodJ6sw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"confusing-browser-globals": "^1.0.9", "confusing-browser-globals": "^1.0.9",
@@ -9557,9 +9557,9 @@
"requires": {} "requires": {}
}, },
"@xrplf/eslint-config": { "@xrplf/eslint-config": {
"version": "1.3.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/@xrplf/eslint-config/-/eslint-config-1.3.0.tgz", "resolved": "https://registry.npmjs.org/@xrplf/eslint-config/-/eslint-config-1.4.0.tgz",
"integrity": "sha512-Zk3ZgzHxj8vozA87LF6Gv4B9v8KXH51Q4oW2sG4fCFHsqiSWVG+n4ZPr7DhTqPNhaxV21yL3OqsT7G6FgD1wXg==", "integrity": "sha512-tSpFzcQinykGrmF/kFgKumtQrIkpeOwAsCCEOmJC7f2uo6soZVB4EK0GPJ+l1uYN5o35YR34cEAPz+bBodJ6sw==",
"dev": true, "dev": true,
"requires": { "requires": {
"confusing-browser-globals": "^1.0.9", "confusing-browser-globals": "^1.0.9",

View File

@@ -39,7 +39,7 @@
"@types/puppeteer": "5.4.4", "@types/puppeteer": "5.4.4",
"@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.0.0", "@typescript-eslint/parser": "^4.0.0",
"@xrplf/eslint-config": "^1.3.0", "@xrplf/eslint-config": "^1.4.0",
"@xrplf/prettier-config": "^1.2.0", "@xrplf/prettier-config": "^1.2.0",
"assert": "^2.0.0", "assert": "^2.0.0",
"buffer": "^6.0.2", "buffer": "^6.0.2",

View File

@@ -1,4 +1,4 @@
/* eslint-disable max-lines -- Connection is a big class */ /* eslint-disable max-lines -- Connection is a large file w/ lots of imports/exports */
import { EventEmitter } from 'events' import { EventEmitter } from 'events'
import { Agent } from 'http' import { Agent } from 'http'

View File

@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/member-ordering -- Okay for Client so that client methods can be near the bottom */ /* eslint-disable @typescript-eslint/member-ordering -- TODO: remove when instance methods aren't members */
/* eslint-disable max-lines -- This might not be necessary later, but this file needs to be big right now */ /* eslint-disable max-lines -- Client is a large file w/ lots of imports/exports */
import * as assert from 'assert' import * as assert from 'assert'
import { EventEmitter } from 'events' import { EventEmitter } from 'events'

View File

@@ -1,3 +1,4 @@
/* eslint-disable max-statements -- test has a lot of statements */
import net from 'net' import net from 'net'
import { assert } from 'chai' import { assert } from 'chai'