eslint-config-airbnb-extended 0.1.0 → 0.2.0

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.
Files changed (74) hide show
  1. package/dist/base/index.d.ts +990 -0
  2. package/dist/base/index.js +23 -0
  3. package/dist/base/recommended.d.ts +990 -0
  4. package/dist/base/recommended.js +19 -0
  5. package/dist/helpers/getDevDepsList.d.ts +3 -0
  6. package/dist/helpers/getDevDepsList.js +31 -0
  7. package/dist/index.d.ts +15897 -0
  8. package/dist/index.js +37 -0
  9. package/dist/react/index.d.ts +1793 -0
  10. package/dist/react/index.js +13 -0
  11. package/dist/react/recommended.d.ts +2786 -0
  12. package/dist/react/recommended.js +22 -0
  13. package/dist/rules/best-practices.d.ts +177 -0
  14. package/dist/rules/best-practices.js +379 -0
  15. package/dist/rules/errors.d.ts +69 -0
  16. package/dist/rules/errors.js +151 -0
  17. package/dist/rules/es6.d.ts +146 -0
  18. package/dist/rules/es6.js +192 -0
  19. package/dist/rules/imports.d.ts +151 -0
  20. package/dist/rules/imports.js +203 -0
  21. package/dist/rules/importsStrict.d.ts +43 -0
  22. package/dist/rules/importsStrict.js +74 -0
  23. package/dist/rules/next.d.ts +8 -0
  24. package/dist/rules/next.js +12 -0
  25. package/dist/rules/node.d.ts +90 -0
  26. package/dist/rules/node.js +39 -0
  27. package/dist/rules/react-a11y.d.ts +117 -0
  28. package/dist/rules/react-a11y.js +255 -0
  29. package/dist/rules/react-hooks.d.ts +19 -0
  30. package/dist/rules/react-hooks.js +57 -0
  31. package/dist/rules/react.d.ts +1659 -0
  32. package/dist/rules/react.js +578 -0
  33. package/dist/rules/strict.d.ts +7 -0
  34. package/dist/rules/strict.js +9 -0
  35. package/dist/rules/style.d.ts +320 -0
  36. package/dist/rules/style.js +530 -0
  37. package/dist/rules/typescript/typescriptBase.d.ts +23 -0
  38. package/dist/rules/typescript/typescriptBase.js +26 -0
  39. package/dist/rules/typescript/typescriptEslint.d.ts +3 -0
  40. package/dist/rules/typescript/typescriptEslint.js +184 -0
  41. package/dist/rules/typescript/typescriptImports.d.ts +37 -0
  42. package/dist/rules/typescript/typescriptImports.js +54 -0
  43. package/dist/rules/typescript.d.ts +47 -0
  44. package/dist/rules/typescript.js +9 -0
  45. package/dist/rules/variables.d.ts +35 -0
  46. package/dist/rules/variables.js +65 -0
  47. package/dist/typescript/index.d.ts +58 -0
  48. package/dist/typescript/index.js +11 -0
  49. package/dist/typescript/recommended.d.ts +112 -0
  50. package/dist/typescript/recommended.js +35 -0
  51. package/dist/utils/index.d.ts +13 -0
  52. package/dist/utils/index.js +12 -0
  53. package/package.json +16 -9
  54. package/CHANGELOG.md +0 -7
  55. package/base/index.ts +0 -21
  56. package/base/recommended.ts +0 -17
  57. package/index.ts +0 -25
  58. package/react/index.ts +0 -11
  59. package/react/recommended.ts +0 -6
  60. package/rules/best-practices.ts +0 -462
  61. package/rules/errors.ts +0 -199
  62. package/rules/es6.ts +0 -224
  63. package/rules/imports.ts +0 -308
  64. package/rules/node.ts +0 -49
  65. package/rules/react-a11y.ts +0 -295
  66. package/rules/react-hooks.ts +0 -26
  67. package/rules/react.ts +0 -692
  68. package/rules/strict.ts +0 -9
  69. package/rules/style.ts +0 -632
  70. package/rules/typescript.ts +0 -312
  71. package/rules/variables.ts +0 -76
  72. package/tsconfig.json +0 -22
  73. package/typescript/index.ts +0 -7
  74. package/typescript/recommended.ts +0 -30
@@ -0,0 +1,203 @@
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 utils_1 = require("../utils");
7
+ const eslint_plugin_import_x_1 = require("eslint-plugin-import-x");
8
+ const globals_1 = __importDefault(require("globals"));
9
+ const getDevDepsList_1 = require("../helpers/getDevDepsList");
10
+ exports.default = Object.assign(Object.assign({}, eslint_plugin_import_x_1.flatConfigs.recommended), { name: 'airbnb/config/imports', languageOptions: {
11
+ globals: Object.assign({}, globals_1.default.es2015),
12
+ parserOptions: {
13
+ ecmaVersion: 6,
14
+ sourceType: 'module',
15
+ },
16
+ }, settings: {
17
+ 'import-x/resolver': {
18
+ node: {
19
+ extensions: utils_1.jsExtensionsResolver,
20
+ },
21
+ },
22
+ 'import-x/extensions': utils_1.jsExtensionsWithReact,
23
+ 'import-x/core-modules': [],
24
+ 'import-x/ignore': ['node_modules', String.raw `\.(coffee|scss|css|less|hbs|svg|json)$`],
25
+ }, rules: {
26
+ // enforce a consistent style for type specifiers (inline or top-level)
27
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/consistent-type-specifier-style.md
28
+ 'import-x/consistent-type-specifier-style': 'off',
29
+ // ensure default import coupled with default export
30
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/default.md#when-not-to-use-it
31
+ 'import-x/default': 'error',
32
+ // dynamic imports require a leading comment with a webpackChunkName
33
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/dynamic-import-chunkname.md
34
+ 'import-x/dynamic-import-chunkname': 'off',
35
+ // disallow invalid exports, e.g. multiple defaults
36
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/export.md
37
+ 'import-x/export': 'error',
38
+ // This rule enforces that all exports are declared at the bottom of the file.
39
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/exports-last.md
40
+ 'import-x/exports-last': 'off',
41
+ // Ensure consistent use of file extension within the import path
42
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/extensions.md
43
+ 'import-x/extensions': ['error', 'ignorePackages', utils_1.jsExtensionsRule],
44
+ // disallow non-import statements appearing before import statements
45
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/first.md
46
+ 'import-x/first': 'error',
47
+ // Reports when named exports are not grouped together in a single export declaration
48
+ // or when multiple assignments to CommonJS module.exports or exports object are present
49
+ // in a single file.
50
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/group-exports.md
51
+ 'import-x/group-exports': 'off',
52
+ // disallow non-import statements appearing before import statements
53
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/imports-first.md
54
+ // @deprecated: use `import-x/first`
55
+ 'import-x/imports-first': 'off',
56
+ // Forbid modules to have too many dependencies
57
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/max-dependencies.md
58
+ 'import-x/max-dependencies': 'off',
59
+ // ensure named imports coupled with named exports
60
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/named.md#when-not-to-use-it
61
+ 'import-x/named': 'error',
62
+ // Enforces names exist at the time they are dereferenced
63
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/namespace.md
64
+ 'import-x/namespaces': 'error',
65
+ // Require a newline after the last import/require in a group
66
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/newline-after-import.md
67
+ 'import-x/newline-after-import': 'error',
68
+ // Forbid import of modules using absolute paths
69
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-absolute-path.md
70
+ 'import-x/no-absolute-path': 'error',
71
+ // disallow AMD require/define
72
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-amd.md
73
+ 'import-x/no-amd': 'error',
74
+ // Reports if a module's default export is unnamed
75
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-anonymous-default-export.md
76
+ 'import-x/no-anonymous-default-export': 'off',
77
+ // disallow require()
78
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-commonjs.md
79
+ 'import-x/no-commonjs': 'off',
80
+ // Forbid cyclical dependencies between modules
81
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-cycle.md
82
+ 'import-x/no-cycle': ['error', { maxDepth: '∞' }],
83
+ // Prohibit default exports
84
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-default-export.md
85
+ 'import-x/no-default-export': 'off',
86
+ // disallow use of jsdoc-marked-deprecated imports
87
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-deprecated.md
88
+ 'import-x/no-deprecated': 'off',
89
+ // disallow duplicate imports
90
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-duplicates.md
91
+ 'import-x/no-duplicates': 'error',
92
+ // Forbid require() calls with expressions
93
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-dynamic-require.md
94
+ 'import-x/no-dynamic-require': 'error',
95
+ // Reports the use of empty named import blocks.
96
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-empty-named-blocks.md
97
+ 'import-x/no-empty-named-blocks': 'error',
98
+ // Forbid the use of extraneous packages
99
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-extraneous-dependencies.md
100
+ 'import-x/no-extraneous-dependencies': [
101
+ 'error',
102
+ {
103
+ devDependencies: (0, getDevDepsList_1.getDevDepsList)(utils_1.jsExtensions.join(',')),
104
+ optionalDependencies: false,
105
+ peerDependencies: true,
106
+ bundledDependencies: true,
107
+ },
108
+ ],
109
+ // Reports the use of import declarations with CommonJS exports in any module except for the main module.
110
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-import-module-exports.md
111
+ 'import-x/no-import-module-exports': [
112
+ 'error',
113
+ {
114
+ exceptions: [],
115
+ },
116
+ ],
117
+ // prevent importing the submodules of other modules
118
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-internal-modules.md
119
+ 'import-x/no-internal-modules': 'off',
120
+ // Forbid mutable exports
121
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-mutable-exports.md
122
+ 'import-x/no-mutable-exports': 'error',
123
+ // warn on accessing default export property names that are also named exports
124
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default-member.md
125
+ 'import-x/no-named-as-default-member': 'error',
126
+ // do not allow a default import name to match a named export
127
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default.md
128
+ 'import-x/no-named-as-default': 'error',
129
+ // Prevent importing the default as if it were named
130
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-default.md
131
+ 'import-x/no-named-default': 'error',
132
+ // Prohibit named exports. this is a terrible rule, do not use it.
133
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-export.md
134
+ 'import-x/no-named-export': 'off',
135
+ // disallow namespace imports
136
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-namespace.md
137
+ 'import-x/no-namespace': 'off',
138
+ // No Node.js builtin modules
139
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-nodejs-modules.md
140
+ 'import-x/no-nodejs-modules': 'off',
141
+ // Use this rule to prevent importing packages through relative paths.
142
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-relative-packages.md
143
+ 'import-x/no-relative-packages': 'error',
144
+ // Use this rule to prevent imports to folders in relative parent paths.
145
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-relative-parent-imports.md
146
+ 'import-x/no-relative-parent-imports': 'off',
147
+ // Prohibit importing a default export by another name.
148
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-rename-default.md
149
+ 'import-x/no-rename-default': 'warn',
150
+ // Restrict which files can be imported in a given folder
151
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-restricted-paths.md
152
+ 'import-x/no-restricted-paths': 'off',
153
+ // Forbid a module from importing itself
154
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-self-import.md
155
+ 'import-x/no-self-import': 'error',
156
+ // Prevent unassigned imports
157
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unassigned-import.md
158
+ // importing for side effects is perfectly acceptable, if you need side effects.
159
+ 'import-x/no-unassigned-import': 'off',
160
+ // ensure imports point to files/modules that can be resolved
161
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unresolved.md
162
+ 'import-x/no-unresolved': [
163
+ 'error',
164
+ {
165
+ commonjs: true,
166
+ caseSensitive: true,
167
+ },
168
+ ],
169
+ // Reports modules without any exports, or with unused exports
170
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unused-modules.md
171
+ 'import-x/no-unused-modules': [
172
+ 'off',
173
+ {
174
+ ignoreExports: [],
175
+ missingExports: true,
176
+ unusedExports: true,
177
+ },
178
+ ],
179
+ // Ensures that there are no useless path segments
180
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-useless-path-segments.md
181
+ 'import-x/no-useless-path-segments': [
182
+ 'error',
183
+ {
184
+ noUselessIndex: true,
185
+ commonjs: true,
186
+ },
187
+ ],
188
+ // Forbid Webpack loader syntax in imports
189
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-webpack-loader-syntax.md
190
+ 'import-x/no-webpack-loader-syntax': 'error',
191
+ // ensure absolute imports are above relative imports and that unassigned imports are ignored
192
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/order.md
193
+ 'import-x/order': ['error', { groups: [['builtin', 'external', 'internal']] }],
194
+ // Require modules with a single export to use a default export
195
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/prefer-default-export.md
196
+ 'import-x/prefer-default-export': 'error',
197
+ // Warn if a module could be mistakenly parsed as a script by a consumer
198
+ // leveraging Unambiguous JavaScript Grammar
199
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/unambiguous.md
200
+ // this should not be enabled until this proposal has at least been *presented* to TC39.
201
+ // At the moment, it's not a thing.
202
+ 'import-x/unambiguous': 'off',
203
+ } });
@@ -0,0 +1,43 @@
1
+ declare const _default: {
2
+ name: string;
3
+ rules: {
4
+ 'import-x/group-exports': "error";
5
+ 'import-x/no-anonymous-default-export': ["error", {
6
+ allowArray: boolean;
7
+ allowObject: boolean;
8
+ }];
9
+ 'import-x/no-namespace': "error";
10
+ 'import-x/no-unused-modules': ["warn", {
11
+ missingExports: boolean;
12
+ unusedExports: boolean;
13
+ }];
14
+ 'import-x/order': ["error", {
15
+ groups: (string | string[])[];
16
+ pathGroups: {
17
+ pattern: string;
18
+ group: string;
19
+ position: string;
20
+ }[];
21
+ pathGroupsExcludedImportTypes: string[];
22
+ distinctGroup: boolean;
23
+ 'newlines-between': string;
24
+ alphabetize: {
25
+ order: string;
26
+ orderImportKind: string;
27
+ caseInsensitive: boolean;
28
+ };
29
+ named: {
30
+ enabled: boolean;
31
+ import: boolean;
32
+ export: boolean;
33
+ require: boolean;
34
+ cjsExports: boolean;
35
+ types: string;
36
+ };
37
+ warnOnUnassignedImports: boolean;
38
+ sortTypesGroup: boolean;
39
+ 'newlines-between-types': string;
40
+ }];
41
+ };
42
+ };
43
+ export default _default;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ name: 'airbnb/config/imports-strict',
5
+ rules: {
6
+ // Reports when named exports are not grouped together in a single export declaration
7
+ // or when multiple assignments to CommonJS module.exports or exports object are present
8
+ // in a single file.
9
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/group-exports.md
10
+ 'import-x/group-exports': 'error',
11
+ // Reports if a module's default export is unnamed
12
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-anonymous-default-export.md
13
+ 'import-x/no-anonymous-default-export': [
14
+ 'error',
15
+ {
16
+ allowArray: true,
17
+ allowObject: true,
18
+ },
19
+ ],
20
+ // disallow namespace imports
21
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-namespace.md
22
+ 'import-x/no-namespace': 'error',
23
+ // Reports modules without any exports, or with unused exports
24
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unused-modules.md
25
+ 'import-x/no-unused-modules': [
26
+ 'warn',
27
+ {
28
+ missingExports: true,
29
+ unusedExports: true,
30
+ },
31
+ ],
32
+ // ensure absolute imports are above relative imports and that unassigned imports are ignored
33
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/order.md
34
+ 'import-x/order': [
35
+ 'error',
36
+ {
37
+ groups: [
38
+ 'builtin',
39
+ 'external',
40
+ 'internal',
41
+ ['parent', 'sibling', 'index'],
42
+ 'object',
43
+ ['unknown', 'type'],
44
+ ],
45
+ pathGroups: [
46
+ {
47
+ pattern: 'react',
48
+ group: 'external',
49
+ position: 'before',
50
+ },
51
+ ],
52
+ pathGroupsExcludedImportTypes: ['type'],
53
+ distinctGroup: true,
54
+ 'newlines-between': 'always',
55
+ alphabetize: {
56
+ order: 'asc',
57
+ orderImportKind: 'asc',
58
+ caseInsensitive: true,
59
+ },
60
+ named: {
61
+ enabled: true,
62
+ import: true,
63
+ export: true,
64
+ require: true,
65
+ cjsExports: true,
66
+ types: 'types-last',
67
+ },
68
+ warnOnUnassignedImports: true,
69
+ sortTypesGroup: true,
70
+ 'newlines-between-types': 'always',
71
+ },
72
+ ],
73
+ },
74
+ };
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ name: string;
3
+ plugins: {
4
+ '@next/next': any;
5
+ };
6
+ rules: any;
7
+ };
8
+ export default _default;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-expect-error eslint-plugin-import not working in import
4
+ // eslint-disable-next-line @typescript-eslint/no-require-imports,unicorn/prefer-module
5
+ const ESLintPluginNext = require('@next/eslint-plugin-next');
6
+ exports.default = {
7
+ name: 'airbnb/config/next',
8
+ plugins: {
9
+ '@next/next': ESLintPluginNext,
10
+ },
11
+ rules: Object.assign(Object.assign({}, ESLintPluginNext.configs.recommended.rules), ESLintPluginNext.configs['core-web-vitals'].rules),
12
+ };
@@ -0,0 +1,90 @@
1
+ declare const _default: {
2
+ name: string;
3
+ languageOptions: {
4
+ globals: {
5
+ AbortController: false;
6
+ AbortSignal: false;
7
+ atob: false;
8
+ Blob: false;
9
+ BroadcastChannel: false;
10
+ btoa: false;
11
+ Buffer: false;
12
+ ByteLengthQueuingStrategy: false;
13
+ clearImmediate: false;
14
+ clearInterval: false;
15
+ clearTimeout: false;
16
+ CloseEvent: false;
17
+ CompressionStream: false;
18
+ console: false;
19
+ CountQueuingStrategy: false;
20
+ crypto: false;
21
+ Crypto: false;
22
+ CryptoKey: false;
23
+ CustomEvent: false;
24
+ DecompressionStream: false;
25
+ DOMException: false;
26
+ Event: false;
27
+ EventTarget: false;
28
+ fetch: false;
29
+ File: false;
30
+ FormData: false;
31
+ global: false;
32
+ Headers: false;
33
+ MessageChannel: false;
34
+ MessageEvent: false;
35
+ MessagePort: false;
36
+ navigator: false;
37
+ Navigator: false;
38
+ performance: false;
39
+ Performance: false;
40
+ PerformanceEntry: false;
41
+ PerformanceMark: false;
42
+ PerformanceMeasure: false;
43
+ PerformanceObserver: false;
44
+ PerformanceObserverEntryList: false;
45
+ PerformanceResourceTiming: false;
46
+ process: false;
47
+ queueMicrotask: false;
48
+ ReadableByteStreamController: false;
49
+ ReadableStream: false;
50
+ ReadableStreamBYOBReader: false;
51
+ ReadableStreamBYOBRequest: false;
52
+ ReadableStreamDefaultController: false;
53
+ ReadableStreamDefaultReader: false;
54
+ Request: false;
55
+ Response: false;
56
+ setImmediate: false;
57
+ setInterval: false;
58
+ setTimeout: false;
59
+ structuredClone: false;
60
+ SubtleCrypto: false;
61
+ TextDecoder: false;
62
+ TextDecoderStream: false;
63
+ TextEncoder: false;
64
+ TextEncoderStream: false;
65
+ TransformStream: false;
66
+ TransformStreamDefaultController: false;
67
+ URL: false;
68
+ URLSearchParams: false;
69
+ WebAssembly: false;
70
+ WebSocket: false;
71
+ WritableStream: false;
72
+ WritableStreamDefaultController: false;
73
+ WritableStreamDefaultWriter: false;
74
+ };
75
+ };
76
+ rules: {
77
+ 'callback-return': "off";
78
+ 'global-require': "error";
79
+ 'handle-callback-err': "off";
80
+ 'no-buffer-constructor': "error";
81
+ 'no-mixed-requires': ["off", boolean];
82
+ 'no-new-require': "error";
83
+ 'no-path-concat': "error";
84
+ 'no-process-env': "off";
85
+ 'no-process-exit': "off";
86
+ 'no-restricted-modules': "off";
87
+ 'no-sync': "off";
88
+ };
89
+ };
90
+ export default _default;
@@ -0,0 +1,39 @@
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 globals_1 = __importDefault(require("globals"));
7
+ exports.default = {
8
+ name: 'airbnb/config/node',
9
+ languageOptions: {
10
+ globals: Object.assign({}, globals_1.default.nodeBuiltin),
11
+ },
12
+ rules: {
13
+ // enforce return after a callback
14
+ 'callback-return': 'off',
15
+ // require all requires be top-level
16
+ // https://eslint.org/docs/rules/global-require
17
+ 'global-require': 'error',
18
+ // enforces error handling in callbacks (node environment)
19
+ 'handle-callback-err': 'off',
20
+ // disallow use of the Buffer() constructor
21
+ // https://eslint.org/docs/rules/no-buffer-constructor
22
+ 'no-buffer-constructor': 'error',
23
+ // disallow mixing regular variable and require declarations
24
+ 'no-mixed-requires': ['off', false],
25
+ // disallow use of new operator with the require function
26
+ 'no-new-require': 'error',
27
+ // disallow string concatenation with __dirname and __filename
28
+ // https://eslint.org/docs/rules/no-path-concat
29
+ 'no-path-concat': 'error',
30
+ // disallow use of process.env
31
+ 'no-process-env': 'off',
32
+ // disallow process.exit()
33
+ 'no-process-exit': 'off',
34
+ // restrict usage of specified node modules
35
+ 'no-restricted-modules': 'off',
36
+ // disallow use of synchronous methods (off by default)
37
+ 'no-sync': 'off',
38
+ },
39
+ };
@@ -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;