https://github.com/philip-bui/eslint-config-react-native-lit
Highly opinionated ESLint config for React-Native.
https://github.com/philip-bui/eslint-config-react-native-lit
code-style eslint eslint-config eslint-config-react-native react-native
Last synced: 3 months ago
JSON representation
Highly opinionated ESLint config for React-Native.
- Host: GitHub
- URL: https://github.com/philip-bui/eslint-config-react-native-lit
- Owner: philip-bui
- License: mit
- Created: 2019-12-02T12:11:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T14:38:31.000Z (over 2 years ago)
- Last Synced: 2025-02-08T05:16:26.347Z (4 months ago)
- Topics: code-style, eslint, eslint-config, eslint-config-react-native, react-native
- Language: JavaScript
- Homepage:
- Size: 850 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESLint Config React Native
[](https://github.com/philip-bui/eslint-config-react-native-lit/actions)
[](https://www.npmjs.com/package/eslint-config-react-native-lit)
- [Airbnb Javascript Style Guide](https://github.com/airbnb/javascript) - A mostly reasonable approach to JavaScript.
- [Prettier](https://github.com/prettier/eslint-plugin-prettier) - An opinionated code formatter.
- [ESLint Plugin React](https://github.com/yannickcr/eslint-plugin-react) - React specific linting rules for ESLint.
- [ESLint Plugin React Native](https://github.com/intellicode/eslint-plugin-react-native) - React Native plugin for ESLint.
- [ESLint Plugin Imports](https://github.com/benmosher/eslint-plugin-import) - ESLint plugin with rules that help validate proper imports.
- [ESLint Plugin Accessibility](https://github.com/evcohen/eslint-plugin-jsx-a11y) - Static AST checker for a11y rules on JSX elements.
- [ESLint Plugin React Redux](https://github.com/DianaSuvorova/eslint-plugin-react-redux) - Enforcing best practices for react-redux.
- [ESLint Plugin React Hooks](https://github.com/facebook/react/tree/master/packages/eslint-plugin-react-hooks) - This ESLint plugin enforces the [Rules of Hooks](https://reactjs.org/docs/hooks-rules.html).
- [ESLint Plugin Jest](https://github.com/jest-community/eslint-plugin-jest) - ESLint plugin for Jest.
- [ESLint Plugin Comments](https://github.com/mysticatea/eslint-plugin-eslint-comments) - Additional ESLint rules for directive comments of ESLint.## Installation
```bash
$ npm install eslint-config-react-native-lit --save-dev
``````bash
$ yarn add -D eslint-config-react-native-lit
```## Usage
`.eslintrc`
```js
{
"extends": ["react-native-lit"]
}
````package.json`
```json
"eslintConfig": {
"extends": ["react-native-lit"]
},
```## Rules Order of Precedence
- Recommended [Prettier React](https://github.com/prettier/eslint-config-prettier/blob/master/react.js) rules.
- Recommended [Airbnb React](https://www.npmjs.com/package/eslint-config-airbnb#eslint-config-airbnb-1) rules which includes [imports](https://www.npmjs.com/package/eslint-plugin-import#rules) and [accessibility](https://www.npmjs.com/package/eslint-plugin-jsx-a11y#supported-rules) and React's [Rule of Hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks#valid-and-invalid-examples).
- Recommended [ESLint React Native](https://www.npmjs.com/package/eslint-plugin-react-native#list-of-supported-rules) rules except [sort styles alphabetically](https://github.com/intellicode/eslint-plugin-react-native/blob/HEAD/docs/rules/sort-styles.md).
- Recommended [ESLint React Redux](https://www.npmjs.com/package/eslint-plugin-react-redux#usage) rules.
- Recommended [ESLint Jest](https://www.npmjs.com/package/eslint-plugin-jest#recommended) and [style](https://www.npmjs.com/package/eslint-plugin-jest#style) rules.
- Recommended [ESLint comments](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/) rules.