From 93f48fe1c975daf7364ead942c54d3b8b19a9f74 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Fri, 30 Oct 2020 13:43:03 +0100 Subject: [PATCH] chore: delete `eslint-config-fb-strict` package from repo (#10739) --- .eslintrc.js | 2 +- CHANGELOG.md | 7 +- package.json | 1 + packages/eslint-config-fb-strict/index.js | 87 ------------------- packages/eslint-config-fb-strict/package.json | 29 ------- yarn.lock | 12 +-- 6 files changed, 13 insertions(+), 125 deletions(-) delete mode 100644 packages/eslint-config-fb-strict/index.js delete mode 100644 packages/eslint-config-fb-strict/package.json diff --git a/.eslintrc.js b/.eslintrc.js index e9b3640b5ab8..ccd06a86e048 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,7 +7,7 @@ module.exports = { extends: [ - './packages/eslint-config-fb-strict/index.js', + 'fb-strict', 'plugin:import/errors', 'plugin:import/typescript', 'prettier', diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e9903b5bc66..a900a6999761 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,16 +7,17 @@ ### Fixes - `[babel-plugin-jest-hoist]` Preserve order of hoisted mock nodes within containing block ([#10536](https://github.com/facebook/jest/pull/10536)) -- `[jest-config]` Fix bug introduced in watch mode by PR[#10678](https://github.com/facebook/jest/pull/10678/files#r511037803) ([#10692](https://github.com/facebook/jest/pull/10692)) - `[expect]` Stop modifying the sample in `expect.objectContaining()` ([#10711](https://github.com/facebook/jest/pull/10711)) - `[jest-circus, jest-jasmine2]` fix: don't assume `stack` is always a string ([#10697](https://github.com/facebook/jest/pull/10697)) +- `[jest-config]` Fix bug introduced in watch mode by PR[#10678](https://github.com/facebook/jest/pull/10678/files#r511037803) ([#10692](https://github.com/facebook/jest/pull/10692)) - `[jest-resolve-dependencies]` Resolve mocks as dependencies ([#10713](https://github.com/facebook/jest/pull/10713)) ### Chore & Maintenance -- `[docs]` Add docs for using mocks in TypeScript([#10415](https://github.com/facebook/jest/pull/10415)) -- `[jest-cli]` chore: standardize files and folder names ([#10698](https://github.com/facebook/jest/pull/1098)) +- `[docs]` Add docs for using mocks in TypeScript ([#10415](https://github.com/facebook/jest/pull/10415)) +- `[eslint-config-fb-strict]` Move package from this repo to `fbjs` repo ([#10739](https://github.com/facebook/jest/pull/10739)) - `[examples]` Update TypeScript example to show use of newer Jest types ([#10399](https://github.com/facebook/jest/pull/10399)) +- `[jest-cli]` chore: standardize files and folder names ([#10698](https://github.com/facebook/jest/pull/10698)) ### Performance diff --git a/package.json b/package.json index c1cab19f2fe6..c79a227d8447 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "debug": "^4.0.1", "dedent": "^0.7.0", "eslint": "^7.7.0", + "eslint-config-fb-strict": "^26.0.0", "eslint-config-prettier": "^6.1.0", "eslint-plugin-babel": "^5.1.0", "eslint-plugin-eslint-comments": "^3.1.2", diff --git a/packages/eslint-config-fb-strict/index.js b/packages/eslint-config-fb-strict/index.js deleted file mode 100644 index 4ee88d9d6722..000000000000 --- a/packages/eslint-config-fb-strict/index.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - -// Can't be ESModules as this is not compiled -const fbjsConfig = require('eslint-config-fbjs'); - -const variableNamePattern = String.raw`\s*[a-zA-Z_$][a-zA-Z_$\d]*\s*`; -const importPattern = - String.raw`^(?:var|let|const|import type)\s+` + - '{?' + - variableNamePattern + - '(?:,' + - variableNamePattern + - ')*}?' + - String.raw`\s*(?:=\s*require\(|from)[a-zA-Z_+./''\s\d\-]+\)?[^;\n]*[;\n]`; -const maxLenIgnorePattern = String.raw`(^\s*(it|test)\(|${importPattern})`; - -delete fbjsConfig.rules['babel/flow-object-type']; - -module.exports = Object.assign({}, fbjsConfig, { - env: { - es6: true, - 'jest/globals': true, - node: true, - }, - plugins: fbjsConfig.plugins.concat(['jest']), - rules: Object.assign({}, fbjsConfig.rules, { - 'array-bracket-spacing': [2, 'never'], - 'arrow-parens': [2, 'as-needed'], - 'arrow-spacing': [2], - 'brace-style': [ - 2, - '1tbs', - { - allowSingleLine: true, - }, - ], - 'comma-dangle': [2, 'always-multiline'], - 'comma-spacing': [2], - 'comma-style': [2, 'last'], - 'computed-property-spacing': [2, 'never'], - 'eol-last': [2], - 'flowtype/object-type-delimiter': [2, 'comma'], - indent: [0], - 'jest/no-focused-tests': [2], - 'jest/no-identical-title': [2], - 'jest/valid-expect': [2], - 'max-len': [ - 2, - { - code: 80, - ignorePattern: maxLenIgnorePattern, - ignoreUrls: true, - }, - ], - 'no-const-assign': [2], - 'no-extra-parens': [2, 'functions'], - 'no-irregular-whitespace': [2], - 'no-this-before-super': [2], - 'no-var': [2], - 'object-curly-spacing': [2, 'never'], - 'object-shorthand': [2], - 'prefer-arrow-callback': [2], - 'prefer-const': [2], - quotes: [ - 2, - 'single', - { - allowTemplateLiterals: true, - avoidEscape: true, - }, - ], - semi: [2, 'always'], - 'sort-keys': [2], - 'space-before-blocks': [2], - 'space-before-function-paren': [ - 2, - {anonymous: 'never', asyncArrow: 'always', named: 'never'}, - ], - 'space-in-parens': [2, 'never'], - }), -}); diff --git a/packages/eslint-config-fb-strict/package.json b/packages/eslint-config-fb-strict/package.json deleted file mode 100644 index ced29f6867ef..000000000000 --- a/packages/eslint-config-fb-strict/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "eslint-config-fb-strict", - "version": "26.0.0", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git", - "directory": "packages/eslint-config-fb-strict" - }, - "license": "MIT", - "dependencies": { - "eslint-config-fbjs": "^3.1.1" - }, - "peerDependencies": { - "babel-eslint": "^9.0.0 || ^10.0.0", - "eslint": "^4.2.0 || ^5.0.0 || ^6.0.0", - "eslint-plugin-babel": "^5.0.0", - "eslint-plugin-flowtype": "^2.35.0 || ^3.0.0 || ^4.0.0", - "eslint-plugin-jest": "^21.0.0 || ^22.0.0 || ^23.0.0", - "eslint-plugin-jsx-a11y": "^6.0.2", - "eslint-plugin-react": "^7.1.0" - }, - "engines": { - "node": ">= 10.14.2" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638" -} diff --git a/yarn.lock b/yarn.lock index 73b84ede4268..25c519823107 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7861,9 +7861,9 @@ __metadata: languageName: node linkType: hard -"eslint-config-fb-strict@workspace:packages/eslint-config-fb-strict": - version: 0.0.0-use.local - resolution: "eslint-config-fb-strict@workspace:packages/eslint-config-fb-strict" +"eslint-config-fb-strict@npm:^26.0.0": + version: 26.0.0 + resolution: "eslint-config-fb-strict@npm:26.0.0" dependencies: eslint-config-fbjs: ^3.1.1 peerDependencies: @@ -7874,8 +7874,9 @@ __metadata: eslint-plugin-jest: ^21.0.0 || ^22.0.0 || ^23.0.0 eslint-plugin-jsx-a11y: ^6.0.2 eslint-plugin-react: ^7.1.0 - languageName: unknown - linkType: soft + checksum: 8ea89ca2f08627d6ef727047d870c86cf4f3027a4321f74b15bc5206d9fef8790b3d63f413cba274ca5ddbe0cb9c40febfced7db4c9e796a10e31345ccdeda78 + languageName: node + linkType: hard "eslint-config-fbjs@npm:^3.1.1": version: 3.1.1 @@ -17208,6 +17209,7 @@ fsevents@^1.2.7: debug: ^4.0.1 dedent: ^0.7.0 eslint: ^7.7.0 + eslint-config-fb-strict: ^26.0.0 eslint-config-prettier: ^6.1.0 eslint-plugin-babel: ^5.1.0 eslint-plugin-eslint-comments: ^3.1.2