eslint-config-airbnb-extended 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,30 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var best_practices_1 = __importDefault(require("./rules/best-practices"));
7
- var errors_1 = __importDefault(require("./rules/errors"));
8
- var es6_1 = __importDefault(require("./rules/es6"));
9
- var imports_1 = __importDefault(require("./rules/imports"));
10
- var node_1 = __importDefault(require("./rules/node"));
11
- var strict_1 = __importDefault(require("./rules/strict"));
12
- var style_1 = __importDefault(require("./rules/style"));
13
- var variables_1 = __importDefault(require("./rules/variables"));
14
- exports.default = [
15
- best_practices_1.default,
16
- errors_1.default,
17
- es6_1.default,
18
- imports_1.default,
19
- node_1.default,
20
- strict_1.default,
21
- style_1.default,
22
- variables_1.default,
23
- {
24
- languageOptions: {
25
- parserOptions: {
26
- ecmaVersion: 2018,
27
- sourceType: 'module',
28
- },
29
- },
30
- rules: {},
31
- },
32
- ];
6
+ var base_1 = __importDefault(require("./base"));
7
+ exports.default = {
8
+ base: base_1.default,
9
+ };
@@ -1,146 +1,177 @@
1
1
  declare const _default: {
2
+ name: string;
2
3
  rules: {
3
- 'accessor-pairs': string;
4
- 'array-callback-return': (string | {
4
+ 'accessor-pairs': "off";
5
+ 'array-callback-return': ["error", {
5
6
  allowImplicit: boolean;
6
- })[];
7
- 'block-scoped-var': string;
8
- complexity: (string | number)[];
9
- 'class-methods-use-this': (string | {
7
+ }];
8
+ 'block-scoped-var': "error";
9
+ complexity: ["off", number];
10
+ 'class-methods-use-this': ["error", {
10
11
  exceptMethods: never[];
11
- })[];
12
- 'consistent-return': string;
13
- curly: string[];
14
- 'default-case': (string | {
12
+ }];
13
+ 'consistent-return': "error";
14
+ curly: ["error", string];
15
+ 'default-case': ["error", {
15
16
  commentPattern: string;
16
- })[];
17
- 'default-case-last': string;
18
- 'default-param-last': string;
19
- 'dot-notation': (string | {
17
+ }];
18
+ 'default-case-last': "error";
19
+ 'default-param-last': "error";
20
+ 'dot-notation': ["error", {
20
21
  allowKeywords: boolean;
21
- })[];
22
- 'dot-location': string[];
23
- eqeqeq: (string | {
22
+ }];
23
+ 'dot-location': ["error", string];
24
+ eqeqeq: ["error", string, {
24
25
  null: string;
25
- })[];
26
- 'grouped-accessor-pairs': string;
27
- 'guard-for-in': string;
28
- 'max-classes-per-file': (string | number)[];
29
- 'no-alert': string;
30
- 'no-caller': string;
31
- 'no-case-declarations': string;
32
- 'no-constructor-return': string;
33
- 'no-div-regex': string;
34
- 'no-else-return': (string | {
26
+ }];
27
+ 'grouped-accessor-pairs': "error";
28
+ 'guard-for-in': "error";
29
+ 'max-classes-per-file': ["error", number];
30
+ 'no-alert': "warn";
31
+ 'no-caller': "error";
32
+ 'no-case-declarations': "error";
33
+ 'no-constructor-return': "error";
34
+ 'no-div-regex': "off";
35
+ 'no-else-return': ["error", {
35
36
  allowElseIf: boolean;
36
- })[];
37
- 'no-empty-function': (string | {
37
+ }];
38
+ 'no-empty-function': ["error", {
38
39
  allow: string[];
39
- })[];
40
- 'no-empty-pattern': string;
41
- 'no-empty-static-block': string;
42
- 'no-eq-null': string;
43
- 'no-eval': string;
44
- 'no-extend-native': string;
45
- 'no-extra-bind': string;
46
- 'no-extra-label': string;
47
- 'no-fallthrough': string;
48
- 'no-floating-decimal': string;
49
- 'no-global-assign': (string | {
40
+ }];
41
+ 'no-empty-pattern': "error";
42
+ 'no-empty-static-block': "off";
43
+ 'no-eq-null': "off";
44
+ 'no-eval': "error";
45
+ 'no-extend-native': "error";
46
+ 'no-extra-bind': "error";
47
+ 'no-extra-label': "error";
48
+ 'no-fallthrough': "error";
49
+ 'no-floating-decimal': "error";
50
+ 'no-global-assign': ["error", {
50
51
  exceptions: never[];
51
- })[];
52
- 'no-native-reassign': string;
53
- 'no-implicit-coercion': (string | {
52
+ }];
53
+ 'no-native-reassign': "off";
54
+ 'no-implicit-coercion': ["off", {
54
55
  boolean: boolean;
55
56
  number: boolean;
56
57
  string: boolean;
57
58
  allow: never[];
58
- })[];
59
- 'no-implicit-globals': string;
60
- 'no-implied-eval': string;
61
- 'no-invalid-this': string;
62
- 'no-iterator': string;
63
- 'no-labels': (string | {
59
+ }];
60
+ 'no-implicit-globals': "off";
61
+ 'no-implied-eval': "error";
62
+ 'no-invalid-this': "off";
63
+ 'no-iterator': "error";
64
+ 'no-labels': ["error", {
64
65
  allowLoop: boolean;
65
66
  allowSwitch: boolean;
66
- })[];
67
- 'no-lone-blocks': string;
68
- 'no-loop-func': string;
69
- 'no-magic-numbers': (string | {
67
+ }];
68
+ 'no-lone-blocks': "error";
69
+ 'no-loop-func': "error";
70
+ 'no-magic-numbers': ["off", {
70
71
  ignore: never[];
71
72
  ignoreArrayIndexes: boolean;
72
73
  enforceConst: boolean;
73
74
  detectObjects: boolean;
74
- })[];
75
- 'no-multi-spaces': (string | {
75
+ }];
76
+ 'no-multi-spaces': ["error", {
76
77
  ignoreEOLComments: boolean;
77
- })[];
78
- 'no-multi-str': string;
79
- 'no-new': string;
80
- 'no-new-func': string;
81
- 'no-new-wrappers': string;
82
- 'no-nonoctal-decimal-escape': string;
83
- 'no-object-constructor': string;
84
- 'no-octal': string;
85
- 'no-octal-escape': string;
86
- 'no-param-reassign': (string | {
78
+ }];
79
+ 'no-multi-str': "error";
80
+ 'no-new': "error";
81
+ 'no-new-func': "error";
82
+ 'no-new-wrappers': "error";
83
+ 'no-nonoctal-decimal-escape': "error";
84
+ 'no-object-constructor': "off";
85
+ 'no-octal': "error";
86
+ 'no-octal-escape': "error";
87
+ 'no-param-reassign': ["error", {
87
88
  props: boolean;
88
89
  ignorePropertyModificationsFor: string[];
89
- })[];
90
- 'no-proto': string;
91
- 'no-redeclare': string;
92
- 'no-restricted-properties': (string | {
90
+ }];
91
+ 'no-proto': "error";
92
+ 'no-redeclare': "error";
93
+ 'no-restricted-properties': ["error", {
93
94
  object: string;
94
95
  property: string;
95
96
  message: string;
96
- } | {
97
+ }, {
98
+ object: string;
99
+ property: string;
100
+ message: string;
101
+ }, {
102
+ object: string;
103
+ property: string;
104
+ message: string;
105
+ }, {
106
+ object: string;
107
+ property: string;
108
+ message: string;
109
+ }, {
110
+ object: string;
111
+ property: string;
112
+ message: string;
113
+ }, {
114
+ object: string;
115
+ property: string;
116
+ message: string;
117
+ }, {
118
+ object: string;
119
+ property: string;
120
+ message: string;
121
+ }, {
122
+ property: string;
123
+ message: string;
124
+ }, {
125
+ property: string;
126
+ message: string;
127
+ }, {
128
+ object: string;
97
129
  property: string;
98
130
  message: string;
99
- object?: undefined;
100
- })[];
101
- 'no-return-assign': string[];
102
- 'no-return-await': string;
103
- 'no-script-url': string;
104
- 'no-self-assign': (string | {
131
+ }];
132
+ 'no-return-assign': ["error", string];
133
+ 'no-return-await': "error";
134
+ 'no-script-url': "error";
135
+ 'no-self-assign': ["error", {
105
136
  props: boolean;
106
- })[];
107
- 'no-self-compare': string;
108
- 'no-sequences': string;
109
- 'no-throw-literal': string;
110
- 'no-unmodified-loop-condition': string;
111
- 'no-unused-expressions': (string | {
137
+ }];
138
+ 'no-self-compare': "error";
139
+ 'no-sequences': "error";
140
+ 'no-throw-literal': "error";
141
+ 'no-unmodified-loop-condition': "off";
142
+ 'no-unused-expressions': ["error", {
112
143
  allowShortCircuit: boolean;
113
144
  allowTernary: boolean;
114
145
  allowTaggedTemplates: boolean;
115
- })[];
116
- 'no-unused-labels': string;
117
- 'no-useless-call': string;
118
- 'no-useless-catch': string;
119
- 'no-useless-concat': string;
120
- 'no-useless-escape': string;
121
- 'no-useless-return': string;
122
- 'no-void': string;
123
- 'no-warning-comments': (string | {
146
+ }];
147
+ 'no-unused-labels': "error";
148
+ 'no-useless-call': "off";
149
+ 'no-useless-catch': "error";
150
+ 'no-useless-concat': "error";
151
+ 'no-useless-escape': "error";
152
+ 'no-useless-return': "error";
153
+ 'no-void': "error";
154
+ 'no-warning-comments': ["off", {
124
155
  terms: string[];
125
156
  location: string;
126
- })[];
127
- 'no-with': string;
128
- 'prefer-promise-reject-errors': (string | {
157
+ }];
158
+ 'no-with': "error";
159
+ 'prefer-promise-reject-errors': ["error", {
129
160
  allowEmptyReject: boolean;
130
- })[];
131
- 'prefer-named-capture-group': string;
132
- 'prefer-object-has-own': string;
133
- 'prefer-regex-literals': (string | {
161
+ }];
162
+ 'prefer-named-capture-group': "off";
163
+ 'prefer-object-has-own': "off";
164
+ 'prefer-regex-literals': ["error", {
134
165
  disallowRedundantWrapping: boolean;
135
- })[];
136
- radix: string;
137
- 'require-await': string;
138
- 'require-unicode-regexp': string;
139
- 'vars-on-top': string;
140
- 'wrap-iife': (string | {
166
+ }];
167
+ radix: "error";
168
+ 'require-await': "off";
169
+ 'require-unicode-regexp': "off";
170
+ 'vars-on-top': "error";
171
+ 'wrap-iife': ["error", string, {
141
172
  functionPrototypeMethods: boolean;
142
- })[];
143
- yoda: string;
173
+ }];
174
+ yoda: "error";
144
175
  };
145
176
  };
146
177
  export default _default;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
+ name: 'airbnb/config/best-practices',
4
5
  rules: {
5
6
  // enforces getter/setter pairs in objects
6
7
  // https://eslint.org/docs/rules/accessor-pairs
@@ -1,68 +1,69 @@
1
1
  declare const _default: {
2
+ name: string;
2
3
  rules: {
3
- 'for-direction': string;
4
- 'getter-return': (string | {
4
+ 'for-direction': "error";
5
+ 'getter-return': ["error", {
5
6
  allowImplicit: boolean;
6
- })[];
7
- 'no-async-promise-executor': string;
8
- 'no-await-in-loop': string;
9
- 'no-compare-neg-zero': string;
10
- 'no-cond-assign': string[];
11
- 'no-console': string;
12
- 'no-constant-binary-expression': string;
13
- 'no-constant-condition': string;
14
- 'no-control-regex': string;
15
- 'no-debugger': string;
16
- 'no-dupe-args': string;
17
- 'no-dupe-else-if': string;
18
- 'no-dupe-keys': string;
19
- 'no-duplicate-case': string;
20
- 'no-empty': string;
21
- 'no-empty-character-class': string;
22
- 'no-ex-assign': string;
23
- 'no-extra-boolean-cast': string;
24
- 'no-extra-parens': (string | {
7
+ }];
8
+ 'no-async-promise-executor': "error";
9
+ 'no-await-in-loop': "error";
10
+ 'no-compare-neg-zero': "error";
11
+ 'no-cond-assign': ["error", string];
12
+ 'no-console': "warn";
13
+ 'no-constant-binary-expression': "off";
14
+ 'no-constant-condition': "warn";
15
+ 'no-control-regex': "error";
16
+ 'no-debugger': "error";
17
+ 'no-dupe-args': "error";
18
+ 'no-dupe-else-if': "error";
19
+ 'no-dupe-keys': "error";
20
+ 'no-duplicate-case': "error";
21
+ 'no-empty': "error";
22
+ 'no-empty-character-class': "error";
23
+ 'no-ex-assign': "error";
24
+ 'no-extra-boolean-cast': "error";
25
+ 'no-extra-parens': ["off", string, {
25
26
  conditionalAssign: boolean;
26
27
  nestedBinaryExpressions: boolean;
27
28
  returnAssign: boolean;
28
29
  ignoreJSX: string;
29
30
  enforceForArrowConditionals: boolean;
30
- })[];
31
- 'no-extra-semi': string;
32
- 'no-func-assign': string;
33
- 'no-import-assign': string;
34
- 'no-inner-declarations': string;
35
- 'no-invalid-regexp': string;
36
- 'no-irregular-whitespace': string;
37
- 'no-loss-of-precision': string;
38
- 'no-misleading-character-class': string;
39
- 'no-obj-calls': string;
40
- 'no-new-native-nonconstructor': string;
41
- 'no-promise-executor-return': string;
42
- 'no-prototype-builtins': string;
43
- 'no-regex-spaces': string;
44
- 'no-setter-return': string;
45
- 'no-sparse-arrays': string;
46
- 'no-template-curly-in-string': string;
47
- 'no-unexpected-multiline': string;
48
- 'no-unreachable': string;
49
- 'no-unreachable-loop': (string | {
31
+ }];
32
+ 'no-extra-semi': "error";
33
+ 'no-func-assign': "error";
34
+ 'no-import-assign': "error";
35
+ 'no-inner-declarations': "error";
36
+ 'no-invalid-regexp': "error";
37
+ 'no-irregular-whitespace': "error";
38
+ 'no-loss-of-precision': "error";
39
+ 'no-misleading-character-class': "error";
40
+ 'no-obj-calls': "error";
41
+ 'no-new-native-nonconstructor': "off";
42
+ 'no-promise-executor-return': "error";
43
+ 'no-prototype-builtins': "error";
44
+ 'no-regex-spaces': "error";
45
+ 'no-setter-return': "error";
46
+ 'no-sparse-arrays': "error";
47
+ 'no-template-curly-in-string': "error";
48
+ 'no-unexpected-multiline': "error";
49
+ 'no-unreachable': "error";
50
+ 'no-unreachable-loop': ["error", {
50
51
  ignore: never[];
51
- })[];
52
- 'no-unsafe-finally': string;
53
- 'no-unsafe-negation': string;
54
- 'no-unsafe-optional-chaining': (string | {
52
+ }];
53
+ 'no-unsafe-finally': "error";
54
+ 'no-unsafe-negation': "error";
55
+ 'no-unsafe-optional-chaining': ["error", {
55
56
  disallowArithmeticOperators: boolean;
56
- })[];
57
- 'no-unused-private-class-members': string;
58
- 'no-useless-backreference': string;
59
- 'no-negated-in-lhs': string;
60
- 'require-atomic-updates': string;
61
- 'use-isnan': string;
62
- 'valid-jsdoc': string;
63
- 'valid-typeof': (string | {
57
+ }];
58
+ 'no-unused-private-class-members': "off";
59
+ 'no-useless-backreference': "error";
60
+ 'no-negated-in-lhs': "off";
61
+ 'require-atomic-updates': "off";
62
+ 'use-isnan': "error";
63
+ 'valid-jsdoc': "off";
64
+ 'valid-typeof': ["error", {
64
65
  requireStringLiterals: boolean;
65
- })[];
66
+ }];
66
67
  };
67
68
  };
68
69
  export default _default;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
+ name: 'airbnb/config/errors',
4
5
  rules: {
5
6
  // Enforce “for” loop update clause moving the counter in the right direction
6
7
  // https://eslint.org/docs/rules/for-direction
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ name: string;
2
3
  languageOptions: {
3
4
  globals: {
4
5
  Array: false;
@@ -54,8 +55,8 @@ declare const _default: {
54
55
  WeakSet: false;
55
56
  };
56
57
  parserOptions: {
57
- ecmaVersion: number;
58
- sourceType: string;
58
+ ecmaVersion: 6;
59
+ sourceType: "module";
59
60
  ecmaFeatures: {
60
61
  generators: boolean;
61
62
  objectLiteralDuplicateProperties: boolean;
@@ -63,56 +64,56 @@ declare const _default: {
63
64
  };
64
65
  };
65
66
  rules: {
66
- 'arrow-body-style': (string | {
67
+ 'arrow-body-style': ["error", string, {
67
68
  requireReturnForObjectLiteral: boolean;
68
- })[];
69
- 'arrow-parens': string[];
70
- 'arrow-spacing': (string | {
69
+ }];
70
+ 'arrow-parens': ["error", string];
71
+ 'arrow-spacing': ["error", {
71
72
  before: boolean;
72
73
  after: boolean;
73
- })[];
74
- 'constructor-super': string;
75
- 'generator-star-spacing': (string | {
74
+ }];
75
+ 'constructor-super': "error";
76
+ 'generator-star-spacing': ["error", {
76
77
  before: boolean;
77
78
  after: boolean;
78
- })[];
79
- 'no-class-assign': string;
80
- 'no-confusing-arrow': (string | {
79
+ }];
80
+ 'no-class-assign': "error";
81
+ 'no-confusing-arrow': ["error", {
81
82
  allowParens: boolean;
82
- })[];
83
- 'no-const-assign': string;
84
- 'no-dupe-class-members': string;
85
- 'no-duplicate-imports': string;
86
- 'no-new-symbol': string;
87
- 'no-restricted-exports': (string | {
83
+ }];
84
+ 'no-const-assign': "error";
85
+ 'no-dupe-class-members': "error";
86
+ 'no-duplicate-imports': "off";
87
+ 'no-new-symbol': "error";
88
+ 'no-restricted-exports': ["error", {
88
89
  restrictedNamedExports: string[];
89
- })[];
90
- 'no-restricted-imports': (string | {
90
+ }];
91
+ 'no-restricted-imports': ["off", {
91
92
  paths: never[];
92
93
  patterns: never[];
93
- })[];
94
- 'no-this-before-super': string;
95
- 'no-useless-computed-key': string;
96
- 'no-useless-constructor': string;
97
- 'no-useless-rename': (string | {
94
+ }];
95
+ 'no-this-before-super': "error";
96
+ 'no-useless-computed-key': "error";
97
+ 'no-useless-constructor': "error";
98
+ 'no-useless-rename': ["error", {
98
99
  ignoreDestructuring: boolean;
99
100
  ignoreImport: boolean;
100
101
  ignoreExport: boolean;
101
- })[];
102
- 'no-var': string;
103
- 'object-shorthand': (string | {
102
+ }];
103
+ 'no-var': "error";
104
+ 'object-shorthand': ["error", string, {
104
105
  ignoreConstructors: boolean;
105
106
  avoidQuotes: boolean;
106
- })[];
107
- 'prefer-arrow-callback': (string | {
107
+ }];
108
+ 'prefer-arrow-callback': ["error", {
108
109
  allowNamedFunctions: boolean;
109
110
  allowUnboundThis: boolean;
110
- })[];
111
- 'prefer-const': (string | {
111
+ }];
112
+ 'prefer-const': ["error", {
112
113
  destructuring: string;
113
114
  ignoreReadBeforeAssign: boolean;
114
- })[];
115
- 'prefer-destructuring': (string | {
115
+ }];
116
+ 'prefer-destructuring': ["error", {
116
117
  VariableDeclarator: {
117
118
  array: boolean;
118
119
  object: boolean;
@@ -121,28 +122,25 @@ declare const _default: {
121
122
  array: boolean;
122
123
  object: boolean;
123
124
  };
124
- enforceForRenamedProperties?: undefined;
125
- } | {
125
+ }, {
126
126
  enforceForRenamedProperties: boolean;
127
- VariableDeclarator?: undefined;
128
- AssignmentExpression?: undefined;
129
- })[];
130
- 'prefer-numeric-literals': string;
131
- 'prefer-reflect': string;
132
- 'prefer-rest-params': string;
133
- 'prefer-spread': string;
134
- 'prefer-template': string;
135
- 'require-yield': string;
136
- 'rest-spread-spacing': string[];
137
- 'sort-imports': (string | {
127
+ }];
128
+ 'prefer-numeric-literals': "error";
129
+ 'prefer-reflect': "off";
130
+ 'prefer-rest-params': "error";
131
+ 'prefer-spread': "error";
132
+ 'prefer-template': "error";
133
+ 'require-yield': "error";
134
+ 'rest-spread-spacing': ["error", string];
135
+ 'sort-imports': ["off", {
138
136
  ignoreCase: boolean;
139
137
  ignoreDeclarationSort: boolean;
140
138
  ignoreMemberSort: boolean;
141
139
  memberSyntaxSortOrder: string[];
142
- })[];
143
- 'symbol-description': string;
144
- 'template-curly-spacing': string;
145
- 'yield-star-spacing': string[];
140
+ }];
141
+ 'symbol-description': "error";
142
+ 'template-curly-spacing': "error";
143
+ 'yield-star-spacing': ["error", string];
146
144
  };
147
145
  };
148
146
  export default _default;
package/dist/rules/es6.js CHANGED
@@ -16,6 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var globals_1 = __importDefault(require("globals"));
18
18
  exports.default = {
19
+ name: 'airbnb/config/es6',
19
20
  languageOptions: {
20
21
  globals: __assign({}, globals_1.default.es2015),
21
22
  parserOptions: {