Skip to content

Instantly share code, notes, and snippets.

@wojtekmaj
Created May 17, 2024 11:38
Show Gist options
  • Save wojtekmaj/dd1b2552b5d7aea230d6b6dc14a10055 to your computer and use it in GitHub Desktop.
Save wojtekmaj/dd1b2552b5d7aea230d6b6dc14a10055 to your computer and use it in GitHub Desktop.
Quick eslint-plugin-react-compiler check
yarn add eslint-plugin-react-compiler --dev
node -e "const fs = require('fs'); const eslintrcJson = JSON.parse(fs.readFileSync('.eslintrc.json')); eslintrcJson.plugins = eslintrcJson.plugins || []; eslintrcJson.plugins.push('react-compiler'); eslintrcJson.rules = eslintrcJson.rules || {}; eslintrcJson.rules['react-compiler/react-compiler'] = 'error'; fs.writeFileSync('.eslintrc.json', JSON.stringify(eslintrcJson, null, 2));"
yarn lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment