UNPKG

1.96 kBJavaScriptView Raw
1var config = require('./config');
2var ERROR = config.ERROR;
3var IGNORE = config.IGNORE;
4
5/**
6 * ### Ruleset: ECMAScript 6
7 *
8 * These rules are only relevant to ES6 environments.
9 *
10 * @see http://eslint.org/docs/rules/#ecmascript-6
11 */
12module.exports = {
13 env: {
14 es6: false
15 },
16 ecmaFeatures: {
17 arrowFunctions: true,
18 blockBindings: true,
19 classes: true,
20 defaultParams: true,
21 destructuring: true,
22 forOf: true,
23 generators: false,
24 modules: true,
25 objectLiteralComputedProperties: true,
26 objectLiteralDuplicateProperties: false,
27 objectLiteralShorthandMethods: true,
28 objectLiteralShorthandProperties: true,
29 spread: true,
30 superInFunctions: true,
31 templateStrings: true,
32 jsx: true
33 },
34 rules: {
35 // require parens in arrow function arguments
36 'arrow-parens': IGNORE,
37 // require space before/after arrow function's arrow
38 'arrow-spacing': IGNORE,
39 // verify super() callings in constructors
40 'constructor-super': IGNORE,
41 // enforce the spacing around the * in generator functions
42 'generator-star-spacing': IGNORE,
43 // disallow modifying variables of class declarations
44 'no-class-assign': IGNORE,
45 // disallow modifying variables that are declared using const
46 'no-const-assign': IGNORE,
47 // disallow to use this/super before super() calling in constructors.
48 'no-this-before-super': IGNORE,
49 // require let or const instead of var
50 'no-var': ERROR,
51 // require method and property shorthand syntax for object literals
52 'object-shorthand': IGNORE,
53 // suggest using of const declaration for variables that are never modified after declared
54 'prefer-const': ERROR,
55 // suggest using the spread operator instead of .apply()
56 'prefer-spread': IGNORE,
57 // suggest using Reflect methods where applicable
58 'prefer-reflect': IGNORE,
59 // disallow generator functions that do not have yield
60 'require-yield': IGNORE
61 }
62};