Created
February 3, 2023 02:11
-
-
Save aluissp/254fef0a6a6eeedf7cb7db0a13580e4f to your computer and use it in GitHub Desktop.
Eslint setup for reactjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
env: { | |
browser: true, | |
es2021: true, | |
}, | |
settings: { | |
react: { | |
version: 'detect', | |
}, | |
}, | |
extends: [ | |
'plugin:react/recommended', | |
'plugin:react/jsx-runtime', | |
'standard', | |
'eslint-config-prettier', | |
], | |
overrides: [], | |
parserOptions: { | |
ecmaVersion: 'latest', | |
sourceType: 'module', | |
}, | |
plugins: ['react'], | |
rules: { | |
// 'no-unused-vars': 'off', | |
// 'no-unused-expressions': 'off', | |
// 'react/prop-types': 0, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to install eslint with prettier
Commands
I'm usign yarn, but you can use another package manager.
If you're going to use jest for tests, install this plugin
Then create eslint config file with the following command.