@foray1010/eslint-config 14.0.0 → 14.0.1

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 CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [14.0.1](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@14.0.0...@foray1010/eslint-config@14.0.1) (2025-03-11)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **eslint-config:** drop eslint-plugin-functional ([fdc506c](https://github.com/foray1010/common-presets/commit/fdc506cf24792dfb55a2c39e7f96a49cd76044af))
11
+
6
12
  ## [14.0.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@13.0.3...@foray1010/eslint-config@14.0.0) (2025-03-11)
7
13
 
8
14
  ### ⚠ BREAKING CHANGES
package/bases/base.mjs CHANGED
@@ -23,9 +23,6 @@ async function generateTypeScriptConfig() {
23
23
 
24
24
  // eslint-disable-next-line import-x/no-unresolved
25
25
  const tseslint = (await import('typescript-eslint')).default
26
- // eslint-disable-next-line import-x/no-unresolved
27
- const eslintPluginFunctional = (await import('eslint-plugin-functional'))
28
- .default
29
26
 
30
27
  return [
31
28
  // @ts-expect-error `Type 'Config' is not assignable to type 'Readonly<FlatConfig<RulesRecord>>' with 'exactOptionalPropertyTypes: true'`
@@ -50,9 +47,6 @@ async function generateTypeScriptConfig() {
50
47
  typescript: true,
51
48
  },
52
49
  },
53
- plugins: {
54
- functional: eslintPluginFunctional,
55
- },
56
50
  rules: {
57
51
  ...eslintPluginImportX.configs['typescript']?.rules,
58
52
  // separate type exports which allow certain optimizations within compilers
@@ -123,47 +117,6 @@ async function generateTypeScriptConfig() {
123
117
  '@typescript-eslint/switch-exhaustiveness-check': 'error',
124
118
  // ignore static function as those are not supposed to use `this`
125
119
  '@typescript-eslint/unbound-method': ['error', { ignoreStatic: true }],
126
- // use with functional/type-declaration-immutability
127
- 'functional/prefer-immutable-types': [
128
- 'error',
129
- {
130
- // as there is no native way to achieve `ReadonlyDeep` in TypeScript
131
- enforcement: 'ReadonlyShallow',
132
- // reduce the difficult to use this rule
133
- ignoreInferredTypes: true,
134
- // escape hatch without using eslint-disable
135
- ignoreNamePattern: /Mutable$/u.source,
136
- ignoreTypePattern: [
137
- /^React\./u.source, // Some React types does not work with `Readonly`
138
- ],
139
- },
140
- ],
141
- // forbid unnecessary callback wrapper
142
- 'functional/prefer-tacit': 'error',
143
- // use with functional/prefer-immutable-types
144
- 'functional/type-declaration-immutability': [
145
- 'error',
146
- {
147
- rules: [
148
- {
149
- identifiers: '.+',
150
- immutability: 'ReadonlyShallow',
151
- comparator: 'AtLeast',
152
- // modified from https://github.com/eslint-functional/eslint-plugin-functional/blob/main/docs/rules/type-declaration-immutability.md#preset-overrides
153
- fixer: [
154
- {
155
- pattern: /^(Array|Map|Set)<(.+)>$/u.source,
156
- replace: /Readonly\$1<\$2>/u.source,
157
- },
158
- {
159
- pattern: /^(.+)$/u.source,
160
- replace: /Readonly<\$1>/u.source,
161
- },
162
- ],
163
- },
164
- ],
165
- },
166
- ],
167
120
  'no-restricted-syntax': [
168
121
  'error',
169
122
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@foray1010/eslint-config",
4
- "version": "14.0.0",
4
+ "version": "14.0.1",
5
5
  "homepage": "https://github.com/foray1010/common-presets/tree/master/packages/eslint-config#readme",
6
6
  "bugs": "https://github.com/foray1010/common-presets/issues",
7
7
  "repository": {
@@ -27,7 +27,6 @@
27
27
  "eslint-config-prettier": "^10.0.2",
28
28
  "eslint-import-resolver-typescript": "^3.8.3",
29
29
  "eslint-plugin-compat": "^6.0.2",
30
- "eslint-plugin-functional": "^9.0.1",
31
30
  "eslint-plugin-import-x": "^4.6.1",
32
31
  "eslint-plugin-jest": "^28.11.0",
33
32
  "eslint-plugin-jest-dom": "^5.5.0",
@@ -66,5 +65,5 @@
66
65
  "publishConfig": {
67
66
  "access": "public"
68
67
  },
69
- "gitHead": "7ab2a92cce9564e8f577500663a09ab3a75641ed"
68
+ "gitHead": "c636af09fd413eaa3c2936b2e2b4d32daac1ef0c"
70
69
  }