summaryrefslogtreecommitdiff
path: root/.eslintrc-es2015
blob: 2908e3be6cb9e33f99f86596a57a343d52ed0082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# This file contains rules which should only be enabled in
# ES2015-based projects.
extends: openstack

parserOptions:
  ecmaVersion: 6
  sourceType: module

rules:
  # disallow unnecessary .call() and .apply()
  # http://eslint.org/docs/rules/no-useless-call
  no-useless-call: 2

  # require let or const instead of var
  # http://eslint.org/docs/rules/no-var
  no-var: 2

  # suggest using arrow functions as callbacks
  # http://eslint.org/docs/rules/prefer-arrow-callback
  prefer-arrow-callback: 2

  # suggest using the spread operator instead of .apply().
  # http://eslint.org/docs/rules/prefer-spread
  prefer-spread: 2

  # suggest using the rest parameters instead of arguments
  # http://eslint.org/docs/rules/prefer-rest-params
  prefer-rest-params: 2