2.2.1 • Published 4 years ago

@endouble.com/eslint-config-endouble v2.2.1

Weekly downloads
197
License
MIT
Repository
github
Last release
4 years ago

eslint-config-endouble

Endouble's Javascript ESLint configuration, based on AirBnB's

Install and Usage

1. Installing

Make sure you have Node (>=6) installed

yarn add --dev @endouble.com/eslint-config-endouble

2. Using

Create an .eslintrc.json file at the root of your project and add the following configuration:

2.1. Simple setup

For vanilla Javascript code

{
    "extends": "@endouble.com/eslint-config-endouble"
}

2.2. React setup

For React based apps

{
    "extends": "@endouble.com/eslint-config-endouble/react"
}

2.3. CSB setup

For CSB websites

{
    "extends": "@endouble.com/eslint-config-endouble/csb"
}

3. Extra configuration

Add to package.json a script to lint your desired files:

{
    "scripts": {
        "lint": "eslint js/*.js"
    }
}

Rules

Please refer to AirBnB's Styleguide for more information about the linter's rules.

Custom rules

This rules overwrite the ones inherited from AirBnB Styleguide

setuprulesetting
allindent4 spaces, { SwitchCase: 1 }
allmax-len120 characters
allobject-curly-newlineerror, { consistent: true }
reactreact/jsx-indent4 spaces
reactreact/jsx-indent-props4 spaces
reactreact/jsx-filename-extensionoff
reactreact-hooks/rules-of-hookserror
reactreact-hooks/exhaustive-depswarn
reactjsx-a11y/href-no-hashoff
reactjsx-a11y/label-has-forerror, { allowChildren: true }
reactjsx-a11y/anchor-is-validerror, { specialLink: 'to' }
reactimport/no-extraneous-dependencieserror, { devDependencies: true }
reactimport/no-unresolvederror, { commonjs: true, amd: true }

Tests

yarn test

Maintainers

Renan Couto

License

MIT

2.2.1

4 years ago

2.2.0

4 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

6 years ago

1.2.1

6 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.6.0

7 years ago

0.5.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago