0.1.12 • Published 2 years ago

@udea-io/eslint-config v0.1.12

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

udea-io Eslint Config

lerna

ESLint shareable config

@udea-io/eslint-config is a shareable configuration package for eslint built on top of eslint-airbnb-config and modified to meet udea-io's own standards.

Installation

  1. Install all peer dependencies
npx install-peerdeps --dev @udea-io/eslint-config
  1. Install @udea-io/eslint-config as a development dependency of your project:
npm install @udea-io/eslint-config --save-dev

Available Configs

@udea-io/eslint-config

The default export contains common rules that are not specific to any framework or environment.

// eslintrc.js
module.exports = {
    extends: ['@udea-io/eslint-config'],
};

@udea-io/eslint-config/react

Extends @udea-io/eslint-config adding specific rules to React.

npm install --save-dev eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-import-resolver-babel-plugin-root-import
// eslintrc.js
module.exports = {
    extends: ['@udea-io/eslint-config/react'],
};

@udea-io/eslint-config/react-native

Extends @udea-io/eslint-config adding specific rules to React Native.

npm install --save-dev eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks @react-native-community/eslint-config @react-native-community/eslint-plugin eslint-plugin-react-native babel-plugin-root-import eslint-import-resolver-babel-plugin-root-import  
// eslintrc.js
module.exports = {
    extends: ['@udea-io/eslint-config/react-native'],
};

@udea-io/eslint-config/node

Extends @udea-io/eslint-config adding specific rules to Node.js.

// eslintrc.js
module.exports = {
    extends: ['@udea-io/eslint-config/node'],
};

@udea-io/eslint-config/mocha

Adds specific rules for the mocha testing framework.

This rule requires installing eslint-plugin-mocha

npm install --save-dev eslint-plugin-mocha
// eslintrc.js
module.exports = {
    extends: ['@udea-io/eslint-config/node', '@udea-io/eslint-config/mocha'],
};

Usage

In order to use this config, choose the one you want and add this configuration to your package.json:

{
  "eslintConfig": {
    "extends": "@udea-io/eslint-config"
  }
}

Or add a .eslintrc.js file to your project root containing:

module.exports = {
    extends: ['@udea-io/eslint-config'],
};

VSCode integration

We recommend turning on VSCode settings to automatically run eslint --fix on save.

"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
}

This will automagically format your code once you save. You don't need VSCode prettier extension enabled or running on save as eslint will automatically run prettier for you.

0.1.11

2 years ago

0.1.12

2 years ago

0.1.10-alpha.1

2 years ago

0.1.10-alpha.0

2 years ago

0.1.9

2 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.4

3 years ago

0.1.5

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.1.0-alpha.0

3 years ago