Created
February 14, 2020 18:39
-
-
Save jeancabral/a5a2bf71b38a237cea9fcd3306b0c56a to your computer and use it in GitHub Desktop.
Configuração do .eslintrc.js para projetos utilizando GatsbyJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* GatsbyJS: Configurando Eslint e Prettier no Visual Studio Code | |
* https://dev.to/jeancabral/gatsbyjs-configurando-eslint-e-prettier-no-visual-studio-code-5ab8 | |
*/ | |
module.exports = { | |
env: { | |
browser: true, | |
es6: true, | |
}, | |
extends: [ | |
'plugin:react/recommended', | |
'airbnb', | |
'prettier', 'prettier/react' | |
], | |
globals: { | |
Atomics: 'readonly', | |
SharedArrayBuffer: 'readonly', | |
}, | |
parserOptions: { | |
ecmaFeatures: { | |
jsx: true, | |
}, | |
ecmaVersion: 2018, | |
sourceType: 'module', | |
}, | |
plugins: [ | |
'react', | |
'prettier' | |
], | |
rules: { | |
"prettier/prettier": [ | |
"error", | |
{ | |
"singleQuote": true, | |
"printWidth": 120, | |
"trailingComma": "es5" | |
} | |
], | |
"react/jsx-filename-extension": [ | |
1, | |
{ | |
"extensions": [ | |
".js", | |
".jsx" | |
] | |
} | |
], | |
"react/prop-types": 0, | |
"no-unused-vars": [ | |
"error", | |
{ | |
"vars": "local", | |
"args": "none" | |
} | |
], | |
"jsx-a11y/anchor-is-valid": [ | |
"error", | |
{ | |
"components": [ | |
"Link" | |
], | |
"specialLink": [ | |
"to", | |
"hrefLeft", | |
"hrefRight" | |
], | |
"aspects": [ | |
"noHref", | |
"invalidHref", | |
"preferButton" | |
] | |
} | |
] | |
}, | |
settings: { | |
'import/core-modules': [ | |
"react" | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment