Skip to content

Instantly share code, notes, and snippets.

@mmaous
Last active February 27, 2022 15:53
Show Gist options
  • Save mmaous/e10c57a84583055949d2f5d2c424e214 to your computer and use it in GitHub Desktop.
Save mmaous/e10c57a84583055949d2f5d2c424e214 to your computer and use it in GitHub Desktop.
Eslint for Reactjs Project!
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
rules: {
indent: ['error', 2],
'linebreak-style': ['error', 'windows'],
quotes: ['error', 'single'],
semi: [2, 'always', { 'omitLastInOneLineBlock': true }],
eqeqeq: 'error',
'no-trailing-spaces': 'error',
'object-curly-spacing': ['error', 'always'],
'arrow-spacing': [
'error',
{
before: true,
after: true,
},
],
'no-console': 0,
'react/prop-types': 0,
},
settings: {
react: {
version: 'detect',
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment