immosquare-cleaner 0.1.34 → 0.1.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/lib/immosquare-cleaner/version.rb +1 -1
  3. data/lib/immosquare-cleaner.rb +2 -2
  4. data/linters/eslint.config.mjs +30 -0
  5. data/linters/rubocop-3.2.2.yml +2 -0
  6. data/node_modules/function-bind/README.md +27 -25
  7. data/node_modules/function-bind/implementation.js +12 -44
  8. data/node_modules/function-bind/package.json +14 -38
  9. data/node_modules/is-core-module/CHANGELOG.md +0 -7
  10. data/node_modules/is-core-module/index.js +2 -2
  11. data/node_modules/is-core-module/package.json +4 -4
  12. data/package.json +2 -4
  13. metadata +3 -180
  14. data/linters/eslintrc.json +0 -57
  15. data/node_modules/.bin/rimraf +0 -1
  16. data/node_modules/eslint-config-airbnb-base/CHANGELOG.md +0 -374
  17. data/node_modules/eslint-config-airbnb-base/LICENSE.md +0 -21
  18. data/node_modules/eslint-config-airbnb-base/README.md +0 -112
  19. data/node_modules/eslint-config-airbnb-base/index.js +0 -17
  20. data/node_modules/eslint-config-airbnb-base/legacy.js +0 -34
  21. data/node_modules/eslint-config-airbnb-base/node_modules/semver/LICENSE +0 -15
  22. data/node_modules/eslint-config-airbnb-base/node_modules/semver/README.md +0 -443
  23. data/node_modules/eslint-config-airbnb-base/node_modules/semver/bin/semver.js +0 -174
  24. data/node_modules/eslint-config-airbnb-base/node_modules/semver/package.json +0 -38
  25. data/node_modules/eslint-config-airbnb-base/node_modules/semver/range.bnf +0 -16
  26. data/node_modules/eslint-config-airbnb-base/node_modules/semver/semver.js +0 -1643
  27. data/node_modules/eslint-config-airbnb-base/package.json +0 -95
  28. data/node_modules/eslint-config-airbnb-base/rules/best-practices.js +0 -408
  29. data/node_modules/eslint-config-airbnb-base/rules/errors.js +0 -179
  30. data/node_modules/eslint-config-airbnb-base/rules/es6.js +0 -185
  31. data/node_modules/eslint-config-airbnb-base/rules/imports.js +0 -273
  32. data/node_modules/eslint-config-airbnb-base/rules/node.js +0 -43
  33. data/node_modules/eslint-config-airbnb-base/rules/strict.js +0 -6
  34. data/node_modules/eslint-config-airbnb-base/rules/style.js +0 -529
  35. data/node_modules/eslint-config-airbnb-base/rules/variables.js +0 -56
  36. data/node_modules/eslint-config-airbnb-base/test/requires.js +0 -13
  37. data/node_modules/eslint-config-airbnb-base/test/test-base.js +0 -32
  38. data/node_modules/eslint-config-airbnb-base/whitespace-async.js +0 -96
  39. data/node_modules/eslint-config-airbnb-base/whitespace.js +0 -102
  40. data/node_modules/eslint-plugin-import/CHANGELOG.md +0 -1925
  41. data/node_modules/eslint-plugin-import/CONTRIBUTING.md +0 -84
  42. data/node_modules/eslint-plugin-import/LICENSE +0 -22
  43. data/node_modules/eslint-plugin-import/README.md +0 -500
  44. data/node_modules/eslint-plugin-import/RELEASE.md +0 -54
  45. data/node_modules/eslint-plugin-import/SECURITY.md +0 -11
  46. data/node_modules/eslint-plugin-import/config/electron.js +0 -8
  47. data/node_modules/eslint-plugin-import/config/errors.js +0 -14
  48. data/node_modules/eslint-plugin-import/config/react-native.js +0 -13
  49. data/node_modules/eslint-plugin-import/config/react.js +0 -18
  50. data/node_modules/eslint-plugin-import/config/recommended.js +0 -28
  51. data/node_modules/eslint-plugin-import/config/stage-0.js +0 -12
  52. data/node_modules/eslint-plugin-import/config/typescript.js +0 -34
  53. data/node_modules/eslint-plugin-import/config/warnings.js +0 -12
  54. data/node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md +0 -91
  55. data/node_modules/eslint-plugin-import/docs/rules/default.md +0 -72
  56. data/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md +0 -92
  57. data/node_modules/eslint-plugin-import/docs/rules/export.md +0 -37
  58. data/node_modules/eslint-plugin-import/docs/rules/exports-last.md +0 -51
  59. data/node_modules/eslint-plugin-import/docs/rules/extensions.md +0 -174
  60. data/node_modules/eslint-plugin-import/docs/rules/first.md +0 -75
  61. data/node_modules/eslint-plugin-import/docs/rules/group-exports.md +0 -118
  62. data/node_modules/eslint-plugin-import/docs/rules/imports-first.md +0 -9
  63. data/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md +0 -70
  64. data/node_modules/eslint-plugin-import/docs/rules/named.md +0 -102
  65. data/node_modules/eslint-plugin-import/docs/rules/namespace.md +0 -106
  66. data/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md +0 -167
  67. data/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md +0 -54
  68. data/node_modules/eslint-plugin-import/docs/rules/no-amd.md +0 -37
  69. data/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md +0 -83
  70. data/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md +0 -96
  71. data/node_modules/eslint-plugin-import/docs/rules/no-cycle.md +0 -111
  72. data/node_modules/eslint-plugin-import/docs/rules/no-default-export.md +0 -65
  73. data/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md +0 -62
  74. data/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md +0 -109
  75. data/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md +0 -25
  76. data/node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md +0 -49
  77. data/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md +0 -139
  78. data/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md +0 -81
  79. data/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md +0 -136
  80. data/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md +0 -54
  81. data/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md +0 -52
  82. data/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md +0 -53
  83. data/node_modules/eslint-plugin-import/docs/rules/no-named-default.md +0 -36
  84. data/node_modules/eslint-plugin-import/docs/rules/no-named-export.md +0 -79
  85. data/node_modules/eslint-plugin-import/docs/rules/no-namespace.md +0 -44
  86. data/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md +0 -42
  87. data/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md +0 -70
  88. data/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md +0 -123
  89. data/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md +0 -198
  90. data/node_modules/eslint-plugin-import/docs/rules/no-self-import.md +0 -32
  91. data/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md +0 -60
  92. data/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md +0 -110
  93. data/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md +0 -125
  94. data/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md +0 -85
  95. data/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md +0 -39
  96. data/node_modules/eslint-plugin-import/docs/rules/order.md +0 -365
  97. data/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md +0 -185
  98. data/node_modules/eslint-plugin-import/docs/rules/unambiguous.md +0 -57
  99. data/node_modules/eslint-plugin-import/lib/ExportMap.js +0 -856
  100. data/node_modules/eslint-plugin-import/lib/core/importType.js +0 -129
  101. data/node_modules/eslint-plugin-import/lib/core/packagePath.js +0 -22
  102. data/node_modules/eslint-plugin-import/lib/core/staticRequire.js +0 -11
  103. data/node_modules/eslint-plugin-import/lib/docsUrl.js +0 -8
  104. data/node_modules/eslint-plugin-import/lib/importDeclaration.js +0 -5
  105. data/node_modules/eslint-plugin-import/lib/index.js +0 -71
  106. data/node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js +0 -221
  107. data/node_modules/eslint-plugin-import/lib/rules/default.js +0 -40
  108. data/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js +0 -120
  109. data/node_modules/eslint-plugin-import/lib/rules/export.js +0 -250
  110. data/node_modules/eslint-plugin-import/lib/rules/exports-last.js +0 -40
  111. data/node_modules/eslint-plugin-import/lib/rules/extensions.js +0 -193
  112. data/node_modules/eslint-plugin-import/lib/rules/first.js +0 -144
  113. data/node_modules/eslint-plugin-import/lib/rules/group-exports.js +0 -155
  114. data/node_modules/eslint-plugin-import/lib/rules/imports-first.js +0 -16
  115. data/node_modules/eslint-plugin-import/lib/rules/max-dependencies.js +0 -60
  116. data/node_modules/eslint-plugin-import/lib/rules/named.js +0 -143
  117. data/node_modules/eslint-plugin-import/lib/rules/namespace.js +0 -218
  118. data/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js +0 -237
  119. data/node_modules/eslint-plugin-import/lib/rules/no-absolute-path.js +0 -40
  120. data/node_modules/eslint-plugin-import/lib/rules/no-amd.js +0 -47
  121. data/node_modules/eslint-plugin-import/lib/rules/no-anonymous-default-export.js +0 -103
  122. data/node_modules/eslint-plugin-import/lib/rules/no-commonjs.js +0 -141
  123. data/node_modules/eslint-plugin-import/lib/rules/no-cycle.js +0 -158
  124. data/node_modules/eslint-plugin-import/lib/rules/no-default-export.js +0 -43
  125. data/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js +0 -138
  126. data/node_modules/eslint-plugin-import/lib/rules/no-duplicates.js +0 -354
  127. data/node_modules/eslint-plugin-import/lib/rules/no-dynamic-require.js +0 -77
  128. data/node_modules/eslint-plugin-import/lib/rules/no-empty-named-blocks.js +0 -105
  129. data/node_modules/eslint-plugin-import/lib/rules/no-extraneous-dependencies.js +0 -301
  130. data/node_modules/eslint-plugin-import/lib/rules/no-import-module-exports.js +0 -85
  131. data/node_modules/eslint-plugin-import/lib/rules/no-internal-modules.js +0 -144
  132. data/node_modules/eslint-plugin-import/lib/rules/no-mutable-exports.js +0 -59
  133. data/node_modules/eslint-plugin-import/lib/rules/no-named-as-default-member.js +0 -96
  134. data/node_modules/eslint-plugin-import/lib/rules/no-named-as-default.js +0 -45
  135. data/node_modules/eslint-plugin-import/lib/rules/no-named-default.js +0 -31
  136. data/node_modules/eslint-plugin-import/lib/rules/no-named-export.js +0 -39
  137. data/node_modules/eslint-plugin-import/lib/rules/no-namespace.js +0 -175
  138. data/node_modules/eslint-plugin-import/lib/rules/no-nodejs-modules.js +0 -44
  139. data/node_modules/eslint-plugin-import/lib/rules/no-relative-packages.js +0 -71
  140. data/node_modules/eslint-plugin-import/lib/rules/no-relative-parent-imports.js +0 -48
  141. data/node_modules/eslint-plugin-import/lib/rules/no-restricted-paths.js +0 -245
  142. data/node_modules/eslint-plugin-import/lib/rules/no-self-import.js +0 -39
  143. data/node_modules/eslint-plugin-import/lib/rules/no-unassigned-import.js +0 -79
  144. data/node_modules/eslint-plugin-import/lib/rules/no-unresolved.js +0 -60
  145. data/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js +0 -945
  146. data/node_modules/eslint-plugin-import/lib/rules/no-useless-path-segments.js +0 -147
  147. data/node_modules/eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js +0 -26
  148. data/node_modules/eslint-plugin-import/lib/rules/order.js +0 -785
  149. data/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js +0 -116
  150. data/node_modules/eslint-plugin-import/lib/rules/unambiguous.js +0 -38
  151. data/node_modules/eslint-plugin-import/memo-parser/LICENSE +0 -22
  152. data/node_modules/eslint-plugin-import/memo-parser/README.md +0 -21
  153. data/node_modules/eslint-plugin-import/memo-parser/index.js +0 -41
  154. data/node_modules/eslint-plugin-import/node_modules/debug/CHANGELOG.md +0 -395
  155. data/node_modules/eslint-plugin-import/node_modules/debug/LICENSE +0 -19
  156. data/node_modules/eslint-plugin-import/node_modules/debug/README.md +0 -437
  157. data/node_modules/eslint-plugin-import/node_modules/debug/node.js +0 -1
  158. data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/index.js +0 -162
  159. data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/license.md +0 -21
  160. data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/package.json +0 -38
  161. data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/readme.md +0 -59
  162. data/node_modules/eslint-plugin-import/node_modules/debug/package.json +0 -51
  163. data/node_modules/eslint-plugin-import/node_modules/debug/src/browser.js +0 -180
  164. data/node_modules/eslint-plugin-import/node_modules/debug/src/common.js +0 -249
  165. data/node_modules/eslint-plugin-import/node_modules/debug/src/index.js +0 -12
  166. data/node_modules/eslint-plugin-import/node_modules/debug/src/node.js +0 -177
  167. data/node_modules/eslint-plugin-import/node_modules/doctrine/CHANGELOG.md +0 -94
  168. data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE +0 -177
  169. data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE.closure-compiler +0 -202
  170. data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE.esprima +0 -19
  171. data/node_modules/eslint-plugin-import/node_modules/doctrine/README.md +0 -165
  172. data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/doctrine.js +0 -899
  173. data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/typed.js +0 -1305
  174. data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/utility.js +0 -35
  175. data/node_modules/eslint-plugin-import/node_modules/doctrine/package.json +0 -57
  176. data/node_modules/eslint-plugin-import/node_modules/minimatch/LICENSE +0 -15
  177. data/node_modules/eslint-plugin-import/node_modules/minimatch/README.md +0 -230
  178. data/node_modules/eslint-plugin-import/node_modules/minimatch/minimatch.js +0 -947
  179. data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
  180. data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
  181. data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
  182. data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
  183. data/node_modules/eslint-plugin-import/node_modules/minimatch/package.json +0 -33
  184. data/node_modules/eslint-plugin-import/node_modules/semver/LICENSE +0 -15
  185. data/node_modules/eslint-plugin-import/node_modules/semver/README.md +0 -443
  186. data/node_modules/eslint-plugin-import/node_modules/semver/bin/semver.js +0 -174
  187. data/node_modules/eslint-plugin-import/node_modules/semver/package.json +0 -38
  188. data/node_modules/eslint-plugin-import/node_modules/semver/range.bnf +0 -16
  189. data/node_modules/eslint-plugin-import/node_modules/semver/semver.js +0 -1643
  190. data/node_modules/eslint-plugin-import/package.json +0 -124
  191. data/node_modules/function-bind/CHANGELOG.md +0 -136
@@ -1,11 +0,0 @@
1
- # Security Policy
2
-
3
- ## Supported Versions
4
-
5
- Latest major/minor version is supported only for security updates.
6
-
7
- ## Reporting a Vulnerability
8
-
9
- To report a security vulnerability, please use the
10
- [Tidelift security contact](https://tidelift.com/security).
11
- Tidelift will coordinate the fix and disclosure.
@@ -1,8 +0,0 @@
1
- /**
2
- * Default settings for Electron applications.
3
- */
4
- module.exports = {
5
- settings: {
6
- 'import/core-modules': ['electron'],
7
- },
8
- };
@@ -1,14 +0,0 @@
1
- /**
2
- * unopinionated config. just the things that are necessarily runtime errors
3
- * waiting to happen.
4
- * @type {Object}
5
- */
6
- module.exports = {
7
- plugins: ['import'],
8
- rules: { 'import/no-unresolved': 2,
9
- 'import/named': 2,
10
- 'import/namespace': 2,
11
- 'import/default': 2,
12
- 'import/export': 2,
13
- },
14
- };
@@ -1,13 +0,0 @@
1
- /**
2
- * - adds platform extensions to Node resolver
3
- */
4
- module.exports = {
5
- settings: {
6
- 'import/resolver': {
7
- node: {
8
- // Note: will not complain if only _one_ of these files exists.
9
- extensions: ['.js', '.web.js', '.ios.js', '.android.js'],
10
- },
11
- },
12
- },
13
- };
@@ -1,18 +0,0 @@
1
- /**
2
- * Adds `.jsx` as an extension, and enables JSX parsing.
3
- *
4
- * Even if _you_ aren't using JSX (or .jsx) directly, if your dependencies
5
- * define jsnext:main and have JSX internally, you may run into problems
6
- * if you don't enable these settings at the top level.
7
- */
8
- module.exports = {
9
-
10
- settings: {
11
- 'import/extensions': ['.js', '.jsx'],
12
- },
13
-
14
- parserOptions: {
15
- ecmaFeatures: { jsx: true },
16
- },
17
-
18
- };
@@ -1,28 +0,0 @@
1
- /**
2
- * The basics.
3
- * @type {Object}
4
- */
5
- module.exports = {
6
- plugins: ['import'],
7
-
8
- rules: {
9
- // analysis/correctness
10
- 'import/no-unresolved': 'error',
11
- 'import/named': 'error',
12
- 'import/namespace': 'error',
13
- 'import/default': 'error',
14
- 'import/export': 'error',
15
-
16
- // red flags (thus, warnings)
17
- 'import/no-named-as-default': 'warn',
18
- 'import/no-named-as-default-member': 'warn',
19
- 'import/no-duplicates': 'warn',
20
- },
21
-
22
- // need all these for parsing dependencies (even if _your_ code doesn't need
23
- // all of them)
24
- parserOptions: {
25
- sourceType: 'module',
26
- ecmaVersion: 2018,
27
- },
28
- };
@@ -1,12 +0,0 @@
1
- /**
2
- * Rules in progress.
3
- *
4
- * Do not expect these to adhere to semver across releases.
5
- * @type {Object}
6
- */
7
- module.exports = {
8
- plugins: ['import'],
9
- rules: {
10
- 'import/no-deprecated': 1,
11
- },
12
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * This config:
3
- * 1) adds `.jsx`, `.ts`, `.cts`, `.mts`, and `.tsx` as an extension
4
- * 2) enables JSX/TSX parsing
5
- */
6
-
7
- // Omit `.d.ts` because 1) TypeScript compilation already confirms that
8
- // types are resolved, and 2) it would mask an unresolved
9
- // `.ts`/`.tsx`/`.js`/`.jsx` implementation.
10
- const typeScriptExtensions = ['.ts', '.cts', '.mts', '.tsx'];
11
-
12
- const allExtensions = [...typeScriptExtensions, '.js', '.jsx'];
13
-
14
- module.exports = {
15
- settings: {
16
- 'import/extensions': allExtensions,
17
- 'import/external-module-folders': ['node_modules', 'node_modules/@types'],
18
- 'import/parsers': {
19
- '@typescript-eslint/parser': typeScriptExtensions,
20
- },
21
- 'import/resolver': {
22
- node: {
23
- extensions: allExtensions,
24
- },
25
- },
26
- },
27
-
28
- rules: {
29
- // analysis/correctness
30
-
31
- // TypeScript compilation already ensures that named imports exist in the referenced module
32
- 'import/named': 'off',
33
- },
34
- };
@@ -1,12 +0,0 @@
1
- /**
2
- * more opinionated config.
3
- * @type {Object}
4
- */
5
- module.exports = {
6
- plugins: ['import'],
7
- rules: {
8
- 'import/no-named-as-default': 1,
9
- 'import/no-named-as-default-member': 1,
10
- 'import/no-duplicates': 1,
11
- },
12
- };
@@ -1,91 +0,0 @@
1
- # import/consistent-type-specifier-style
2
-
3
- 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
4
-
5
- <!-- end auto-generated rule header -->
6
-
7
- In both Flow and TypeScript you can mark an import as a type-only import by adding a "kind" marker to the import. Both languages support two positions for marker.
8
-
9
- **At the top-level** which marks all names in the import as type-only and applies to named, default, and namespace (for TypeScript) specifiers:
10
-
11
- ```ts
12
- import type Foo from 'Foo';
13
- import type {Bar} from 'Bar';
14
- // ts only
15
- import type * as Bam from 'Bam';
16
- // flow only
17
- import typeof Baz from 'Baz';
18
- ```
19
-
20
- **Inline** with to the named import, which marks just the specific name in the import as type-only. An inline specifier is only valid for named specifiers, and not for default or namespace specifiers:
21
-
22
- ```ts
23
- import {type Foo} from 'Foo';
24
- // flow only
25
- import {typeof Bar} from 'Bar';
26
- ```
27
-
28
- ## Rule Details
29
-
30
- This rule either enforces or bans the use of inline type-only markers for named imports.
31
-
32
- This rule includes a fixer that will automatically convert your specifiers to the correct form - however the fixer will not respect your preferences around de-duplicating imports. If this is important to you, consider using the [`import/no-duplicates`] rule.
33
-
34
- [`import/no-duplicates`]: ./no-duplicates.md
35
-
36
- ## Options
37
-
38
- The rule accepts a single string option which may be one of:
39
-
40
- - `'prefer-inline'` - enforces that named type-only specifiers are only ever written with an inline marker; and never as part of a top-level, type-only import.
41
- - `'prefer-top-level'` - enforces that named type-only specifiers only ever written as part of a top-level, type-only import; and never with an inline marker.
42
-
43
- By default the rule will use the `prefer-inline` option.
44
-
45
- ## Examples
46
-
47
- ### `prefer-top-level`
48
-
49
- ❌ Invalid with `["error", "prefer-top-level"]`
50
-
51
- ```ts
52
- import {type Foo} from 'Foo';
53
- import Foo, {type Bar} from 'Foo';
54
- // flow only
55
- import {typeof Foo} from 'Foo';
56
- ```
57
-
58
- ✅ Valid with `["error", "prefer-top-level"]`
59
-
60
- ```ts
61
- import type {Foo} from 'Foo';
62
- import type Foo, {Bar} from 'Foo';
63
- // flow only
64
- import typeof {Foo} from 'Foo';
65
- ```
66
-
67
- ### `prefer-inline`
68
-
69
- ❌ Invalid with `["error", "prefer-inline"]`
70
-
71
- ```ts
72
- import type {Foo} from 'Foo';
73
- import type Foo, {Bar} from 'Foo';
74
- // flow only
75
- import typeof {Foo} from 'Foo';
76
- ```
77
-
78
- ✅ Valid with `["error", "prefer-inline"]`
79
-
80
- ```ts
81
- import {type Foo} from 'Foo';
82
- import Foo, {type Bar} from 'Foo';
83
- // flow only
84
- import {typeof Foo} from 'Foo';
85
- ```
86
-
87
- ## When Not To Use It
88
-
89
- If you aren't using Flow or TypeScript 4.5+, then this rule does not apply and need not be used.
90
-
91
- If you don't care about, and don't want to standardize how named specifiers are imported then you should not use this rule.
@@ -1,72 +0,0 @@
1
- # import/default
2
-
3
- 💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`.
4
-
5
- <!-- end auto-generated rule header -->
6
-
7
- If a default import is requested, this rule will report if there is no default
8
- export in the imported module.
9
-
10
- For [ES7], reports if a default is named and exported but is not found in the
11
- referenced module.
12
-
13
- Note: for packages, the plugin will find exported names
14
- from [`jsnext:main`], if present in `package.json`.
15
- Redux's npm module includes this key, and thereby is lintable, for example.
16
-
17
- A module path that is [ignored] or not [unambiguously an ES module] will not be reported when imported.
18
-
19
- [ignored]: ../README.md#importignore
20
- [unambiguously an ES module]: https://github.com/bmeck/UnambiguousJavaScriptGrammar
21
-
22
- ## Rule Details
23
-
24
- Given:
25
-
26
- ```js
27
- // ./foo.js
28
- export default function () { return 42 }
29
-
30
- // ./bar.js
31
- export function bar() { return null }
32
-
33
- // ./baz.js
34
- module.exports = function () { /* ... */ }
35
-
36
- // node_modules/some-module/index.js
37
- exports.sharedFunction = function shared() { /* ... */ }
38
- ```
39
-
40
- The following is considered valid:
41
-
42
- ```js
43
- import foo from './foo'
44
-
45
- // assuming 'node_modules' are ignored (true by default)
46
- import someModule from 'some-module'
47
- ```
48
-
49
- ...and the following cases are reported:
50
-
51
- ```js
52
- import bar from './bar' // no default export found in ./bar
53
- import baz from './baz' // no default export found in ./baz
54
- ```
55
-
56
- ## When Not To Use It
57
-
58
- If you are using CommonJS and/or modifying the exported namespace of any module at
59
- runtime, you will likely see false positives with this rule.
60
-
61
- This rule currently does not interpret `module.exports = ...` as a `default` export,
62
- either, so such a situation will be reported in the importing module.
63
-
64
- ## Further Reading
65
-
66
- - Lee Byron's [ES7] export proposal
67
- - [`import/ignore`] setting
68
- - [`jsnext:main`] (Rollup)
69
-
70
- [ES7]: https://github.com/leebyron/ecmascript-more-export-from
71
- [`import/ignore`]: ../../README.md#importignore
72
- [`jsnext:main`]: https://github.com/rollup/rollup/wiki/jsnext:main
@@ -1,92 +0,0 @@
1
- # import/dynamic-import-chunkname
2
-
3
- <!-- end auto-generated rule header -->
4
-
5
- This rule reports any dynamic imports without a webpackChunkName specified in a leading block comment in the proper format.
6
-
7
- This rule enforces naming of webpack chunks in dynamic imports. When you don't explicitly name chunks, webpack will autogenerate chunk names that are not consistent across builds, which prevents long-term browser caching.
8
-
9
- ## Rule Details
10
-
11
- This rule runs against `import()` by default, but can be configured to also run against an alternative dynamic-import function, e.g. 'dynamicImport.'
12
- You can also configure the regex format you'd like to accept for the webpackChunkName - for example, if we don't want the number 6 to show up in our chunk names:
13
-
14
- ```javascript
15
- {
16
- "dynamic-import-chunkname": [2, {
17
- importFunctions: ["dynamicImport"],
18
- webpackChunknameFormat: "[a-zA-Z0-57-9-/_]+"
19
- }]
20
- }
21
- ```
22
-
23
- ### invalid
24
-
25
- The following patterns are invalid:
26
-
27
- ```javascript
28
- // no leading comment
29
- import('someModule');
30
-
31
- // incorrectly formatted comment
32
- import(
33
- /*webpackChunkName:"someModule"*/
34
- 'someModule',
35
- );
36
- import(
37
- /* webpackChunkName : "someModule" */
38
- 'someModule',
39
- );
40
-
41
- // chunkname contains a 6 (forbidden by rule config)
42
- import(
43
- /* webpackChunkName: "someModule6" */
44
- 'someModule',
45
- );
46
-
47
- // invalid syntax for webpack comment
48
- import(
49
- /* totally not webpackChunkName: "someModule" */
50
- 'someModule',
51
- );
52
-
53
- // single-line comment, not a block-style comment
54
- import(
55
- // webpackChunkName: "someModule"
56
- 'someModule',
57
- );
58
- ```
59
-
60
- ### valid
61
-
62
- The following patterns are valid:
63
-
64
- ```javascript
65
- import(
66
- /* webpackChunkName: "someModule" */
67
- 'someModule',
68
- );
69
- import(
70
- /* webpackChunkName: "someOtherModule12345789" */
71
- 'someModule',
72
- );
73
- import(
74
- /* webpackChunkName: "someModule" */
75
- /* webpackPrefetch: true */
76
- 'someModule',
77
- );
78
- import(
79
- /* webpackChunkName: "someModule", webpackPrefetch: true */
80
- 'someModule',
81
- );
82
-
83
- // using single quotes instead of double quotes
84
- import(
85
- /* webpackChunkName: 'someModule' */
86
- 'someModule',
87
- );
88
- ```
89
-
90
- ## When Not To Use It
91
-
92
- If you don't care that webpack will autogenerate chunk names and may blow up browser caches and bundle size reports.
@@ -1,37 +0,0 @@
1
- # import/export
2
-
3
- 💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`.
4
-
5
- <!-- end auto-generated rule header -->
6
-
7
- Reports funny business with exports, like repeated exports of names or defaults.
8
-
9
- ## Rule Details
10
-
11
- ```js
12
- export default class MyClass { /*...*/ } // Multiple default exports.
13
-
14
- function makeClass() { return new MyClass(...arguments) }
15
-
16
- export default makeClass // Multiple default exports.
17
- ```
18
-
19
- or
20
-
21
- ```js
22
- export const foo = function () { /*...*/ } // Multiple exports of name 'foo'.
23
-
24
- function bar() { /*...*/ }
25
- export { bar as foo } // Multiple exports of name 'foo'.
26
- ```
27
-
28
- In the case of named/default re-export, all `n` re-exports will be reported,
29
- as at least `n-1` of them are clearly mistakes, but it is not clear which one
30
- (if any) is intended. Could be the result of copy/paste, code duplication with
31
- intent to rename, etc.
32
-
33
- ## Further Reading
34
-
35
- - Lee Byron's [ES7] export proposal
36
-
37
- [ES7]: https://github.com/leebyron/ecmascript-more-export-from
@@ -1,51 +0,0 @@
1
- # import/exports-last
2
-
3
- <!-- end auto-generated rule header -->
4
-
5
- This rule enforces that all exports are declared at the bottom of the file. This rule will report any export declarations that comes before any non-export statements.
6
-
7
- ## This will be reported
8
-
9
- ```JS
10
-
11
- const bool = true
12
-
13
- export default bool
14
-
15
- const str = 'foo'
16
-
17
- ```
18
-
19
- ```JS
20
-
21
- export const bool = true
22
-
23
- const str = 'foo'
24
-
25
- ```
26
-
27
- ## This will not be reported
28
-
29
- ```JS
30
- const arr = ['bar']
31
-
32
- export const bool = true
33
-
34
- export default bool
35
-
36
- export function func() {
37
- console.log('Hello World 🌍')
38
- }
39
-
40
- export const str = 'foo'
41
- ```
42
-
43
- ## When Not To Use It
44
-
45
- If you don't mind exports being sprinkled throughout a file, you may not want to enable this rule.
46
-
47
- ### ES6 exports only
48
-
49
- The exports-last rule is currently only working on ES6 exports. You may not want to enable this rule if you're using CommonJS exports.
50
-
51
- If you need CommonJS support feel free to open an issue or create a PR.
@@ -1,174 +0,0 @@
1
- # import/extensions
2
-
3
- <!-- end auto-generated rule header -->
4
-
5
- Some file resolve algorithms allow you to omit the file extension within the import source path. For example the `node` resolver (which does not yet support ESM/`import`) can resolve `./foo/bar` to the absolute path `/User/someone/foo/bar.js` because the `.js` extension is resolved automatically by default in CJS. Depending on the resolver you can configure more extensions to get resolved automatically.
6
-
7
- In order to provide a consistent use of file extensions across your code base, this rule can enforce or disallow the use of certain file extensions.
8
-
9
- ## Rule Details
10
-
11
- This rule either takes one string option, one object option, or a string and an object option. If it is the string `"never"` (the default value), then the rule forbids the use for any extension. If it is the string `"always"`, then the rule enforces the use of extensions for all import statements. If it is the string `"ignorePackages"`, then the rule enforces the use of extensions for all import statements except package imports.
12
-
13
- ```json
14
- "import/extensions": [<severity>, "never" | "always" | "ignorePackages"]
15
- ```
16
-
17
- By providing an object you can configure each extension separately.
18
-
19
- ```json
20
- "import/extensions": [<severity>, {
21
- <extension>: "never" | "always" | "ignorePackages"
22
- }]
23
- ```
24
-
25
- For example `{ "js": "always", "json": "never" }` would always enforce the use of the `.js` extension but never allow the use of the `.json` extension.
26
-
27
- By providing both a string and an object, the string will set the default setting for all extensions, and the object can be used to set granular overrides for specific extensions.
28
-
29
- ```json
30
- "import/extensions": [
31
- <severity>,
32
- "never" | "always" | "ignorePackages",
33
- {
34
- <extension>: "never" | "always" | "ignorePackages"
35
- }
36
- ]
37
- ```
38
-
39
- For example, `["error", "never", { "svg": "always" }]` would require that all extensions are omitted, except for "svg".
40
-
41
- `ignorePackages` can be set as a separate boolean option like this:
42
-
43
- ```json
44
- "import/extensions": [
45
- <severity>,
46
- "never" | "always" | "ignorePackages",
47
- {
48
- ignorePackages: true | false,
49
- pattern: {
50
- <extension>: "never" | "always" | "ignorePackages"
51
- }
52
- }
53
- ]
54
- ```
55
-
56
- In that case, if you still want to specify extensions, you can do so inside the **pattern** property.
57
- Default value of `ignorePackages` is `false`.
58
-
59
- ### Exception
60
-
61
- When disallowing the use of certain extensions this rule makes an exception and allows the use of extension when the file would not be resolvable without extension.
62
-
63
- For example, given the following folder structure:
64
-
65
- ```pt
66
- ├── foo
67
- │   ├── bar.js
68
- │   ├── bar.json
69
- ```
70
-
71
- and this import statement:
72
-
73
- ```js
74
- import bar from './foo/bar.json';
75
- ```
76
-
77
- then the extension can’t be omitted because it would then resolve to `./foo/bar.js`.
78
-
79
- ### Examples
80
-
81
- The following patterns are considered problems when configuration set to "never":
82
-
83
- ```js
84
- import foo from './foo.js';
85
-
86
- import bar from './bar.json';
87
-
88
- import Component from './Component.jsx';
89
-
90
- import express from 'express/index.js';
91
- ```
92
-
93
- The following patterns are not considered problems when configuration set to "never":
94
-
95
- ```js
96
- import foo from './foo';
97
-
98
- import bar from './bar';
99
-
100
- import Component from './Component';
101
-
102
- import express from 'express/index';
103
-
104
- import * as path from 'path';
105
- ```
106
-
107
- The following patterns are considered problems when configuration set to "always":
108
-
109
- ```js
110
- import foo from './foo';
111
-
112
- import bar from './bar';
113
-
114
- import Component from './Component';
115
-
116
- import foo from '@/foo';
117
- ```
118
-
119
- The following patterns are not considered problems when configuration set to "always":
120
-
121
- ```js
122
- import foo from './foo.js';
123
-
124
- import bar from './bar.json';
125
-
126
- import Component from './Component.jsx';
127
-
128
- import * as path from 'path';
129
-
130
- import foo from '@/foo.js';
131
- ```
132
-
133
- The following patterns are considered problems when configuration set to "ignorePackages":
134
-
135
- ```js
136
- import foo from './foo';
137
-
138
- import bar from './bar';
139
-
140
- import Component from './Component';
141
-
142
- ```
143
-
144
- The following patterns are not considered problems when configuration set to "ignorePackages":
145
-
146
- ```js
147
- import foo from './foo.js';
148
-
149
- import bar from './bar.json';
150
-
151
- import Component from './Component.jsx';
152
-
153
- import express from 'express';
154
-
155
- import foo from '@/foo'
156
- ```
157
-
158
- The following patterns are not considered problems when configuration set to `['error', 'always', {ignorePackages: true} ]`:
159
-
160
- ```js
161
- import Component from './Component.jsx';
162
-
163
- import baz from 'foo/baz.js';
164
-
165
- import express from 'express';
166
-
167
- import foo from '@/foo';
168
- ```
169
-
170
- ## When Not To Use It
171
-
172
- If you are not concerned about a consistent usage of file extension.
173
-
174
- In the future, when this rule supports native node ESM resolution, and the plugin is configured to use native rather than transpiled ESM (a config option that is not yet available) - setting this to `always` will have no effect.