@dangee1705/eslint-config 0.9.1 → 0.10.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.
Files changed (2) hide show
  1. package/eslint.config.js +97 -9
  2. package/package.json +7 -8
package/eslint.config.js CHANGED
@@ -1,9 +1,10 @@
1
+ import eslintReact from '@eslint-react/eslint-plugin';
1
2
  import stylistic from '@stylistic/eslint-plugin';
2
3
  import typescriptEslint from '@typescript-eslint/eslint-plugin';
3
4
  import parser from '@typescript-eslint/parser';
4
- import reactHooks from 'eslint-plugin-react-hooks';
5
5
  import simpleImportSort from 'eslint-plugin-simple-import-sort';
6
6
  import globals from 'globals';
7
+ import {cwd} from 'node:process';
7
8
 
8
9
  /** @type {import('eslint').Linter.Config[]} */
9
10
  export default [
@@ -220,9 +221,6 @@ export default [
220
221
  'yoda': ['warn'],
221
222
  'unicode-bom': ['warn'],
222
223
 
223
- 'react-hooks/rules-of-hooks': 'error',
224
- 'react-hooks/exhaustive-deps': 'error',
225
-
226
224
  '@stylistic/array-bracket-newline': ['warn', 'consistent'],
227
225
  '@stylistic/array-bracket-spacing': ['warn', 'never'],
228
226
  '@stylistic/array-element-newline': ['warn', {'consistent': true, 'multiline': true}],
@@ -320,7 +318,6 @@ export default [
320
318
  'simple-import-sort/imports': ['warn', {'groups': [['.*']]}]
321
319
  },
322
320
  plugins: {
323
- 'react-hooks': reactHooks,
324
321
  '@stylistic': stylistic,
325
322
  'simple-import-sort': simpleImportSort
326
323
  }
@@ -332,9 +329,9 @@ export default [
332
329
  parser,
333
330
  parserOptions: {
334
331
  projectService: {
335
- allowDefaultProject: ['*.js']
332
+ allowDefaultProject: ['*.js', '*.ts']
336
333
  },
337
- tsconfigRootDir: import.meta.dirname
334
+ tsconfigRootDir: cwd()
338
335
  }
339
336
  },
340
337
  rules: {
@@ -462,10 +459,101 @@ export default [
462
459
  // '@typescript-eslint/triple-slash-reference': ['warn'],
463
460
  '@typescript-eslint/unbound-method': ['warn'],
464
461
  '@typescript-eslint/unified-signatures': ['warn'],
465
- '@typescript-eslint/use-unknown-in-catch-callback-variable': ['warn']
462
+ '@typescript-eslint/use-unknown-in-catch-callback-variable': ['warn'],
463
+
464
+ '@eslint-react/component-hook-factories': 'error',
465
+ '@eslint-react/error-boundaries': 'error',
466
+ '@eslint-react/exhaustive-deps': 'error',
467
+ '@eslint-react/immutability': 'error',
468
+ '@eslint-react/no-access-state-in-setstate': 'error',
469
+ '@eslint-react/no-array-index-key': 'warn',
470
+ '@eslint-react/no-children-count': 'error',
471
+ '@eslint-react/no-children-for-each': 'error',
472
+ '@eslint-react/no-children-map': 'error',
473
+ '@eslint-react/no-children-only': 'error',
474
+ '@eslint-react/no-children-to-array': 'error',
475
+ '@eslint-react/no-class-component': 'error',
476
+ '@eslint-react/no-clone-element': 'error',
477
+ '@eslint-react/no-component-will-mount': 'error',
478
+ '@eslint-react/no-component-will-receive-props': 'error',
479
+ '@eslint-react/no-component-will-update': 'error',
480
+ '@eslint-react/no-context-provider': 'error',
481
+ '@eslint-react/no-create-ref': 'error',
482
+ '@eslint-react/no-direct-mutation-state': 'error',
483
+ '@eslint-react/no-duplicate-key': 'error',
484
+ '@eslint-react/no-forward-ref': 'error',
485
+ '@eslint-react/no-implicit-children': 'error',
486
+ '@eslint-react/no-implicit-key': 'error',
487
+ '@eslint-react/no-implicit-ref': 'error',
488
+ '@eslint-react/no-leaked-conditional-rendering': 'error',
489
+ '@eslint-react/no-missing-component-display-name': 'warn',
490
+ '@eslint-react/no-missing-context-display-name': 'off',
491
+ '@eslint-react/no-missing-key': 'error',
492
+ '@eslint-react/no-misused-capture-owner-stack': 'off',
493
+ '@eslint-react/no-nested-component-definitions': 'error',
494
+ '@eslint-react/no-nested-lazy-component-declarations': 'error',
495
+ '@eslint-react/no-set-state-in-component-did-mount': 'error',
496
+ '@eslint-react/no-set-state-in-component-did-update': 'error',
497
+ '@eslint-react/no-set-state-in-component-will-update': 'error',
498
+ '@eslint-react/no-unnecessary-use-callback': 'off',
499
+ '@eslint-react/no-unnecessary-use-memo': 'off',
500
+ '@eslint-react/no-unnecessary-use-prefix': 'warn',
501
+ '@eslint-react/no-unsafe-component-will-mount': 'error',
502
+ '@eslint-react/no-unsafe-component-will-receive-props': 'error',
503
+ '@eslint-react/no-unsafe-component-will-update': 'error',
504
+ '@eslint-react/no-unstable-context-value': 'warn',
505
+ '@eslint-react/no-unstable-default-props': 'warn',
506
+ '@eslint-react/no-unused-class-component-members': 'error',
507
+ '@eslint-react/no-unused-props': 'warn',
508
+ '@eslint-react/no-unused-state': 'warn',
509
+ '@eslint-react/no-use-context': 'warn',
510
+ '@eslint-react/prefer-destructuring-assignment': 'warn',
511
+ '@eslint-react/prefer-namespace-import': 'warn',
512
+ '@eslint-react/purity': 'warn',
513
+ '@eslint-react/refs': 'warn',
514
+ '@eslint-react/rules-of-hooks': 'error',
515
+ '@eslint-react/set-state-in-effect': 'warn',
516
+ '@eslint-react/set-state-in-render': 'warn',
517
+ '@eslint-react/unsupported-syntax': 'warn',
518
+ '@eslint-react/use-memo': 'error',
519
+ '@eslint-react/use-state': 'error',
520
+ '@eslint-react/jsx-no-children-prop': 'error',
521
+ '@eslint-react/jsx-no-children-prop-with-children': 'error',
522
+ '@eslint-react/jsx-no-comment-textnodes': 'error',
523
+ '@eslint-react/jsx-no-key-after-spread': 'warn',
524
+ '@eslint-react/jsx-no-leaked-dollar': 'error',
525
+ '@eslint-react/jsx-no-leaked-semicolon': 'error',
526
+ '@eslint-react/jsx-no-namespace': 'error',
527
+ '@eslint-react/jsx-no-useless-fragment': 'warn',
528
+ '@eslint-react/rsc-function-definition': 'error',
529
+ '@eslint-react/dom-no-dangerously-set-innerhtml': 'error',
530
+ '@eslint-react/dom-no-dangerously-set-innerhtml-with-children': 'error',
531
+ '@eslint-react/dom-no-find-dom-node': 'error',
532
+ '@eslint-react/dom-no-flush-sync': 'error',
533
+ '@eslint-react/dom-no-hydrate': 'error',
534
+ '@eslint-react/dom-no-missing-button-type': 'warn',
535
+ '@eslint-react/dom-no-missing-iframe-sandbox': 'warn',
536
+ '@eslint-react/dom-no-render': 'error',
537
+ '@eslint-react/dom-no-render-return-value': 'error',
538
+ '@eslint-react/dom-no-script-url': 'error',
539
+ '@eslint-react/dom-no-string-style-prop': 'error',
540
+ '@eslint-react/dom-no-unknown-property': 'error',
541
+ '@eslint-react/dom-no-unsafe-iframe-sandbox': 'error',
542
+ '@eslint-react/dom-no-unsafe-target-blank': 'error',
543
+ '@eslint-react/dom-no-use-form-state': 'error',
544
+ '@eslint-react/dom-no-void-elements-with-children': 'error',
545
+ '@eslint-react/dom-prefer-namespace-import': 'warn',
546
+ '@eslint-react/web-api-no-leaked-event-listener': 'error',
547
+ '@eslint-react/web-api-no-leaked-interval': 'error',
548
+ '@eslint-react/web-api-no-leaked-resize-observer': 'error',
549
+ '@eslint-react/web-api-no-leaked-timeout': 'error',
550
+ '@eslint-react/naming-convention-context-name': 'warn',
551
+ '@eslint-react/naming-convention-id-name': 'warn',
552
+ '@eslint-react/naming-convention-ref-name': 'warn'
466
553
  },
467
554
  plugins: {
468
- '@typescript-eslint': typescriptEslint
555
+ '@typescript-eslint': typescriptEslint,
556
+ '@eslint-react': eslintReact
469
557
  }
470
558
  }
471
559
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dangee1705/eslint-config",
3
- "version": "0.9.1",
3
+ "version": "0.10.1",
4
4
  "description": "Dan Gee's ESLint Config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -19,15 +19,14 @@
19
19
  "license": "MIT",
20
20
  "author": "Dan Gee <dangee1705@gmail.com> (https://dangee1705.com)",
21
21
  "dependencies": {
22
+ "@eslint-react/eslint-plugin": "^4.2.3",
22
23
  "@stylistic/eslint-plugin": "^5.10.0",
23
- "@typescript-eslint/eslint-plugin": "^8.58.0",
24
- "@typescript-eslint/parser": "^8.58.0",
25
- "eslint-plugin-react": "^7.37.5",
26
- "eslint-plugin-react-hooks": "^7.0.1",
27
- "eslint-plugin-simple-import-sort": "^12.1.1",
28
- "globals": "^17.4.0"
24
+ "@typescript-eslint/eslint-plugin": "^8.58.2",
25
+ "@typescript-eslint/parser": "^8.58.2",
26
+ "eslint-plugin-simple-import-sort": "^13.0.0",
27
+ "globals": "^17.5.0"
29
28
  },
30
29
  "peerDependencies": {
31
- "eslint": "^9.23.0 || ^10.0.3"
30
+ "eslint": "^10.2.0"
32
31
  }
33
32
  }