1.0.7 • Published 5 years ago
eslint-config-litcharts v1.0.7
LitCharts ESLint Config
Installation
- Install the library:
yarn add --dev eslint-config-litcharts - Install dev dependencies:
yarn add --dev eslint@^6.8 eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks@^2.5.0 - Add
"extends": "eslint-config-litcharts"to the.eslintrcfile, or"extends": "eslint-config-litcharts/react-native"for react native.
Development
Once you've made changes and want to test them locally, do the following steps. See the docs for more info.
yarn link- Then, in your project that wants to use your shareable config, type:
yarn link eslint-config-litcharts - Be sure to unlink in other projects when done via
yarn unlink eslint-config-litchartsso the proper package frompackage.jsonis used.
Linting
The base linting rules come from airbnb's shared linting package.
React Native specific rules come from eslint-config-react-native.
Changing rules
To overwrite rules that you don't like, add the specific rule to rules/sharedRules for all configs or rules/nativeRules for React Native specific rules. Create a PR so we can discuss if we like semicolons or not.
Prettier
See prettier docs prettier.
- Install prettier on your word editor
- In
package.jsonadd a"prettier": "eslint-config-litcharts/prettier-config"line.
TODO
- Add eslint-jest: https://www.npmjs.com/package/eslint-plugin-jest
- Any kind of precommit hooks using something like
husky?