租房小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
629 B

6 months ago
  1. module.exports = {
  2. plugins: [
  3. 'react-hooks',
  4. ],
  5. parserOptions: {
  6. ecmaFeatures: {
  7. jsx: true,
  8. },
  9. },
  10. rules: {
  11. // Enforce Rules of Hooks
  12. // https://github.com/facebook/react/blob/c11015ff4f610ac2924d1fc6d569a17657a404fd/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
  13. 'react-hooks/rules-of-hooks': 'error',
  14. // Verify the list of the dependencies for Hooks like useEffect and similar
  15. // https://github.com/facebook/react/blob/1204c789776cb01fbaf3e9f032e7e2ba85a44137/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
  16. 'react-hooks/exhaustive-deps': 'error',
  17. },
  18. };