Skip to content

Instantly share code, notes, and snippets.

@ivanauliaa
Last active December 12, 2021 10:23
Show Gist options
  • Save ivanauliaa/09472daeb6b10188dcb2d7ca049f49fc to your computer and use it in GitHub Desktop.
Save ivanauliaa/09472daeb6b10188dcb2d7ca049f49fc to your computer and use it in GitHub Desktop.
My ReactJS ESLint AirBNB style configuration
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