UNPKG

3.48 kBJavaScriptView Raw
1'use strict'
2
3module.exports = {
4 parser: 'babel-eslint',
5 parserOptions: {
6 ecmaVersion: 6
7 },
8 env: {
9 es6: true
10 },
11 rules: {
12 /**
13 * ECMAScript 6
14 * These rules are only relevant to ES6 environments.
15 */
16
17 'arrow-body-style': [
18 2,
19 'as-needed'
20 ], // require braces in arrow function body - http://eslint.org/docs/rules/arrow-body-style
21 'arrow-parens': [
22 1,
23 'always'
24 ], // require parens in arrow function arguments - http://eslint.org/docs/rules/arrow-parens
25 'arrow-spacing': 1, // require space before/after arrow function’s arrow - http://eslint.org/docs/rules/arrow-spacing
26 'constructor-super': 2, // verify calls of super() in constructors - http://eslint.org/docs/rules/constructor-super
27 'generator-star-spacing': 2, // enforce spacing around the * in generator functions - http://eslint.org/docs/rules/generator-star-spacing
28 'no-class-assign': 2, // disallow modifying variables of class declarations - http://eslint.org/docs/rules/no-class-assign
29 'no-confusing-arrow': 1, // disallow arrow functions where they could be confused with comparisons - http://eslint.org/docs/rules/no-confusing-arrow
30 'no-const-assign': 2, // disallow modifying variables that are declared using const - http://eslint.org/docs/rules/no-const-assign
31 'no-dupe-class-members': 2, // disallow duplicate name in class members - http://eslint.org/docs/rules/no-dupe-class-members
32 'no-new-symbol': 2, // disallow use of the new operator with the Symbol object - http://eslint.org/docs/rules/no-new-symbol
33 'no-restricted-imports': 0, // restrict usage of specified modules when loaded by import declaration - http://eslint.org/docs/rules/no-restricted-imports
34 'no-this-before-super': 2, // disallow use of this/super before calling super() in constructors - http://eslint.org/docs/rules/no-this-before-super
35 'no-useless-constructor': 1, // disallow unnecessary constructor - http://eslint.org/docs/rules/no-useless-constructor
36 'no-var': 2, // require let or const instead of var - http://eslint.org/docs/rules/no-var
37 'object-shorthand': 1, // require method and property shorthand syntax for object literals - http://eslint.org/docs/rules/object-shorthand
38 'prefer-arrow-callback': 1, // suggest using arrow functions as callbacks - http://eslint.org/docs/rules/prefer-arrow-callback
39 'prefer-const': 1, // suggest using const declaration for variables that are never reassigned after declared - http://eslint.org/docs/rules/prefer-const
40 'prefer-reflect': 1, // suggest using Reflect methods where applicable - http://eslint.org/docs/rules/prefer-reflect
41 'prefer-rest-params': 2, // suggest using the rest parameters instead of arguments - http://eslint.org/docs/rules/prefer-rest-params
42 'prefer-spread': 2, // suggest using the spread operator instead of .apply() - http://eslint.org/docs/rules/prefer-spread
43 'prefer-template': 1, // suggest using template literals instead of strings concatenation - http://eslint.org/docs/rules/prefer-template
44 'require-yield': 1, // disallow generator functions that do not have yield - http://eslint.org/docs/rules/require-yield
45 'template-curly-spacing': 2, // enforce spacing around embedded expressions of template strings - http://eslint.org/docs/rules/template-curly-spacing
46 'yield-star-spacing': 2 // enforce spacing around the * in yield* expressions - http://eslint.org/docs/rules/yield-star-spacing
47 }
48}