Skip to content

Instantly share code, notes, and snippets.

@tracker1
Created May 11, 2020 23:07
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tracker1/e6c2befae41856da27973cf22cf2f346 to your computer and use it in GitHub Desktop.
Save tracker1/e6c2befae41856da27973cf22cf2f346 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