@enormora/eslint-config-typescript 0.0.3 → 0.0.4

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2023]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git://github.com/enormora/eslint-config.git"
6
6
  },
7
7
  "name": "@enormora/eslint-config-typescript",
8
- "version": "0.0.3",
8
+ "version": "0.0.4",
9
9
  "dependencies": {
10
10
  "@typescript-eslint/eslint-plugin": "6.7.2",
11
11
  "@typescript-eslint/parser": "6.7.2",
@@ -14,6 +14,6 @@
14
14
  "main": "typescript.js",
15
15
  "type": "module",
16
16
  "peerDependencies": {
17
- "@enormora/eslint-config-base": "0.0.3"
17
+ "@enormora/eslint-config-base": "0.0.4"
18
18
  }
19
19
  }
package/typescript.js CHANGED
@@ -275,7 +275,6 @@ export const typescriptConfig = {
275
275
  ...configureWrappedCoreRule('comma-dangle'),
276
276
  '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
277
277
  '@typescript-eslint/no-loop-func': 'off',
278
- ...configureWrappedCoreRule('no-duplicate-imports'),
279
278
  '@typescript-eslint/space-infix-ops': 'off',
280
279
  '@typescript-eslint/no-unnecessary-type-constraint': 'error',
281
280
  '@typescript-eslint/no-confusing-void-expression': [
@@ -351,10 +350,25 @@ export const typescriptConfig = {
351
350
  'functional/prefer-immutable-types': [
352
351
  'error',
353
352
  {
354
- enforcement: 'Immutable',
353
+ enforcement: 'ReadonlyShallow',
355
354
  ignoreClasses: false,
356
355
  ignoreInferredTypes: true,
357
- fixer: true,
356
+ fixer: {
357
+ ReadonlyShallow: [
358
+ {
359
+ pattern: '^([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*\\[\\])$',
360
+ replace: 'readonly $1'
361
+ },
362
+ {
363
+ pattern: '^(Array|Map|Set)<(.+)>$',
364
+ replace: 'Readonly$1<$2>'
365
+ },
366
+ {
367
+ pattern: '^(.+)$',
368
+ replace: 'Readonly<$1>'
369
+ }
370
+ ]
371
+ },
358
372
  variables: {
359
373
  ignoreInFunctions: true
360
374
  }