|
18 | 18 |
|
19 | 19 | 'use strict';
|
20 | 20 |
|
| 21 | +// VARIABLES // |
| 22 | + |
| 23 | +var restrictedSyntaxConfig = [ 'error', |
| 24 | + 'ArrowFunctionExpression', |
| 25 | + 'ClassBody', |
| 26 | + 'ClassDeclaration', |
| 27 | + 'ClassExpression', |
| 28 | + 'DebuggerStatement', |
| 29 | + 'ExperimentalRestProperty', |
| 30 | + 'ExperimentalSpreadProperty', |
| 31 | + |
| 32 | + // 'FunctionExpression', |
| 33 | + 'LabeledStatement', |
| 34 | + 'RestElement', |
| 35 | + 'SpreadElement', |
| 36 | + 'TaggedTemplateExpression', |
| 37 | + 'TemplateElement', |
| 38 | + 'TemplateLiteral', |
| 39 | + 'WithStatement', |
| 40 | + 'YieldExpression', |
| 41 | + 'JSXIdentifier', |
| 42 | + 'JSXNamespacedName', |
| 43 | + 'JSXMemberExpression', |
| 44 | + 'JSXEmptyExpression', |
| 45 | + 'JSXExpressionContainer', |
| 46 | + 'JSXElement', |
| 47 | + 'JSXClosingElement', |
| 48 | + 'JSXOpeningElement', |
| 49 | + 'JSXAttribute', |
| 50 | + 'JSXSpreadAttribute', |
| 51 | + 'JSXText', |
| 52 | + 'ExportDefaultDeclaration', |
| 53 | + 'ExportNamedDeclaration', |
| 54 | + 'ExportAllDeclaration', |
| 55 | + 'ExportSpecifier', |
| 56 | + 'ImportDeclaration', |
| 57 | + 'ImportSpecifier', |
| 58 | + 'ImportDefaultSpecifier', |
| 59 | + 'ImportNamespaceSpecifier' |
| 60 | +]; |
| 61 | + |
| 62 | + |
21 | 63 | // MAIN //
|
22 | 64 |
|
23 | 65 | /**
|
|
27 | 69 | */
|
28 | 70 | var overrides = [
|
29 | 71 | {
|
30 |
| - 'env': {}, |
31 | 72 | 'files': [ '[a-z].js' ],
|
32 | 73 | 'rules': {
|
33 | 74 | 'stdlib/repl-namespace-order': 'error'
|
34 | 75 | }
|
| 76 | + }, |
| 77 | + { |
| 78 | + 'files': [ '**/benchmark/*.js' ], |
| 79 | + 'rules': { |
| 80 | + 'no-new-wrappers': 'warn', |
| 81 | + 'max-lines': [ 'warn', { |
| 82 | + 'max': 1000, |
| 83 | + 'skipBlankLines': true, |
| 84 | + 'skipComments': true |
| 85 | + }], |
| 86 | + 'no-restricted-syntax': restrictedSyntaxConfig, |
| 87 | + 'require-jsdoc': 'off', |
| 88 | + 'stdlib/jsdoc-private-annotation': 'off' |
| 89 | + } |
| 90 | + }, |
| 91 | + { |
| 92 | + 'files': [ '**/examples/*.js' ], |
| 93 | + 'rules': { |
| 94 | + 'no-new-wrappers': 'warn', |
| 95 | + 'vars-on-top': 'off', |
| 96 | + 'no-console': 'off', |
| 97 | + 'require-jsdoc': 'off', |
| 98 | + 'stdlib/jsdoc-private-annotation': 'off', |
| 99 | + 'stdlib/vars-order': 'off' |
| 100 | + } |
| 101 | + }, |
| 102 | + { |
| 103 | + 'files': [ '**/test/*.js' ], |
| 104 | + 'rules': { |
| 105 | + 'no-empty-function': 'off', |
| 106 | + 'no-new-wrappers': 'warn', |
| 107 | + 'max-lines': [ 'warn', { |
| 108 | + 'max': 1000, |
| 109 | + 'skipBlankLines': true, |
| 110 | + 'skipComments': true |
| 111 | + }], |
| 112 | + 'no-restricted-syntax': restrictedSyntaxConfig, |
| 113 | + 'require-jsdoc': 'off', |
| 114 | + 'stdlib/jsdoc-private-annotation': 'off', |
| 115 | + 'no-undefined': 'off' |
| 116 | + } |
35 | 117 | }
|
36 | 118 | ];
|
37 | 119 |
|
|
0 commit comments