Skip to content

Instantly share code, notes, and snippets.

@rafaelsq
Last active August 29, 2018 13:40
Show Gist options
  • Save rafaelsq/07b9c4e0279e7cf8707f4ae1cc21f2c1 to your computer and use it in GitHub Desktop.
Save rafaelsq/07b9c4e0279e7cf8707f4ae1cc21f2c1 to your computer and use it in GitHub Desktop.
ESLint + Prettier
module.exports = {
extends: 'eslint:recommended',
env: {
browser: true,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
experimentalObjectRestSpread: true,
},
sourceType: 'module',
},
plugins: ['react'],
rules: {
'react/jsx-uses-vars': ['error'],
'no-unused-vars': ['error', {varsIgnorePattern: '^h$'}],
'max-len': ['error', 120],
'indent': ['error', 4],
'linebreak-style': ['error', 'unix'],
'array-bracket-spacing': ['error', 'never'],
'object-curly-spacing': ['error', 'never'],
'comma-dangle': ['error', 'always-multiline'],
'no-extra-parens': ['error', 'all'],
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'quote-props': ['error', 'consistent-as-needed'],
'no-trailing-spaces': ['error'],
},
}
{
printWidth: 120,
tabWidth: 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment