eslint-config-fdr-cx
v0.2.0
Published
Eslint configuration for FDR CX javascript projects
Downloads
41
Maintainers
Readme
eslint-config-fdr-cx
Why
We've had some great success with a few of our linters from different projects, but they are exclusively being used. This configuration takes all that neat magic from our JS/Node/React projects and dumps them all into one place. Like always, any eslint rule is overridable; feel free to turn off/change particular rules to meet your development experience needs.
Install
yarn:
yarn add eslint-config-fdr-cx
npm:
npm install eslint-config-fdr-cx
installing peer dependencies:
npx install-peerdeps --dev eslint-config-fdr-cx
Usage
Add fdr-cx
to the extends section of your .eslintrc configuration file. You can omit the eslint-plugin-
prefix:
{
"extends": [
//...other configs...
"fdr-cx"
]
}
To use the React specific config simply add react to the config name like follows.
Note the React config shares all of the same rules as the base Javascript one.
{
"extends": [
//...other configs...
"fdr-cx/react"
]
}
Overwrite any rules you would like to in the rules section.
{
"overrides": [
{
//...other overrides...
"rules": {
"indent": "always"
}
}
]
Configured Rules List
Default (Javascript)
- arrow-body-style:
- arrow-body-style:
- class-methods-use-this:
- comma-dangle:
- complexity:
- curly:
- func-names:
- handle-callback-err:
- import/first:
- import/no-unresolved:
- indent:
- jest/no-export:
- jest/no-focused-tests:
- jest/no-identical-title:
- jest/valid-expect:
- jest/valid-title:
- keyword-spacing:
- max-len:
- no-console:
- no-multiple-empty-lines:
- no-shadow:
- no-tabs:
- no-undef:
- no-unused-vars:
- node/no-missing-import:
- node/no-missing-require:
- node/no-unsupported-features/es-syntax:
- object-curly-spacing:
- object-shorthand:
- padding-line-between-statements:
- prettier/prettier:
- radix:
- semi:
- sort-keys-fix/sort-keys-fix:
React
- react-hooks/exhaustive-deps:
- react-hooks/rules-of-hooks:
- react/jsx-filename-extension:
- react/jsx-first-prop-new-line:
- react/jsx-fragments:
- react/jsx-max-props-per-line:
- react/jsx-props-no-spreading:
- react/jsx-sort-props:
- react/no-unused-prop-types:
- react/prop-types:
- react/react-in-jsx-scope: