eslint-config-airbnb-extended 0.0.7 → 0.0.9

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.
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("../rules/react"));
7
+ const react_a11y_1 = __importDefault(require("../rules/react-a11y"));
8
+ const react_hooks_1 = __importDefault(require("../rules/react-hooks"));
9
+ exports.default = {
10
+ react: react_1.default,
11
+ reactA11y: react_a11y_1.default,
12
+ reactHooks: react_hooks_1.default,
13
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: any[];
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const recommended_1 = __importDefault(require("../base/recommended"));
7
+ const react_1 = __importDefault(require("./"));
8
+ exports.default = [...recommended_1.default, ...Object.values(react_1.default)];
package/dist/rules/es6.js CHANGED
@@ -1,24 +1,13 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
4
  };
16
5
  Object.defineProperty(exports, "__esModule", { value: true });
17
- var globals_1 = __importDefault(require("globals"));
6
+ const globals_1 = __importDefault(require("globals"));
18
7
  exports.default = {
19
8
  name: 'airbnb/config/es6',
20
9
  languageOptions: {
21
- globals: __assign({}, globals_1.default.es2015),
10
+ globals: Object.assign({}, globals_1.default.es2015),
22
11
  parserOptions: {
23
12
  ecmaVersion: 6,
24
13
  sourceType: 'module',
@@ -1,2 +1,157 @@
1
+ export declare const importConfig: {
2
+ name: string;
3
+ languageOptions: {
4
+ globals: {
5
+ Array: false;
6
+ ArrayBuffer: false;
7
+ Boolean: false;
8
+ DataView: false;
9
+ Date: false;
10
+ decodeURI: false;
11
+ decodeURIComponent: false;
12
+ encodeURI: false;
13
+ encodeURIComponent: false;
14
+ Error: false;
15
+ escape: false;
16
+ eval: false;
17
+ EvalError: false;
18
+ Float32Array: false;
19
+ Float64Array: false;
20
+ Function: false;
21
+ Infinity: false;
22
+ Int16Array: false;
23
+ Int32Array: false;
24
+ Int8Array: false;
25
+ Intl: false;
26
+ isFinite: false;
27
+ isNaN: false;
28
+ JSON: false;
29
+ Map: false;
30
+ Math: false;
31
+ NaN: false;
32
+ Number: false;
33
+ Object: false;
34
+ parseFloat: false;
35
+ parseInt: false;
36
+ Promise: false;
37
+ Proxy: false;
38
+ RangeError: false;
39
+ ReferenceError: false;
40
+ Reflect: false;
41
+ RegExp: false;
42
+ Set: false;
43
+ String: false;
44
+ Symbol: false;
45
+ SyntaxError: false;
46
+ TypeError: false;
47
+ Uint16Array: false;
48
+ Uint32Array: false;
49
+ Uint8Array: false;
50
+ Uint8ClampedArray: false;
51
+ undefined: false;
52
+ unescape: false;
53
+ URIError: false;
54
+ WeakMap: false;
55
+ WeakSet: false;
56
+ };
57
+ parserOptions: {
58
+ ecmaVersion: 6;
59
+ sourceType: "module";
60
+ };
61
+ };
62
+ settings: {
63
+ 'import/resolver': {
64
+ node: {
65
+ extensions: string[];
66
+ };
67
+ };
68
+ 'import/extensions': string[];
69
+ 'import/core-modules': never[];
70
+ 'import/ignore': string[];
71
+ };
72
+ rules: {
73
+ 'import/no-unresolved': ["error", {
74
+ commonjs: boolean;
75
+ caseSensitive: boolean;
76
+ }];
77
+ 'import/named': "error";
78
+ 'import/default': "off";
79
+ 'import/namespace': "off";
80
+ 'import/export': "error";
81
+ 'import/no-named-as-default': "error";
82
+ 'import/no-named-as-default-member': "error";
83
+ 'import/no-deprecated': "off";
84
+ 'import/no-extraneous-dependencies': ["error", {
85
+ devDependencies: string[];
86
+ optionalDependencies: boolean;
87
+ }];
88
+ 'import/no-mutable-exports': "error";
89
+ 'import/no-commonjs': "off";
90
+ 'import/no-amd': "error";
91
+ 'import/no-nodejs-modules': "off";
92
+ 'import/first': "error";
93
+ 'import/imports-first': "off";
94
+ 'import/no-duplicates': "error";
95
+ 'import/no-namespace': "off";
96
+ 'import/extensions': ["error", string, {
97
+ js: string;
98
+ mjs: string;
99
+ jsx: string;
100
+ }];
101
+ 'import/order': ["error", {
102
+ groups: string[][];
103
+ }];
104
+ 'import/newline-after-import': "error";
105
+ 'import/prefer-default-export': "error";
106
+ 'import/no-restricted-paths': "off";
107
+ 'import/max-dependencies': ["off", {
108
+ max: number;
109
+ }];
110
+ 'import/no-absolute-path': "error";
111
+ 'import/no-dynamic-require': "error";
112
+ 'import/no-internal-modules': ["off", {
113
+ allow: never[];
114
+ }];
115
+ 'import/unambiguous': "off";
116
+ 'import/no-webpack-loader-syntax': "error";
117
+ 'import/no-unassigned-import': "off";
118
+ 'import/no-named-default': "error";
119
+ 'import/no-anonymous-default-export': ["off", {
120
+ allowArray: boolean;
121
+ allowArrowFunction: boolean;
122
+ allowAnonymousClass: boolean;
123
+ allowAnonymousFunction: boolean;
124
+ allowLiteral: boolean;
125
+ allowObject: boolean;
126
+ }];
127
+ 'import/exports-last': "off";
128
+ 'import/group-exports': "off";
129
+ 'import/no-default-export': "off";
130
+ 'import/no-named-export': "off";
131
+ 'import/no-self-import': "error";
132
+ 'import/no-cycle': ["error", {
133
+ maxDepth: string;
134
+ }];
135
+ 'import/no-useless-path-segments': ["error", {
136
+ commonjs: boolean;
137
+ }];
138
+ 'import/dynamic-import-chunkname': ["off", {
139
+ importFunctions: never[];
140
+ webpackChunknameFormat: string;
141
+ }];
142
+ 'import/no-relative-parent-imports': "off";
143
+ 'import/no-unused-modules': ["off", {
144
+ ignoreExports: never[];
145
+ missingExports: boolean;
146
+ unusedExports: boolean;
147
+ }];
148
+ 'import/no-import-module-exports': ["error", {
149
+ exceptions: never[];
150
+ }];
151
+ 'import/no-relative-packages': "error";
152
+ 'import/consistent-type-specifier-style': ["off", string];
153
+ 'import/no-empty-named-blocks': "off";
154
+ };
155
+ };
1
156
  declare const _default: any;
2
157
  export default _default;
@@ -1,34 +1,23 @@
1
1
  "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
- var globals_1 = __importDefault(require("globals"));
6
+ exports.importConfig = void 0;
7
+ const globals_1 = __importDefault(require("globals"));
22
8
  // @ts-expect-error eslint-plugin-import not working in import
23
9
  // eslint-disable-next-line @typescript-eslint/no-require-imports,unicorn/prefer-module
24
- var EsLintPluginImport = require('eslint-plugin-import');
25
- exports.default = __assign(__assign({}, EsLintPluginImport.flatConfigs.recommended), { name: 'airbnb/config/imports', languageOptions: {
26
- globals: __assign({}, globals_1.default.es2015),
10
+ const EsLintPluginImport = require('eslint-plugin-import');
11
+ exports.importConfig = {
12
+ name: 'airbnb/config/imports',
13
+ languageOptions: {
14
+ globals: Object.assign({}, globals_1.default.es2015),
27
15
  parserOptions: {
28
16
  ecmaVersion: 6,
29
17
  sourceType: 'module',
30
18
  },
31
- }, settings: {
19
+ },
20
+ settings: {
32
21
  'import/resolver': {
33
22
  node: {
34
23
  extensions: ['.js', '.cjs', '.mjs', '.json'],
@@ -36,8 +25,9 @@ exports.default = __assign(__assign({}, EsLintPluginImport.flatConfigs.recommend
36
25
  },
37
26
  'import/extensions': ['.js', '.cjs', '.mjs', '.jsx'],
38
27
  'import/core-modules': [],
39
- 'import/ignore': ['node_modules', String.raw(templateObject_1 || (templateObject_1 = __makeTemplateObject([".(coffee|scss|css|less|hbs|svg|json)$"], ["\\.(coffee|scss|css|less|hbs|svg|json)$"])))],
40
- }, rules: {
28
+ 'import/ignore': ['node_modules', String.raw `\.(coffee|scss|css|less|hbs|svg|json)$`],
29
+ },
30
+ rules: {
41
31
  // Static analysis:
42
32
  // ensure imports point to files/modules that can be resolved
43
33
  // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
@@ -261,5 +251,6 @@ exports.default = __assign(__assign({}, EsLintPluginImport.flatConfigs.recommend
261
251
  // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md
262
252
  // TODO, semver-minor: enable
263
253
  'import/no-empty-named-blocks': 'off',
264
- } });
265
- var templateObject_1;
254
+ },
255
+ };
256
+ exports.default = Object.assign(Object.assign({}, EsLintPluginImport.flatConfigs.recommended), exports.importConfig);
@@ -1,24 +1,13 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
4
  };
16
5
  Object.defineProperty(exports, "__esModule", { value: true });
17
- var globals_1 = __importDefault(require("globals"));
6
+ const globals_1 = __importDefault(require("globals"));
18
7
  exports.default = {
19
8
  name: 'airbnb/config/node',
20
9
  languageOptions: {
21
- globals: __assign({}, globals_1.default.nodeBuiltin),
10
+ globals: Object.assign({}, globals_1.default.nodeBuiltin),
22
11
  },
23
12
  rules: {
24
13
  // enforce return after a callback
@@ -0,0 +1,117 @@
1
+ declare const _default: {
2
+ name: string;
3
+ plugins: {
4
+ 'jsx-a11y': any;
5
+ };
6
+ languageOptions: {
7
+ parserOptions: {
8
+ ecmaFeatures: {
9
+ jsx: true;
10
+ };
11
+ };
12
+ };
13
+ rules: {
14
+ 'jsx-a11y/accessible-emoji': "off";
15
+ 'jsx-a11y/alt-text': ["error", {
16
+ elements: string[];
17
+ img: never[];
18
+ object: never[];
19
+ area: never[];
20
+ 'input[type="image"]': never[];
21
+ }];
22
+ 'jsx-a11y/anchor-has-content': ["error", {
23
+ components: never[];
24
+ }];
25
+ 'jsx-a11y/anchor-is-valid': ["error", {
26
+ components: string[];
27
+ specialLink: string[];
28
+ aspects: string[];
29
+ }];
30
+ 'jsx-a11y/aria-activedescendant-has-tabindex': "error";
31
+ 'jsx-a11y/aria-props': "error";
32
+ 'jsx-a11y/aria-proptypes': "error";
33
+ 'jsx-a11y/aria-role': ["error", {
34
+ ignoreNonDOM: boolean;
35
+ }];
36
+ 'jsx-a11y/aria-unsupported-elements': "error";
37
+ 'jsx-a11y/autocomplete-valid': ["off", {
38
+ inputComponents: never[];
39
+ }];
40
+ 'jsx-a11y/click-events-have-key-events': "error";
41
+ 'jsx-a11y/control-has-associated-label': ["error", {
42
+ labelAttributes: string[];
43
+ controlComponents: never[];
44
+ ignoreElements: string[];
45
+ ignoreRoles: string[];
46
+ depth: number;
47
+ }];
48
+ 'jsx-a11y/heading-has-content': ["error", {
49
+ components: string[];
50
+ }];
51
+ 'jsx-a11y/html-has-lang': "error";
52
+ 'jsx-a11y/iframe-has-title': "error";
53
+ 'jsx-a11y/img-redundant-alt': "error";
54
+ 'jsx-a11y/interactive-supports-focus': "error";
55
+ 'jsx-a11y/label-has-associated-control': ["error", {
56
+ labelComponents: never[];
57
+ labelAttributes: never[];
58
+ controlComponents: never[];
59
+ assert: string;
60
+ depth: number;
61
+ }];
62
+ 'jsx-a11y/lang': "error";
63
+ 'jsx-a11y/media-has-caption': ["error", {
64
+ audio: never[];
65
+ video: never[];
66
+ track: never[];
67
+ }];
68
+ 'jsx-a11y/mouse-events-have-key-events': "error";
69
+ 'jsx-a11y/no-access-key': "error";
70
+ 'jsx-a11y/no-autofocus': ["error", {
71
+ ignoreNonDOM: boolean;
72
+ }];
73
+ 'jsx-a11y/no-distracting-elements': ["error", {
74
+ elements: string[];
75
+ }];
76
+ 'jsx-a11y/no-interactive-element-to-noninteractive-role': ["error", {
77
+ tr: string[];
78
+ }];
79
+ 'jsx-a11y/no-noninteractive-element-interactions': ["error", {
80
+ handlers: string[];
81
+ }];
82
+ 'jsx-a11y/no-noninteractive-element-to-interactive-role': ["error", {
83
+ ul: string[];
84
+ ol: string[];
85
+ li: string[];
86
+ table: string[];
87
+ td: string[];
88
+ }];
89
+ 'jsx-a11y/no-noninteractive-tabindex': ["error", {
90
+ tags: never[];
91
+ roles: string[];
92
+ allowExpressionValues: boolean;
93
+ }];
94
+ 'jsx-a11y/no-onchange': "off";
95
+ 'jsx-a11y/no-redundant-roles': ["error", {
96
+ nav: string[];
97
+ }];
98
+ 'jsx-a11y/no-static-element-interactions': ["error", {
99
+ handlers: string[];
100
+ }];
101
+ 'jsx-a11y/role-has-required-aria-props': "error";
102
+ 'jsx-a11y/role-supports-aria-props': "error";
103
+ 'jsx-a11y/scope': "error";
104
+ 'jsx-a11y/tabindex-no-positive': "error";
105
+ 'jsx-a11y/label-has-for': ["off", {
106
+ components: never[];
107
+ required: {
108
+ every: string[];
109
+ };
110
+ allowChildren: boolean;
111
+ }];
112
+ 'jsx-a11y/anchor-ambiguous-text': "off";
113
+ 'jsx-a11y/no-aria-hidden-on-focusable': "off";
114
+ 'jsx-a11y/prefer-tag-over-role': "off";
115
+ };
116
+ };
117
+ export default _default;