eslint-config-qlean-react-native
v3.0.0
Published
Qlean ESLint config for React Native
Downloads
7
Readme
eslint-config-qlean-react-native
Installation
Install config with peerDependencies with following command:
npm install -D eslint-config-qlean-react-native \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected]
Usage
Add "extends": "qlean-react-native"
to your .eslintrc
Motivation
global-require
"global-require": 0
Rule is redundant without Node.js
react/jsx-filename-extension
"react/jsx-filename-extension": [2, { "extensions": [".js"] }]
Use JSX only inside files with .js
extension
react/jsx-curly-spacing
"react/jsx-curly-spacing": [2, "never", { "allowMultiline": false }]
Use stricter option for disallow spaces in paired tags
react/jsx-tag-spacing
"react/jsx-tag-spacing": [2, {
"closingSlash": "never",
"beforeSelfClosing": "never",
"afterOpening": "never"
}]
Forbid spaces near closing bracket
react/destructuring-assignment
"react/destructuring-assignment": [always, { "ignoreClassFields": true }]
Allow to omit destructing props inside classes
react-native/split-platform-components
"react-native/split-platform-components": 2
Use platform specific filenames when you use platform specific components
react-native/no-inline-styles
"react-native/no-inline-styles": 2
Inline styles negative affect performance
react-native/no-color-literals
"react-native/no-color-literals": 2
Reuse color variables throughout codebase
no-loops/no-loops
"no-loops/no-loops": 2
Disallow loops (for, for-in, while, do-while, for-of).