1.1.2 • Published 6 years ago

eslint-config-guild v1.1.2

Weekly downloads
463
License
ISC
Repository
github
Last release
6 years ago

At Guild, our JavaScript style is based on JavaScript Standard Style with a few exceptions:

  • Function declarations should not have a space before the parentheses:
    function name (arg) { ... } // ✗ avoid
    function name(arg) { ... } // ✓ ok
  • The in `yield` expressions and generator functions must have a space after, but not before:

    yield * increment() // ✗ avoid
    yield *increment() // ✗ avoid
    yield* increment() // ✓ ok
    
    function * increment() { ... } // ✗ avoid
    function *increment() { ... } // ✗ avoid
    function* increment() { ... } // ✓ ok

In addition to JavaScript Standard Style, we also include extend jsx-a11y/recommended and plugin:react/recommended.

Getting Started

We expose two seperate configs based on the language of your project: Javascript or Typescript. Both follow the JavaScript Standard Style, but Typescript include langue specific rules related to the best practacies of types (@typescript-eslint/recommended).

Install Javascript Config npm

To install the javascript config, run:

yarn add -D eslint-config-guild 

If the peer dependicies are needed, run

yarn add -D eslint eslint-plugin-chai-friendly eslint-plugin-cypress eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-node eslint-plugin-promise eslint-plugin-react eslint-plugin-standard eslint-standard-config eslint-config-prettier eslint-plugin-prettier

Install Typescript Config npm

To install the typescript config, run:

yarn add -D eslint-config-guild-typescript

If the peer dependicies are needed, run

yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-plugin-chai-friendly eslint-plugin-cypress eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-react eslint-plugin-standard eslint-standard-config typescript

Usage

Extend your eslint config with the installed guild config.

For javascript:

{
  "extends": "guild"
}

For typescript:

{
  "extends": "guild-typescript"
}

Note: We omitted the eslint-config- prefix since it is automatically assumed by ESLint

Codeclimate Usage

In your projects .codeclimate.yml config, add the appropriate config:

prepare:
  fetch:
  # For typescript
+    - url: 'https://cdn.jsdelivr.net/npm/eslint-config-guild-typescript@{ersion}'
+      path: '.eslintrc.js'

  # For Javascript
+    - url: 'https://cdn.jsdelivr.net/npm/eslint-config-guild@{ersion}'
+      path: '.eslintrc.js'

plugins:
+ eslint:
+  enabled: true
+  channel: eslint-5
1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.5

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago