From bfc6392e1ab9eee3e20f8da2998f36d1ef13ae2f Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Thu, 2 Dec 2021 20:45:39 -0800 Subject: [PATCH] Rename eslint-plugin-codegen to eslint-plugin-specs (#32698) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/32698 Changelog: [Internal] - Renaming the eslint-plugin-codegen to eslint-plugin-specs as a better descriptor for this package. Part of the plan is to publish as a public npm package Reviewed By: RSNara Differential Revision: D32777702 fbshipit-source-id: 7776c481871031dba1280d87fb76b777ecc23339 --- .eslintrc | 4 ++-- packages/{eslint-plugin-codegen => eslint-plugin-specs}/BUCK | 0 .../__tests__/eslint-tester.js | 0 .../__tests__/react-native-modules-test.js | 0 .../{eslint-plugin-codegen => eslint-plugin-specs}/index.js | 0 .../package.json | 4 ++-- .../react-native-modules.js | 0 .../with-babel-register/disk-cache.js | 2 +- .../with-babel-register/index.js | 0 9 files changed, 5 insertions(+), 5 deletions(-) rename packages/{eslint-plugin-codegen => eslint-plugin-specs}/BUCK (100%) rename packages/{eslint-plugin-codegen => eslint-plugin-specs}/__tests__/eslint-tester.js (100%) rename packages/{eslint-plugin-codegen => eslint-plugin-specs}/__tests__/react-native-modules-test.js (100%) rename packages/{eslint-plugin-codegen => eslint-plugin-specs}/index.js (100%) rename packages/{eslint-plugin-codegen => eslint-plugin-specs}/package.json (83%) rename packages/{eslint-plugin-codegen => eslint-plugin-specs}/react-native-modules.js (100%) rename packages/{eslint-plugin-codegen => eslint-plugin-specs}/with-babel-register/disk-cache.js (97%) rename packages/{eslint-plugin-codegen => eslint-plugin-specs}/with-babel-register/index.js (100%) diff --git a/.eslintrc b/.eslintrc index f990717831deb2..c05c62620cbf81 100644 --- a/.eslintrc +++ b/.eslintrc @@ -6,7 +6,7 @@ ], "plugins": [ - "@react-native/eslint-plugin-codegen" + "@react-native/eslint-plugin-specs" ], "overrides": [ @@ -18,7 +18,7 @@ "@react-native-community/no-haste-imports": 2, "@react-native-community/error-subclass-name": 2, "@react-native-community/platform-colors": 2, - "@react-native/codegen/react-native-modules": 2 + "@react-native/specs/react-native-modules": 2 } }, { diff --git a/packages/eslint-plugin-codegen/BUCK b/packages/eslint-plugin-specs/BUCK similarity index 100% rename from packages/eslint-plugin-codegen/BUCK rename to packages/eslint-plugin-specs/BUCK diff --git a/packages/eslint-plugin-codegen/__tests__/eslint-tester.js b/packages/eslint-plugin-specs/__tests__/eslint-tester.js similarity index 100% rename from packages/eslint-plugin-codegen/__tests__/eslint-tester.js rename to packages/eslint-plugin-specs/__tests__/eslint-tester.js diff --git a/packages/eslint-plugin-codegen/__tests__/react-native-modules-test.js b/packages/eslint-plugin-specs/__tests__/react-native-modules-test.js similarity index 100% rename from packages/eslint-plugin-codegen/__tests__/react-native-modules-test.js rename to packages/eslint-plugin-specs/__tests__/react-native-modules-test.js diff --git a/packages/eslint-plugin-codegen/index.js b/packages/eslint-plugin-specs/index.js similarity index 100% rename from packages/eslint-plugin-codegen/index.js rename to packages/eslint-plugin-specs/index.js diff --git a/packages/eslint-plugin-codegen/package.json b/packages/eslint-plugin-specs/package.json similarity index 83% rename from packages/eslint-plugin-codegen/package.json rename to packages/eslint-plugin-specs/package.json index f82575f74cb036..4e60ce91ec36eb 100644 --- a/packages/eslint-plugin-codegen/package.json +++ b/packages/eslint-plugin-specs/package.json @@ -1,12 +1,12 @@ { - "name": "@react-native/eslint-plugin-codegen", + "name": "@react-native/eslint-plugin-specs", "version": "0.0.1", "description": "ESLint rules to validate NativeModule and Component Specs", "main": "index.js", "repository": { "type": "git", "url": "git@github.com:facebook/react-native.git", - "directory": "packages/eslint-plugin-codegen" + "directory": "packages/eslint-plugin-specs" }, "dependencies": { "@babel/core": "^7.14.0", diff --git a/packages/eslint-plugin-codegen/react-native-modules.js b/packages/eslint-plugin-specs/react-native-modules.js similarity index 100% rename from packages/eslint-plugin-codegen/react-native-modules.js rename to packages/eslint-plugin-specs/react-native-modules.js diff --git a/packages/eslint-plugin-codegen/with-babel-register/disk-cache.js b/packages/eslint-plugin-specs/with-babel-register/disk-cache.js similarity index 97% rename from packages/eslint-plugin-codegen/with-babel-register/disk-cache.js rename to packages/eslint-plugin-specs/with-babel-register/disk-cache.js index 9d318a39bf6a39..acee8bb1461806 100644 --- a/packages/eslint-plugin-codegen/with-babel-register/disk-cache.js +++ b/packages/eslint-plugin-specs/with-babel-register/disk-cache.js @@ -24,7 +24,7 @@ const packageJson = JSON.parse( const FILENAME = path.join( os.tmpdir(), - `.eslint-plugin-codegen.${packageJson.version}.disk-cache.json`, + `.eslint-plugin-specs.${packageJson.version}.disk-cache.json`, ); let data = {}; diff --git a/packages/eslint-plugin-codegen/with-babel-register/index.js b/packages/eslint-plugin-specs/with-babel-register/index.js similarity index 100% rename from packages/eslint-plugin-codegen/with-babel-register/index.js rename to packages/eslint-plugin-specs/with-babel-register/index.js