Last active
February 27, 2022 15:53
-
-
Save mmaous/e10c57a84583055949d2f5d2c424e214 to your computer and use it in GitHub Desktop.
Eslint for Reactjs Project!
This file contains hidden or 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, | |
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