Skip to content

Instantly share code, notes, and snippets.

@shalomTalker
Created January 26, 2022 20:30
Show Gist options
  • Save shalomTalker/96e212247c542b64fd6f60288aa4f661 to your computer and use it in GitHub Desktop.
Save shalomTalker/96e212247c542b64fd6f60288aa4f661 to your computer and use it in GitHub Desktop.

.eslintrc.js

module.exports = {
  extends: [
    'react-app',
    'prettier',
    'plugin:prettier/recommended',
  ],
  plugins: ['prettier'],
  rules: {
    'react/jsx-first-prop-new-line': [2, 'multiline'],
    'react/jsx-max-props-per-line': [
      2,
      { maximum: 1, when: 'multiline' },
    ],
    'react/jsx-indent-props': [2, 2],
    'react/jsx-closing-bracket-location': [
      2,
      'tag-aligned',
    ],
  },
}

.prettierrc

{
 "semi": false,
 "singleQuote": true,
 "printWidth":80 // default
}

yarn add --save-dev eslint-config-react-app eslint@^8.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment