Enable lints for React Components (#1515)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1515 The out-of-the-box docusaurus template doesn't enable linting for React components. This enables those, fixes the errors, and does dome cleanup around the area (e.g. autofocus is a lot more sane). Reviewed By: vincentriemer Differential Revision: D52156109 fbshipit-source-id: f32fede3ec4f8a42ecb7f9d77caa2a30581f35ee
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bac80cafba
commit
baf95897cb
26
website-next/.eslintrc.cjs
Normal file
26
website-next/.eslintrc.cjs
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
root: false,
|
||||
extends: [
|
||||
'plugin:react/recommended',
|
||||
'plugin:react/jsx-runtime',
|
||||
'plugin:react-hooks/recommended',
|
||||
],
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'react/prop-types': 'off',
|
||||
'react/no-unstable-nested-components': 'error',
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user