1.6.3 • Published 1 month ago

eslint-config-kyt v1.6.3

Weekly downloads
3,150
License
Apache-2.0
Repository
github
Last release
1 month ago

kyt ESLint Linter and JavaScript Style Guide

This is an extension of the Airbnb JavaScript and React style guides and ESLint linter. Overrides, additions and warnings have been added to this document and the project lint configuration.

Table of Contents

  1. Install
  2. JavaScript Overrides
  3. React Overrides
  4. ESLint Additions
  5. Changelog

Install

Note, installing kyt or setting up a starter-kyt will install this package automatically. If you want to install this linter extension separately, follow these install instructions. If you have kyt installed and you want to override the linter configuration, skip to step (2).

  1. Install the eslint-config-kyt node module and its dependencies:
    npm install eslint prettier eslint-config-kyt eslint-config-airbnb eslint-plugin-import eslint-plugin-json eslint-plugin-jsx-a11y eslint-plugin-react eslint-config-prettier eslint-plugin-prettier prettier-eslint-cli --save-dev
  2. Copy the following into an .eslintrc in your project:
{
  "extends": "eslint-config-kyt",
  "rules": {
    /* If you must, override rules here :P */
  }
}

Prettier Support

If you need to format code in your codebase, run the prettier-eslint command:

node_modules/.bin/prettier-eslint src/**/*.js --write

To keep things formatted as you develop, install an editor package. See more here.

JavaScript Overrides

11.1 Don't use iterators. - This eslint rule has been overridden to allow iterators, but using JavaScript higher-order functions is still preferred.

11.2 Don't use generators for now. - This eslint rule has been overridden. It is ok to use generators in node.js but it is advised not to use them on the client-side.

19.2 Additional trailing comma: Yup. eslint: comma-dangle - This eslint rule is overridden for functions to work with older versions of node.

React Overrides

Ordering - Nah.

Eslint Additions

no-lonely-if - Disallow if as the only statement in an else block.

max-nested-callbacks - Enforces a maximum depth that callbacks can be nested to increase code clarity. (5)

constructor-super - Aimed to flag invalid/missing super() calls.

no-this-before-super - Aimed to flag this/super keywords before super() callings.

prefer-spread - Aimed to flag usage of Function.prototype.apply() that can be replaced with the spread operator.

Changelog

1.0.0-alpha.1 - 10/23/17

  • Upgrades ESLint and dependencies to 3.19.0 and Prettier to 1.5.2.

0.5.0 - 09/16/17

  • Adds rule to restrict server imports. If you have a src/server directory, you will need to add this .eslintrc.js into the root of the server directory. This may be a breaking change if you have any server imports in your project from outside of the src/server directory.

0.4.0 - 07/07/17

BREAKING CHANGES

  1. Adds Prettier which may be a breaking change as your files might need some minor linting updates. Install Prettier into your favorite editor and/or node_modules/.bin/prettier-eslint src/**/*.js --write to apply the updates. If you manually installed, please note the new Prettier modules above that need to be installed.
  2. Upgrades the following eslint plugins:

0.3.2 - 04/09/17

Upgrades eslint to version 3.19 for fix below.

BREAKING CHANGES

FEATURES

FIXES

  • fixes no-restricted-syntax error in linter #459.

0.3.1 - 03/27/17

Upgrades eslint to version 3.18 for fix below.

BREAKING CHANGES

FEATURES

FIXES

Fixes the following error:

Configuration for rule "no-unused-expressions" is invalid:
Value "data["0"].allowTaggedTemplates" has additional properties.

More here: https://github.com/eslint/eslint/issues/7632

0.3.0 - 03/23/17

This release upgrades linter dependencies, fixing (among other things) no-unused-prop-types false positives:

BREAKING CHANGES

FEATURES

FIXES

0.2.0 - 02/07/17

BREAKING CHANGES

dependencies were converted to peerDependencies and kyt now includes the dependencies. If you're using kyt, then an npm install should be enough. If you installed this package as a standalone extension then you'll need to follow the Installation instructions and npm install the named dependencies.

FEATURES

FIXES

0.0.1 - 0.1.0 - 12/08/16 - life

1.6.4-alpha.14

1 month ago

1.6.4-alpha.13

1 month ago

1.6.4-alpha.10

1 month ago

1.6.3

1 year ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.11

3 years ago

1.5.10

3 years ago

1.5.9

3 years ago

1.5.8

3 years ago

1.5.7

3 years ago

1.5.5

3 years ago

1.5.6

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.15

3 years ago

1.4.14

3 years ago

1.4.13

3 years ago

1.4.8

3 years ago

1.4.6

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.7

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.13

3 years ago

1.3.12

3 years ago

1.3.11

3 years ago

1.3.10

3 years ago

1.3.7

3 years ago

1.3.9

3 years ago

1.3.6

4 years ago

1.3.5

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0-beta.40.1

4 years ago

1.0.0-beta.40.0

4 years ago

1.0.0-beta.39

4 years ago

1.0.0-beta.38

4 years ago

1.0.0-beta.37

4 years ago

1.0.0-beta.36

4 years ago

1.0.0-beta.35

4 years ago

1.0.0-beta.34

4 years ago

1.0.0-beta.33

4 years ago

1.0.0-beta.32

4 years ago

1.0.0-beta.31

4 years ago

1.0.0-beta.30

4 years ago

1.0.0-beta.29

4 years ago

1.0.0-beta.26

4 years ago

1.0.0-beta.27

4 years ago

1.0.0-beta.24

4 years ago

1.0.0-beta.4

4 years ago

1.0.0-beta.5

4 years ago

1.0.0-beta.0

4 years ago

1.0.0-beta.1

4 years ago

1.0.0-alpha.18

4 years ago

1.0.0-alpha.17

4 years ago

1.0.0-hot.17

4 years ago

1.0.0-hot.16

4 years ago

1.0.0-hot.15

4 years ago

1.0.0-hot.18

4 years ago

1.0.0-alpha.10

4 years ago

1.0.0-alpha.11

4 years ago

1.0.0-alpha.9

4 years ago

1.0.0-alpha.5

4 years ago

1.0.0-alpha.0

4 years ago

0.9.1-alpha.0

4 years ago

1.0.0-alpha.15

6 years ago

1.0.0-alpha.14

6 years ago

1.0.0-alpha.13

6 years ago

1.0.0-alpha.12

6 years ago

1.0.0-alpha.7

6 years ago

1.0.0-alpha.6

6 years ago

1.0.0-alpha.4

6 years ago

1.0.0-alpha.3

6 years ago

1.0.0-alpha.8

6 years ago

1.0.0-alpha.2

7 years ago

1.0.0-alpha.1

7 years ago

0.5.0

7 years ago

0.5.0-alpha.1

7 years ago

0.4.1-alpha.2

7 years ago

0.4.1-alpha.1

7 years ago

0.4.0

7 years ago

0.4.0-rc.3

7 years ago

0.4.0-rc.2

7 years ago

0.4.0-rc.1

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.3.0-beta.2

7 years ago

0.3.0-beta.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago

0.0.1

7 years ago

0.0.1-alpha.1

7 years ago