Skip to content

Instantly share code, notes, and snippets.

@hashg
Forked from tracker1/.eslintrc.js
Created May 12, 2020 02:31
Show Gist options
  • Save hashg/5114b609a42debdbb9ea64791cc8164e to your computer and use it in GitHub Desktop.
Save hashg/5114b609a42debdbb9ea64791cc8164e to your computer and use it in GitHub Desktop.
eslint-prettier
module.exports = {
parser: 'babel-eslint',
extends: ['plugin:prettier/recommended', 'prettier/react'],
plugins: ['prettier', 'jest'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
ecmaFeatures: {
jsx: true,
},
},
env: {
es2020: true,
node: true,
'jest/globals': true,
},
rules: {
'prettier/prettier': 'error',
'no-new-func': 'off',
'arrow-parens': 0,
},
};
{
...
"devDependencies": {
...
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.19.0",
...
"prettier": "^2.0.2",
...
},
...
}
module.exports = {
printWidth: 120,
tabWidth: 2,
useTabs: false,
singleQuote: true,
trailingComma: 'es5',
parser: 'babel',
jsxBracketSameLine: true,
arrowParens: 'always',
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment