Skip to content

Commit

Permalink
fix/ESLint: Resolve unexpected "React version..." warning
Browse files Browse the repository at this point in the history
  • Loading branch information
gbence committed Mar 26, 2024
1 parent 7e04d11 commit bcdc8fc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,21 @@ module.exports = {
},
},
],
settings: {
// Even though we don't use React in our project, for some unknown reason
// ESLint reports the following warning:
//
// ```
// Warning: React version was set to "detect" in eslint-plugin-react
// settings, but the "react" package is not installed. Assuming latest
// React version for linting.
// ```
//
// This "hack" resolves it.
//
// Source: https://github.com/DRD4-7R/eslint-config-7r-building/issues/1
react: {
version: '999.999.999',
},
},
};

0 comments on commit bcdc8fc

Please sign in to comment.