2.0.0 • Published 2 years ago

eslint-config-twilio v2.0.0

Weekly downloads
2,031
License
MIT
Repository
github
Last release
2 years ago

eslint-config-twilio

Version Downloads License

Twilio's approach to JavaScript styling.

Plugins and Extensions

This config includes the following plugins and extensions:

Installation

$ npm install eslint eslint-config-twilio --save-dev

Usage

Add the ESLint config to either your package.json or your .eslintrc:

package.json

{
  "name": "my-project",
  "eslintConfig": {
    "extends": [
      "twilio"
    ]
  }
}

.eslintrc

{
  "extends": [
    "twilio"
  ]
}

Then add the following two scripts for running and fixing your codebase:

{
  "scripts": {
    "lint": "eslint --ext js src/",
    "lint:fix": "npm run lint -- --fix"
  }
}

Prettier

This package makes use of Prettier for setting specific code formatting rules in your project.

If you want to allow your IDE to auto-format your code as you save it, then create a .prettierrc.js and import the base configuration from the eslint-config-twilio.

const baseConfig = require('./node_modules/eslint-config-twilio/rules/prettier');

module.exports = {
  ...baseConfig,
};

You might also want to edit/extend those rules according to your project style-guide. To do that, you will need to make ESLint aware of the changes.

From your .eslintrc file, add the following override rules:

"prettier/prettier": ["warn", {}, {
  "usePrettierrc": true
}],
2.0.0-alpha.0

2 years ago

2.0.0

2 years ago

2.0.1-alpha.0

2 years ago

1.35.1

3 years ago

1.35.0

3 years ago

1.34.2

3 years ago

1.34.0

3 years ago

1.34.1

3 years ago

1.33.1

3 years ago

1.32.0

3 years ago

1.31.0

3 years ago

1.30.2

3 years ago

1.30.0

3 years ago

1.29.0

4 years ago

1.28.0

4 years ago

1.27.0

4 years ago

1.26.0

4 years ago

1.25.0

4 years ago

1.24.0

4 years ago

1.23.0

4 years ago

1.22.1

4 years ago

1.22.0

4 years ago

1.21.0

4 years ago

1.20.3

4 years ago

1.20.2

4 years ago

1.20.1

4 years ago

1.19.2

4 years ago

1.19.1

4 years ago

1.19.0

4 years ago

1.18.1

4 years ago

1.16.0

4 years ago

1.15.2

4 years ago

1.14.0

4 years ago

1.13.2

4 years ago

1.13.1

4 years ago

1.13.0

4 years ago

1.12.1

4 years ago

1.12.0

4 years ago

1.11.1

5 years ago

1.10.1

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago