eslint-config-airbnb-extended 0.0.8 → 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.
package/dist/index.js CHANGED
@@ -1,20 +1,29 @@
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
- exports.configs = void 0;
18
- var base_1 = __importDefault(require("./base"));
19
- var react_1 = __importDefault(require("./react"));
20
- exports.configs = __assign(__assign({}, react_1.default), { base: base_1.default });
6
+ exports.configs = exports.rules = void 0;
7
+ const base_1 = __importDefault(require("./base"));
8
+ const recommended_1 = __importDefault(require("./base/recommended"));
9
+ const react_1 = __importDefault(require("./react"));
10
+ const recommended_2 = __importDefault(require("./react/recommended"));
11
+ const typescript_1 = __importDefault(require("./typescript"));
12
+ const recommended_3 = __importDefault(require("./typescript/recommended"));
13
+ exports.rules = {
14
+ react: react_1.default,
15
+ base: base_1.default,
16
+ typescript: typescript_1.default,
17
+ };
18
+ exports.configs = {
19
+ base: {
20
+ recommended: recommended_1.default,
21
+ 'typescript-only': recommended_3.default.base,
22
+ typescript: [...recommended_1.default, ...recommended_3.default.base],
23
+ },
24
+ react: {
25
+ recommended: recommended_2.default,
26
+ 'typescript-only': recommended_3.default.react,
27
+ typescript: [...recommended_2.default, ...recommended_3.default.react],
28
+ },
29
+ };
@@ -1794,6 +1794,5 @@ declare const _default: {
1794
1794
  'react-hooks/exhaustive-deps': "error";
1795
1795
  };
1796
1796
  };
1797
- recommended: any[];
1798
1797
  };
1799
1798
  export default _default;
@@ -3,13 +3,11 @@ 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 recommended_1 = __importDefault(require("./recommended"));
7
- var react_1 = __importDefault(require("../rules/react"));
8
- var react_a11y_1 = __importDefault(require("../rules/react-a11y"));
9
- var react_hooks_1 = __importDefault(require("../rules/react-hooks"));
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"));
10
9
  exports.default = {
11
10
  react: react_1.default,
12
11
  reactA11y: react_a11y_1.default,
13
12
  reactHooks: react_hooks_1.default,
14
- recommended: recommended_1.default,
15
13
  };
@@ -1,19 +1,8 @@
1
1
  "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
14
5
  Object.defineProperty(exports, "__esModule", { value: true });
15
- var recommended_1 = __importDefault(require("../base/recommended"));
16
- var react_1 = __importDefault(require("../rules/react"));
17
- var react_a11y_1 = __importDefault(require("../rules/react-a11y"));
18
- var react_hooks_1 = __importDefault(require("../rules/react-hooks"));
19
- exports.default = __spreadArray(__spreadArray([], recommended_1.default, true), [react_1.default, react_a11y_1.default, react_hooks_1.default], false);
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
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // @ts-expect-error eslint-plugin-import not working in import
4
4
  // eslint-disable-next-line @typescript-eslint/no-require-imports,unicorn/prefer-module
5
- var EsLintPluginJSXA11y = require('eslint-plugin-jsx-a11y');
5
+ const EsLintPluginJSXA11y = require('eslint-plugin-jsx-a11y');
6
6
  exports.default = {
7
7
  name: 'airbnb/config/react-a11y',
8
8
  plugins: {
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- var EsLintPluginReactHooks = __importStar(require("eslint-plugin-react-hooks"));
36
+ const EsLintPluginReactHooks = __importStar(require("eslint-plugin-react-hooks"));
37
37
  exports.default = {
38
38
  name: 'airbnb/config/react-hooks',
39
39
  plugins: {
@@ -1,35 +1,15 @@
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
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
- if (ar || !(i in from)) {
16
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
- ar[i] = from[i];
18
- }
19
- }
20
- return to.concat(ar || Array.prototype.slice.call(from));
21
- };
22
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
23
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
25
5
  Object.defineProperty(exports, "__esModule", { value: true });
26
- var eslint_plugin_react_1 = __importDefault(require("eslint-plugin-react"));
27
- var globals_1 = __importDefault(require("globals"));
28
- var style_1 = __importDefault(require("./style"));
6
+ const eslint_plugin_react_1 = __importDefault(require("eslint-plugin-react"));
7
+ const globals_1 = __importDefault(require("globals"));
8
+ const style_1 = __importDefault(require("./style"));
29
9
  // // @ts-expect-error eslint-plugin-import not working in import
30
10
  // // eslint-disable-next-line @typescript-eslint/no-require-imports,unicorn/prefer-module
31
11
  // const EsLintPluginReact = require('eslint-plugin-react');
32
- var dangleRules = style_1.default.rules['no-underscore-dangle'];
12
+ const dangleRules = style_1.default.rules['no-underscore-dangle'];
33
13
  exports.default = {
34
14
  name: 'airbnb/config/react',
35
15
  plugins: {
@@ -41,7 +21,7 @@ exports.default = {
41
21
  jsx: true,
42
22
  },
43
23
  },
44
- globals: __assign({}, globals_1.default.browser),
24
+ globals: Object.assign({}, globals_1.default.browser),
45
25
  },
46
26
  settings: {
47
27
  'import/resolver': {
@@ -64,7 +44,7 @@ exports.default = {
64
44
  rules: {
65
45
  'no-underscore-dangle': [
66
46
  dangleRules[0],
67
- __assign(__assign({}, dangleRules[1]), { allow: __spreadArray(__spreadArray([], dangleRules[1].allow, true), ['__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'], false) }),
47
+ Object.assign(Object.assign({}, dangleRules[1]), { allow: [...dangleRules[1].allow, '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'] }),
68
48
  ],
69
49
  // Specify whether double or single quotes should be used in JSX attributes
70
50
  // https://eslint.org/docs/rules/jsx-quotes
@@ -0,0 +1,4 @@
1
+ import type { Linter } from 'eslint';
2
+ export declare const importResolverExtensions: string[];
3
+ declare const _default: Linter.Config[];
4
+ export default _default;