@chaos-theory/eslint-config
v1.0.8
Published
Set of eslint configs and rules recommended by Chaos Theory for React React Native and NodeJS projects. These have been chunked into React, Imports, Promises etc.
Readme
Chaos Theory Eslint Config
Installation
1. Install the package and related libraries
yarn add -D @chaos-theory/eslint-config eslint-plugin-prettier eslint-plugin-react eslint-plugin-promise @typescript-eslint/eslint-pluginNOTE: This library requires eslint >= 8 to work
2. Add the library to local eslintrc.js file
module.exports = {
extends: [
'@chaos-theory/eslint-config',
'@chaos-theory/eslint-config/react-native',
'@chaos-theory/eslint-config/import',
'@chaos-theory/eslint-config/promise',
],
}@chaos-theory/eslint-configbase config with general rules@chaos-theory/eslint-config/reactfor react projects.@chaos-theory/eslint-config/react-nativefor react native projects (this include@chaos-theory/eslint-config/react)@chaos-theory/eslint-config/importfor import rules. You can override the import order rule by updating your rules locally in youreslintrc.js
// Example
'import/order': [
'error',
{
'newlines-between': 'always',
pathGroups: [
{
pattern:
'{@config,@gql-types,@assets/**,@ui/**,@features/**,@util/**,@styles/**,@services/**,@constants/**,@navigation/**,@hooks/**,@redux/**,@containers/**,@components/**,@types/**}',
group: 'external',
position: 'after',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
groups: [['builtin', 'external'], 'internal', ['parent', 'sibling', 'index']],
},
],@chaos-theory/eslint-config/promisefor promise rules.
Contribution
- Create an issue with requested rule / bug.
- Create a PR and once approved, merge into master
Release
- Trigger github action to Create release PR.
- Merged the automated PR: This will trigger
npm publishto publish the version to npm.
