Last active
December 12, 2021 10:23
-
-
Save ivanauliaa/09472daeb6b10188dcb2d7ca049f49fc to your computer and use it in GitHub Desktop.
My ReactJS ESLint AirBNB style configuration
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, | |
}, | |
extends: [ | |
'plugin:react/recommended', | |
'airbnb', | |
], | |
parserOptions: { | |
ecmaFeatures: { | |
jsx: true, | |
}, | |
ecmaVersion: 12, | |
sourceType: 'module', | |
}, | |
plugins: [ | |
'react', | |
], | |
rules: { | |
'no-console': 'off', | |
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }], | |
'react/function-component-definition': [0, { | |
namedComponents: 'function-declaration', | |
unnamedComponents: 'function-expression', | |
}], | |
'react/prefer-stateless-function': [0, { ignorePureComponents: true }], | |
'linebreak-style': 0, | |
'arrow-body-style': ['error', 'always'], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment