Skip to content

Commit

Permalink
Rename eslint config/plugin packages. Reset versions to 0.72.0 to mat…
Browse files Browse the repository at this point in the history
…ch the rest of the repo.
  • Loading branch information
afoxman authored and Ruslan Lesiutin committed Nov 24, 2022
1 parent 9517320 commit 977a213
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require('eslint-plugin-lint').load(path.join(__dirname, 'tools/eslint/rules'));
module.exports = {
root: true,

extends: ['@react-native-community'],
extends: ['@react-native'],

plugins: ['@react-native/eslint-plugin-specs', 'lint'],

Expand All @@ -38,7 +38,7 @@ module.exports = {
{
files: ['Libraries/**/*.js'],
rules: {
'@react-native-community/platform-colors': 2,
'@react-native/platform-colors': 2,
'@react-native/specs/react-native-modules': 2,
'lint/no-haste-imports': 2,
'lint/no-react-native-imports': 2,
Expand Down
11 changes: 5 additions & 6 deletions packages/eslint-config-react-native-community/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# eslint-config-react-native-community
# @react-native/eslint-config

[![Version][version-badge]][package]

## Installation

```
yarn add --dev eslint prettier @react-native-community/eslint-config
yarn add --dev eslint prettier @react-native/eslint-config
```

*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like*
Expand All @@ -16,10 +16,9 @@ Add to your eslint config (`.eslintrc`, or `eslintConfig` field in `package.json

```json
{
"extends": "@react-native-community"
"extends": "@react-native"
}
```

[version-badge]: https://img.shields.io/npm/v/@react-native-community/eslint-config.svg?style=flat-square
[package]: https://www.npmjs.com/package/@react-native-community/eslint-config

[version-badge]: https://img.shields.io/npm/v/@react-native/eslint-config.svg?style=flat-square
[package]: https://www.npmjs.com/package/@react-native/eslint-config
2 changes: 1 addition & 1 deletion packages/eslint-config-react-native-community/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
'react',
'react-hooks',
'react-native',
'@react-native-community',
'@react-native',
'jest',
],

Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-config-react-native-community/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-community/eslint-config",
"version": "3.2.0",
"name": "@react-native/eslint-config",
"version": "0.72.0",
"description": "ESLint config for React Native",
"main": "index.js",
"license": "MIT",
Expand All @@ -13,7 +13,7 @@
"dependencies": {
"@babel/core": "^7.14.0",
"@babel/eslint-parser": "^7.18.2",
"@react-native-community/eslint-plugin": "^1.1.0",
"@react-native/eslint-plugin": "^0.72.0",
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
"eslint-config-prettier": "^8.5.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-plugin-react-native-community/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# eslint-plugin-react-native-community
# @react-native/eslint-plugin

This plugin is intended to be used in [`@react-native-community/eslint-config`](https://github.com/facebook/react-native/tree/HEAD/packages/eslint-config-react-native-community). You probably want to install that package instead.
This plugin is intended to be used in [`@react-native/eslint-config`](https://github.com/facebook/react-native/tree/HEAD/packages/eslint-config-react-native-community). You probably want to install that package instead.

## Installation

```
yarn add --dev eslint @react-native-community/eslint-plugin
yarn add --dev eslint @react-native/eslint-plugin
```

*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like*
Expand All @@ -16,7 +16,7 @@ Add to your eslint config (`.eslintrc`, or `eslintConfig` field in `package.json

```json
{
"plugins": ["@react-native-community"]
"plugins": ["@react-native"]
}
```

Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin-react-native-community/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@react-native-community/eslint-plugin",
"version": "1.3.0",
"description": "ESLint rules for @react-native-community/eslint-config",
"name": "@react-native/eslint-plugin",
"version": "0.72.0",
"description": "ESLint rules for @react-native/eslint-config",
"main": "index.js",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions repo-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@babel/generator": "^7.14.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@definitelytyped/dtslint": "^0.0.127",
"@react-native-community/eslint-config": "*",
"@react-native-community/eslint-plugin": "*",
"@react-native/eslint-config": "*",
"@react-native/eslint-plugin": "*",
"@react-native/eslint-plugin-specs": "^0.72.0",
"@reactions/component": "^2.0.2",
"@types/react": "^18.0.18",
Expand Down
5 changes: 4 additions & 1 deletion scripts/template/install-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ const {reactNativeRootPath, templatePath} = argv;
const VERDACCIO_CONFIG_PATH = `${reactNativeRootPath}/scripts/template/verdaccio.yml`;
const VERDACCIO_STORAGE_PATH = `${templatePath}/node_modules`;

const PACKAGES_TO_PUBLISH_PATHS = [];
const PACKAGES_TO_PUBLISH_PATHS = [
'packages/eslint-plugin-react-native-community',
'packages/eslint-config-react-native-community',
];

function install() {
const VERDACCIO_PID = setupVerdaccio(
Expand Down
6 changes: 6 additions & 0 deletions scripts/template/verdaccio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ uplinks:
maxSockets: 40
maxFreeSockets: 10
packages:
'@react-native/eslint-config':
access: $all
publish: $all
'@react-native/eslint-plugin':
access: $all
publish: $all
'@*/*':
access: $all
publish: $authenticated
Expand Down
2 changes: 1 addition & 1 deletion template/_eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
extends: '@react-native-community',
extends: '@react-native',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
};
2 changes: 1 addition & 1 deletion template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@babel/core": "^7.12.9",
"@babel/preset-env": "^7.14.0",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^3.0.0",
"@react-native/eslint-config": "^0.72.0",
"@tsconfig/react-native": "^2.0.2",
"@types/jest": "^29.2.1",
"@types/react": "^18.0.24",
Expand Down

0 comments on commit 977a213

Please sign in to comment.