@ololoepepe/eslint-config 0.1.1 → 0.1.2
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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/plugins/unicorn.js +13 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable changes to this project are documented in this file. The format is
|
|
|
4
4
|
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this
|
|
5
5
|
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.1.2] - 2026-07-02
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **base:** resolved a mutual exclusion between `unicorn/prefer-export-from` and
|
|
12
|
+
`no-duplicate-imports` ({`includeExports: true`}). A binding imported for
|
|
13
|
+
internal use **and** re-exported (`import {x} from './m'; ... use x ...;
|
|
14
|
+
export {x};`) had no valid arrangement: the former demanded `export…from`,
|
|
15
|
+
which the latter forbade, and the internal use blocked dropping the import.
|
|
16
|
+
`unicorn/prefer-export-from` is now configured with `{checkUsedVariables:
|
|
17
|
+
false}`, so it no longer rewrites re-exports of internally-used bindings; pure
|
|
18
|
+
re-exports are still pushed to `export…from`. Added regression tests covering
|
|
19
|
+
re-export compatibility.
|
|
20
|
+
|
|
7
21
|
## [0.1.1] - 2026-06-30
|
|
8
22
|
|
|
9
23
|
### Fixed
|
package/package.json
CHANGED
package/src/plugins/unicorn.js
CHANGED
|
@@ -213,7 +213,19 @@ export const rules = {
|
|
|
213
213
|
'unicorn/prefer-else-if': 'error',
|
|
214
214
|
'unicorn/prefer-error-is-error': 'off',
|
|
215
215
|
'unicorn/prefer-event-target': 'error',
|
|
216
|
-
'unicorn/prefer-export-from':
|
|
216
|
+
'unicorn/prefer-export-from': [
|
|
217
|
+
'error',
|
|
218
|
+
{
|
|
219
|
+
// Do not require `export…from` for a binding that is also used internally:
|
|
220
|
+
// `import {x} from './m'; ... use x ...; export {x};`. With the default
|
|
221
|
+
// (checkUsedVariables: true) this pattern is unsatisfiable — the rule demands
|
|
222
|
+
// `export {x} from './m'`, but `no-duplicate-imports` ({includeExports: true})
|
|
223
|
+
// forbids importing and export-from'ing the same path, and the internal use
|
|
224
|
+
// means the import cannot be dropped. Pure re-exports (binding never used
|
|
225
|
+
// internally) are still required to use `export…from`.
|
|
226
|
+
checkUsedVariables: false
|
|
227
|
+
}
|
|
228
|
+
],
|
|
217
229
|
'unicorn/prefer-flat-math-min-max': 'error',
|
|
218
230
|
'unicorn/prefer-get-or-insert-computed': 'error',
|
|
219
231
|
'unicorn/prefer-global-number-constants': 'error',
|