@ethang/eslint-config 18.1.6 → 18.1.8

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/README.md CHANGED
@@ -62,3 +62,14 @@ export default tseslint.config(...config, ...astroConfig, ...reactConfig, {
62
62
  "lint:fix": "eslint . --fix",
63
63
  }
64
64
  ```
65
+
66
+ ** Browserslist **
67
+
68
+ This config will also lint for browserslist features. Make sure to set this in package.json. [More info.](https://github.com/browserslist/browserslist)
69
+
70
+ ```json
71
+ "browserslist": [
72
+ "defaults and fully supports es6-module",
73
+ "maintained node versions"
74
+ ]
75
+ ```
package/eslint.config.js CHANGED
@@ -10,7 +10,9 @@ import tanstack from "@tanstack/eslint-plugin-query";
10
10
  import perfectionist from "eslint-plugin-perfectionist";
11
11
  import depend from "eslint-plugin-depend";
12
12
  import barrel from "eslint-plugin-barrel-files";
13
- import github from "eslint-plugin-github";
13
+ import compat from "eslint-plugin-compat";
14
+ import lodashConfig from "eslint-plugin-lodash";
15
+ import tailwind from "eslint-plugin-tailwindcss";
14
16
 
15
17
  export const languageOptions = {
16
18
  parser,
@@ -27,16 +29,18 @@ export default tseslint.config(eslintPluginPrettier, {
27
29
  ignores,
28
30
  languageOptions,
29
31
  plugins: {
32
+ "@tanstack/query": tanstack,
30
33
  "@typescript-eslint": tseslint.plugin,
31
34
  a11y,
32
35
  barrel,
36
+ compat,
33
37
  depend,
34
- github,
38
+ lodash: lodashConfig,
35
39
  n,
36
40
  perfectionist,
37
41
  sonar,
42
+ tailwind,
38
43
  unicorn,
39
- "@tanstack/query": tanstack,
40
44
  },
41
45
  rules: {
42
46
  "depend/ban-dependencies": ["error", { allowed: ["lodash"] }],
@@ -44,6 +48,7 @@ export default tseslint.config(eslintPluginPrettier, {
44
48
  "barrel/avoid-importing-barrel-files": "error",
45
49
  "barrel/avoid-namespace-import": "error",
46
50
  "barrel/avoid-re-export-all": "error",
51
+ "compat/compat": "error",
47
52
 
48
53
  "accessor-pairs": "error",
49
54
  "array-callback-return": "error",
@@ -445,6 +450,49 @@ export default tseslint.config(eslintPluginPrettier, {
445
450
  "unicorn/text-encoding-identifier-case": "error",
446
451
  "unicorn/throw-new-error": "error",
447
452
 
453
+ "lodash/callback-binding": "error",
454
+ "lodash/chain-style": ["error", "as-needed"],
455
+ "lodash/chaining": "error",
456
+ "lodash/collection-method-value": "error",
457
+ "lodash/collection-ordering": "error",
458
+ "lodash/collection-return": "error",
459
+ "lodash/consistent-compose": ["error", "flow"],
460
+ "lodash/identity-shorthand": ["error", "always"],
461
+ "lodash/import-scope": ["error", "method"],
462
+ "lodash/matches-prop-shorthand": ["error", "always"],
463
+ "lodash/matches-shorthand": ["error", "always", 3],
464
+ "lodash/no-commit": "error",
465
+ "lodash/no-double-unwrap": "error",
466
+ "lodash/no-extra-args": "error",
467
+ "lodash/no-unbound-this": "error",
468
+ "lodash/path-style": ["error", "string"],
469
+ "lodash/prefer-compact": "error",
470
+ "lodash/prefer-constant": "error",
471
+ "lodash/prefer-filter": "error",
472
+ "lodash/prefer-find": "error",
473
+ "lodash/prefer-flat-map": "error",
474
+ "lodash/prefer-get": "error",
475
+ "lodash/prefer-immutable-method": "error",
476
+ "lodash/prefer-includes": ["error", { includeNative: true }],
477
+ "lodash/prefer-invoke-map": "error",
478
+ "lodash/prefer-is-nil": "error",
479
+ "lodash/prefer-lodash-chain": "error",
480
+ "lodash/prefer-lodash-method": "error",
481
+ "lodash/prefer-lodash-typecheck": "error",
482
+ "lodash/prefer-map": "error",
483
+ "lodash/prefer-matches": "error",
484
+ "lodash/prefer-noop": "error",
485
+ "lodash/prefer-over-quantifier": "error",
486
+ "lodash/prefer-reject": "error",
487
+ "lodash/prefer-some": ["error", { includeNative: true }],
488
+ "lodash/prefer-startswith": "error",
489
+ "lodash/prefer-thru": "error",
490
+ "lodash/prefer-times": "error",
491
+ "lodash/prefer-wrapper-method": "error",
492
+ "lodash/preferred-alias": "error",
493
+ "lodash/prop-shorthand": ["error", "always"],
494
+ "lodash/unwrap": "error",
495
+
448
496
  "sonar/cognitive-complexity": "error",
449
497
  "sonar/elseif-without-else": "error",
450
498
  "sonar/max-switch-cases": "error",
@@ -479,10 +527,17 @@ export default tseslint.config(eslintPluginPrettier, {
479
527
  "sonar/prefer-while": "error",
480
528
 
481
529
  "@tanstack/query/exhaustive-deps": "error",
482
- // "@tanstack/query/no-deprecated-options": "error", // not yet implemented
483
530
  "@tanstack/query/no-rest-destructuring": "error",
484
531
  "@tanstack/query/stable-query-client": "error",
485
532
 
533
+ "tailwind/classnames-order": "error",
534
+ "tailwind/enforces-negative-arbitrary-values": "error",
535
+ "tailwind/enforces-shorthand": "error",
536
+ "tailwind/migration-from-tailwind-2": "error",
537
+ "tailwind/no-arbitrary-value": "error",
538
+ "tailwind/no-contradicting-classname": "error",
539
+ "tailwind/no-unnecessary-arbitrary-value": "error",
540
+
486
541
  "perfectionist/sort-array-includes": "error",
487
542
  "perfectionist/sort-astro-attributes": [
488
543
  "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethang/eslint-config",
3
- "version": "18.1.6",
3
+ "version": "18.1.8",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/eglove/eslint-config-ethang.git"
6
6
  },
@@ -24,15 +24,17 @@
24
24
  "eslint-config-prettier": "^9.1.0",
25
25
  "eslint-plugin-astro": "^1.2.3",
26
26
  "eslint-plugin-barrel-files": "^2.1.0",
27
+ "eslint-plugin-compat": "^6.0.0",
27
28
  "eslint-plugin-depend": "^0.9.0",
28
- "eslint-plugin-github": "^5.0.1",
29
29
  "eslint-plugin-jsx-a11y": "^6.9.0",
30
+ "eslint-plugin-lodash": "^8.0.0",
30
31
  "eslint-plugin-n": "^17.10.1",
31
32
  "eslint-plugin-perfectionist": "^3.1.0",
32
33
  "eslint-plugin-prettier": "^5.2.1",
33
34
  "eslint-plugin-react": "^7.35.0",
34
35
  "eslint-plugin-react-hooks": "^4.6.2",
35
36
  "eslint-plugin-sonarjs": "1.0.4",
37
+ "eslint-plugin-tailwindcss": "^3.17.4",
36
38
  "eslint-plugin-unicorn": "^55.0.0",
37
39
  "prettier": "^3.3.3",
38
40
  "typescript": "^5.5.4",
@@ -47,15 +49,17 @@
47
49
  "eslint-config-prettier": "^9.1.0",
48
50
  "eslint-plugin-astro": "^1.2.3",
49
51
  "eslint-plugin-barrel-files": "^2.1.0",
52
+ "eslint-plugin-compat": "^6.0.0",
50
53
  "eslint-plugin-depend": "^0.9.0",
51
- "eslint-plugin-github": "^5.0.1",
52
54
  "eslint-plugin-jsx-a11y": "^6.9.0",
55
+ "eslint-plugin-lodash": "^8.0.0",
53
56
  "eslint-plugin-n": "^17.10.1",
54
57
  "eslint-plugin-perfectionist": "^3.1.0",
55
58
  "eslint-plugin-prettier": "^5.2.1",
56
59
  "eslint-plugin-react": "^7.35.0",
57
60
  "eslint-plugin-react-hooks": "^4.6.2",
58
61
  "eslint-plugin-sonarjs": "1.0.4",
62
+ "eslint-plugin-tailwindcss": "^3.17.4",
59
63
  "eslint-plugin-unicorn": "^55.0.0",
60
64
  "prettier": "^3.3.3",
61
65
  "typescript": "^5.5.4",