GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update deprecated features in ESLint configuration files. by elas7 · Pull Request #22767 · react/react

Conversation

@elas7

@elas7 elas7 commented Nov 15, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

1. experimentalObjectRestSpread option.

From the documentation:

Since ESLint v5, ecmaFeatures: { experimentalObjectRestSpread: true } has been equivalent to ecmaVersion: 2018, and has also emitted a deprecation warning. In ESLint v6, the experimentalObjectRestSpread feature has been removed entirely and has no effect. [...]

To address: If you use the experimentalObjectRestSpread option, you should change your config to contain this instead:

{
  "parserOptions": {
    "ecmaVersion": 2018
  }
}

I removed it and updated ecmaVersion from 8 to 9 to keep the number structure. It is equivalent to 2018 (source).

I tested it with yarn lint, and it passed.

2. globals with boolean values.

From the documentation:

To configure global variables inside of a configuration file, set the globals configuration property to an object containing keys named for each of the global variables you want to use. For each global variable key, set the corresponding value equal to "writable" to allow the variable to be overwritten or "readonly" to disallow overwriting. [...]

For historical reasons, the boolean value false and the string value "readable" are equivalent to "readonly". Similarly, the boolean value true and the string value "writeable" are equivalent to "writable". However, the use of older values is deprecated.

Currently, all globals are set to true. To update them and keep the functionality strictly the same, I could have updated them to "writeable". However, linting works fine with "readonly" too, which seems preferable because it produces a stricter test.

I tested it with yarn lint, and it passed.

I also tested the configurations in scripts/rollup/validate by running yarn build-combined && yarn lint-build, which are the commands that use this configuration in CircleCI. It also passed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@elas7
Update deprecated features in ESLint configuration files.
dd52384
@facebook-github-bot facebook-github-bot added the CLA Signed label Nov 15, 2021
@sizebot

sizebot commented Nov 15, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Comparing: f320ef8...8ce9b42

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 129.98 kB 129.98 kB = 41.56 kB 41.56 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 134.74 kB 134.74 kB = 42.96 kB 42.96 kB
facebook-www/ReactDOM-prod.classic.js = 424.31 kB 424.31 kB = 78.20 kB 78.20 kB
facebook-www/ReactDOM-prod.modern.js = 412.87 kB 412.87 kB = 76.47 kB 76.47 kB
facebook-www/ReactDOMForked-prod.classic.js = 424.31 kB 424.31 kB = 78.20 kB 78.20 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 8ce9b42

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elas7
Merge branch 'main' into eslint-config-update
8ce9b42
@gaearon
gaearon merged commit 09d9b17 into react:main Nov 23, 2021
@gaearon

gaearon commented Nov 23, 2021

Copy link
Copy Markdown
Collaborator

thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elas7
elas7 deleted the eslint-config-update branch November 24, 2021 08:29
facebook-github-bot pushed a commit to react/react-native that referenced this pull request Nov 29, 2021
Andrei Shikov @facebook-github-bot
React Native sync for revisions c0c71a8...c1220eb
a596e98
Summary:
This sync includes the following changes:
- **[c1220eb](react/react@c1220ebdd )**: treat empty string as null ([#22807](react/react#22807)) //<salazarm>//
- **[09d9b17](react/react@09d9b1775 )**: Update deprecated features in ESLint configuration files. ([#22767](react/react#22767)) //<Esteban>//
- **[bddbfb8](react/react@bddbfb86d )**: Revert "Fix Node package.json ./ exports deprecation warning ([#22783](react/react#22783))" ([#22792](react/react#22792)) //<Sebastian Silbermann>//
- **[b831aec](react/react@b831aec48 )**: chore(fast-refresh): double check wasMounted ([#22740](react/react#22740)) //<anc95>//
- **[8edeb78](react/react@8edeb787b )**: Fix Node package.json ./ exports deprecation warning ([#22783](react/react#22783)) //<Rin Arakaki>//
- **[fdc1d61](react/react@fdc1d617a )**: Flag for client render fallback behavior on hydration mismatch ([#22787](react/react#22787)) //<salazarm>//
- **[aa19d56](react/react@aa19d569b )**: Add test selectors to experimental build ([#22760](react/react#22760)) //<Brian Vaughn>//
- **[520ffc7](react/react@520ffc77a )**: Use globalThis if possible for native fetch in browser build ([#22777](react/react#22777)) //<Jiachi Liu>//
- **[afbc2d0](react/react@afbc2d08f )**: Remove unused react-internal/invariant-args ESLint rule. ([#22778](react/react#22778)) //<Esteban>//
- **[ca94e26](react/react@ca94e2680 )**: Remove 'packages/shared/invariant.js' ([#22779](react/react#22779)) //<Esteban>//
- **[8356471](react/react@83564712b )**: Move SuspenseList to experimental channel ([#22765](react/react#22765)) //<Andrew Clark>//
- **[d4144e6](react/react@d4144e6e5 )**: fix : grammatical typo for test description ([#22764](react/react#22764)) //<Brijesh Prasad>//
- **[0b32951](react/react@0b329511b )**: chore: fix comment typo ([#22657](react/react#22657)) //<Han Han>//
- **[e6f60d2](react/react@e6f60d2ad )**: fix typos ([#22715](react/react#22715)) //<180909>//

Changelog:
[General][Changed] - React Native sync for revisions c0c71a8...c1220eb

jest_e2e[run_all_tests]

Reviewed By: yungsters

Differential Revision: D32646433

fbshipit-source-id: c534ee7a17141634700c90fc2c7b34bfbe17887a
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
@elas7 @zhengjitf
Update deprecated features in ESLint configuration files. (react#22767)
527fadc
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
@elas7
Update deprecated features in ESLint configuration files. (react#22767)
e345908
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@elas7
Update deprecated features in ESLint configuration files. (react#22767)
bb8c05e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@elas7 @sizebot @gaearon @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.