包详细信息

eslint-config-twilio

twilio-labs59.5kMIT2.0.0

Twilio's ESLint config

config, eslint, eslintconfig, javascript

自述文件

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
}],

更新日志

Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by auto-changelog.

v1.31.0

16 December 2020

  • update bootstrap and fix tests #98
  • fix bootstrap/link a556d7e

v1.30.2

15 December 2020

v1.30.1

15 December 2020

v1.30.0

15 December 2020

  • bump deps #97

v1.29.1

14 September 2020

  • Fix ts linter #95

v1.29.0

8 September 2020

v1.28.0

15 July 2020

  • audit and bump packages #92

v1.27.0

8 July 2020

  • docs: add andreasonny83 as a contributor #89
  • Fix Prettier rules #88
  • append package-lock ad135db

v1.26.0

12 June 2020

  • No only #87
  • docs: add vnguyen94 as a contributor #86
  • docs: update CONTRIBUTORS.md [skip ci] 6b39d95
  • docs: update .all-contributorsrc [skip ci] 01baab2

v1.25.0

11 June 2020

  • widen eslint peer dependency requirement #84
  • re-add eslint dev dep 78d3d90

v1.24.1

11 June 2020

  • update files folder for mocha 069c554

v1.24.0

11 June 2020

  • add a basic mocha configuration #85

v1.23.0

27 April 2020

  • update publish script #82
  • bump dependencies and add audit commands #81
  • append lockfiles de943e4

v1.22.1

13 April 2020

  • bump dependencies #79
  • Update README.md #78

v1.22.0

1 April 2020

  • bump dependencies #77

v1.21.0

24 March 2020

  • Bump acorn from 7.1.0 to 7.1.1 in /packages/eslint-config-twilio #71
  • Bump acorn from 7.1.0 to 7.1.1 in /packages/eslint-config-twilio-base #72
  • Bump acorn from 7.1.0 to 7.1.1 in /packages/eslint-config-twilio-ts #73
  • Bump acorn from 7.1.0 to 7.1.1 in /packages/eslint-config-twilio-react #74
  • update default import rules #76
  • bump eslint-plugin-import to 2.20.1 and fix npm package vulnerabilities 698a17b
  • update rules b6c97e6

v1.20.3

13 March 2020

  • fix prettier config order #67
  • Prettier instruction #68
  • update readme #66
  • add lock files 2af6865

v1.20.2

22 November 2019

  • update readme #63
  • push lockfiles 42757a6
  • make the contributor badge style match the remaining badges 47a3ac6

v1.20.1

20 November 2019

  • add contributors to package.json #61

v1.20.0

19 November 2019

  • typescript rule updates #60
  • turn off typedef rule based on @typescript-eslint recommendation cecc8bd
  • add ignoreRhs for @typescript-eslint/no-unnecessary-condition 346c2ef
  • turn off @typescript-eslint/no-unnecessary-condition until the rule is fixed 206c4d2

v1.19.3

14 November 2019

  • fix vulnerabilities found with npm audit and bump typescript to 3.7.2 #59
  • update package-lock 14934f3

v1.19.2

14 November 2019

  • update settings for eslint-plugin-import #58
  • update typescript settings to work with eslint-plugin-import 1279850
  • update package-lock e8b06e9

v1.19.1

13 November 2019

  • fix sort-imports rule override #57
  • update package-lock 535b2dc
  • update readmes cb78121
  • fix sort-imports rule typo 5a547b2

v1.19.0

13 November 2019

  • add eslint-plugin-import #56
  • add module parser option 713f0bf
  • only override sort-import in eslint-config-twilio f030fd0
  • turn off eslint/sort-imports in favor of eslint-plugin-import 60b4357

v1.18.1

13 November 2019

  • add eslint-plugin-import package #55

v1.18.0

12 November 2019

  • add eslint-plugin-react-hooks #54

v1.17.0

12 November 2019

  • add eslint-plugin-jsx-a11y #53
  • update ts readme #52
  • update readme 2332578

v1.16.0

6 November 2019

  • fix prettier rule conflicts with react and ts rules #51
  • update package-lock dee3d29

v1.15.2

5 November 2019

v1.15.1

5 November 2019

  • fix packages #50

v1.15.0

5 November 2019

  • add .gitattributes with eol=lf settings so the configs work with windows #44
  • update package-lock ca6f826

v1.14.0

4 November 2019

  • add linter #49
  • Add basic test #48
  • add linter but dont enable yet 426dc26
  • basic test to make sure linter can atleast run 8e3f670
  • add husky d8f34f2

v1.13.2

1 November 2019

v1.13.1

31 October 2019

v1.13.0

31 October 2019

v1.12.1

30 October 2019

v1.12.0

30 October 2019

  • use rules specifically #42
  • use rules specifically: 39c105d
  • address pr comments 613df7b

v1.11.2

28 October 2019

  • Update CODE_OF_CONDUCT.md #39
  • enable the ts rules f6040d2

v1.11.1

28 October 2019

  • set the env to es6 #40
  • enable the ts rules #38
  • address pr comments 74057bb

v1.11.0

28 October 2019

v1.10.1

23 October 2019

  • fix the badges #36

v1.10.0

23 October 2019

  • update react pkg description #35
  • add typescript rules and package #34
  • move react settings out of rules file #33
  • update object-curly-newline minProperties to 3 #32
  • move react settings out of the rules file e3a1382
  • update main readme to include link to ts package a773fc2

v1.9.0

21 October 2019

v1.8.0

16 October 2019

  • docs: add dkundel as a contributor #29
  • update linter to follow more of the prettier rationale #27
  • docs: add dlemstra as a contributor #28
  • docs: update .all-contributorsrc e2c4f45
  • docs: update .all-contributorsrc 7fad4b2
  • update package-lock 9079d0d

v1.7.1

11 October 2019

  • Use short name in examples instead of long name. #23
  • Changed indentation from 4 to 2 spaces and replaced tabs with spaces. #26
  • Corrected indentation. 73c1b98
  • commit lock file 2b51609
  • Removed spaces. 74628f5

v1.7.0

7 October 2019

  • update package-lock #22
  • update rules #21
  • change indentation to 2 spaces e4c1b30
  • make no-warning-comments and init-declarations more lenient 7c90a5c

v1.6.0

2 October 2019

v1.5.0

1 October 2019

  • add readme #18

v1.4.1

1 October 2019

  • fix rules and add peerDeps #17
  • update publish bin script #16

v1.4.0

1 October 2019

  • separate out the packages #15
  • audit and bump versions #14
  • remove backup fix indentation 7ff525d
  • address pr comments e13b1e5

v1.3.0

26 September 2019

  • move eslint and eslint-plugin-react into dependencies #13

v1.2.2

13 September 2019

  • add eslint-plugin-react as a peer dependency and sort package.json #12
  • sort package.json de32d2e
  • add eslint-plugin-react as a peer dependency 11dec94

v1.2.1

12 September 2019

v1.2.0

12 September 2019

v1.1.0

13 August 2019

  • React rules #10
  • add react rules 35167c8
  • include react rules in index.js and remove deprecated react/jsx-space-before-closing rule 2d6c0bb
  • update readme 69d5d2d

v1.0.1

12 August 2019

  • update repo url #5
  • docs: add theryankennedy as a contributor #9
  • docs: add ktalebian as a contributor #7
  • docs: add ahcai as a contributor #6
  • add package.json, license, and travis.yml #4
  • Add ESLint rules #3
  • set up repo #1
  • add test so travis passses 9f722da
  • fix rules f0c9c2f
  • add possible errors, best practices, variables, and node rules 0c958f7