Skip to content

Commit

Permalink
chore: update to eslint@8 (#12356)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 10, 2022
1 parent 2953433 commit cbc41c2
Show file tree
Hide file tree
Showing 11 changed files with 227 additions and 294 deletions.
8 changes: 6 additions & 2 deletions .eslintplugin/index.js
Expand Up @@ -9,6 +9,10 @@ exports.rules = {
'ban-types-eventually': require('@typescript-eslint/eslint-plugin').rules[
'ban-types'
],
'prefer-rest-params-eventually': require('eslint/lib/rules/prefer-rest-params'),
'prefer-spread-eventually': require('eslint/lib/rules/prefer-spread'),
'prefer-rest-params-eventually':
require('eslint/use-at-your-own-risk').builtinRules.get(
'prefer-rest-params',
),
'prefer-spread-eventually':
require('eslint/use-at-your-own-risk').builtinRules.get('prefer-spread'),
};
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -22,8 +22,8 @@
"@types/jest": "^26.0.15",
"@types/node": "~12.12.0",
"@types/which": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^4.1.0",
"@typescript-eslint/parser": "^4.1.0",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"ansi-regex": "^5.0.1",
"ansi-styles": "^5.0.0",
"camelcase": "^6.2.0",
Expand All @@ -32,15 +32,15 @@
"codecov": "^3.0.0",
"debug": "^4.0.1",
"dedent": "^0.7.0",
"eslint": "^7.7.0",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.1.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-import": "^2.6.0",
"eslint-plugin-jest": "^24.0.0",
"eslint-plugin-jest": "^26.1.0",
"eslint-plugin-local": "^1.0.0",
"eslint-plugin-markdown": "^1.0.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-prettier": "^4.0.0",
"execa": "^5.0.0",
"fast-check": "^2.0.0",
"find-process": "^1.4.1",
Expand Down
2 changes: 0 additions & 2 deletions packages/expect-utils/src/utils.ts
Expand Up @@ -6,8 +6,6 @@
*
*/

/* eslint-disable local/ban-types-eventually */

import {isPrimitive} from 'jest-get-type';
import {
equals,
Expand Down
2 changes: 0 additions & 2 deletions packages/expect/src/asymmetricMatchers.ts
Expand Up @@ -38,7 +38,6 @@ const utils = Object.freeze({
subsetEquality,
});

// eslint-disable-next-line @typescript-eslint/ban-types
function getPrototype(obj: object) {
if (Object.getPrototypeOf) {
return Object.getPrototypeOf(obj);
Expand All @@ -51,7 +50,6 @@ function getPrototype(obj: object) {
return obj.constructor.prototype;
}

// eslint-disable-next-line @typescript-eslint/ban-types
export function hasProperty(obj: object | null, property: string): boolean {
if (!obj) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-jasmine2/src/jasmine/Suite.ts
Expand Up @@ -29,7 +29,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/* eslint-disable local/ban-types-eventually, sort-keys, local/prefer-spread-eventually, local/prefer-rest-params-eventually */
/* eslint-disable sort-keys, local/prefer-spread-eventually, local/prefer-rest-params-eventually */

import type {Config} from '@jest/types';
import {convertDescriptorToString} from 'jest-util';
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-leak-detector/src/index.ts
Expand Up @@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable local/ban-types-eventually */

import {promisify} from 'util';
import {setFlagsFromString} from 'v8';
import {runInNewContext} from 'vm';
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-snapshot/src/index.ts
Expand Up @@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable local/ban-types-eventually */

import * as fs from 'graceful-fs';
import type {Config} from '@jest/types';
import type {FS as HasteFS} from 'jest-haste-map';
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-snapshot/src/printSnapshot.ts
Expand Up @@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable local/ban-types-eventually */

import chalk = require('chalk');
import {getObjectSubset} from '@jest/expect-utils';
import {
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-snapshot/src/types.ts
Expand Up @@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable local/ban-types-eventually */

import type {MatcherState} from 'expect';
import type SnapshotState from './State';

Expand Down
2 changes: 0 additions & 2 deletions packages/pretty-format/src/plugins/DOMCollection.ts
Expand Up @@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable local/ban-types-eventually */

import {printListItems, printObjectProperties} from '../collections';
import type {Config, NewPlugin, Printer, Refs} from '../types';

Expand Down

0 comments on commit cbc41c2

Please sign in to comment.