Skip to content

Instantly share code, notes, and snippets.

@mtwzim
Last active February 22, 2021 12:53
Show Gist options
  • Save mtwzim/fc261f0b3b42fe3bd3e0c374518d6c18 to your computer and use it in GitHub Desktop.
Save mtwzim/fc261f0b3b42fe3bd3e0c374518d6c18 to your computer and use it in GitHub Desktop.
Minhas configurações basicas de lint para utilizar no react native (javascript)
root=true
[*]
end_of_line=auto
indent_style=space
indent_size=2
charset=utf-8
trim_trailing_whitespace=true
insert_final_newline=true
module.exports = {
env: {
es6: true,
},
extends: ['airbnb', 'prettier', 'prettier/react'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
__DEV__: 'readonly',
},
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react', 'prettier'],
rules: {
'prettier/prettier': 'warn',
'react/jsx-filename-extension': [
'warn',
{
extensions: ['.jsx', '.js'],
},
],
'import/prefer-default-export': 'off',
'no-unused-vars': 'warn',
'react/prefer-stateless-function': 'off',
},
};
{
"singleQuote": true,
"trailingComma": "es5"
"endOfLine": "auto"
}

Minhas configurações basicas de lint para utilizar no react native (javascript)

Comandos antes de utilizar os arquivos abaixo em um projeto

$ yarn add eslint
$ yarn eslint --init
$ yarn add prettier eslint-config-prettier eslint-plugin-prettier babel-eslint -D  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment