@ethang/eslint-config 18.4.7 → 18.4.9

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
@@ -2,10 +2,13 @@
2
2
 
3
3
  [View Config](https://eslint-config-ethang.pages.dev/rules)
4
4
 
5
- * 524 errored rules.
5
+ Do **NOT** use this with Prettier! Styling rules are included.
6
+
7
+ * 615 errored rules.
6
8
  * 142 rules from vanilla EsLint
7
9
  * 113 rules from [sindresorhus/eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
8
10
  * 104 rules from [@typescript/eslint](https://github.com/typescript-eslint/typescript-eslint)
11
+ * 92 rules from [@stylistic/eslint-plugin](https://eslint.style/)
9
12
  * 42 rules from [eslint-plugin-lodash](https://github.com/wix-incubator/eslint-plugin-lodash)
10
13
  * 35 rules from [jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
11
14
  * 32 rules from [eslint-plugin-sonarjs](https://github.com/SonarSource/eslint-plugin-sonarjs)
@@ -17,7 +20,6 @@
17
20
  * 3 rules from [@tanstack/eslint-plugin-query](https://tanstack.com/query/latest/docs/eslint/eslint-plugin-query)
18
21
  * 1 rule from [eslint-plugin-depend](https://github.com/es-tooling/eslint-plugin-depend/tree/main)
19
22
  * 1 rule from [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat)
20
- * Includes Prettier built-in (do NOT use this with a separate Prettier config.)
21
23
 
22
24
  # Add Even More!
23
25
  * 51 rules for **Astro**
@@ -33,7 +35,7 @@
33
35
 
34
36
  # Install
35
37
 
36
- `pnpm i -D eslint prettier typescript-eslint @ethang/eslint-config`
38
+ `pnpm i -D eslint typescript-eslint @ethang/eslint-config`
37
39
 
38
40
  **Requires TypesScript and tsconfig.json at root directory.**
39
41
 
@@ -79,11 +81,3 @@ This config will also lint for browserslist features. Make sure to set this in p
79
81
  "maintained node versions"
80
82
  ]
81
83
  ```
82
-
83
- **.gitattributes**
84
-
85
- Line breaks are enforced for Unix style. (\n, not \r\n). It's highly recommended reflecting this in .gitattributes
86
-
87
- ```githubexpressionlanguage
88
- * text eol=crlf
89
- ```
package/eslint.config.js CHANGED
@@ -13,6 +13,7 @@ import compat from "eslint-plugin-compat";
13
13
  import lodashConfig from "eslint-plugin-lodash";
14
14
  import tailwind from "eslint-plugin-tailwindcss";
15
15
  import stylistic from "@stylistic/eslint-plugin";
16
+ import json from '@eslint/json';
16
17
 
17
18
  export const languageOptions = {
18
19
  parser,
@@ -25,6 +26,13 @@ export const languageOptions = {
25
26
  export const ignores = ["eslint.config.js", "node_modules", "dist"];
26
27
 
27
28
  export default tseslint.config({
29
+ files: ["**/*.json5", "**/*.jsonc", "**/*.json"],
30
+ ignores,
31
+ plugins: {
32
+ "json/no-duplicate-keys": "error",
33
+ "json/no-empty-keys": "error",
34
+ },
35
+ }, {
28
36
  files: ["**/*.{js,ts,jsx,tsx,cjs,mjs}"],
29
37
  ignores,
30
38
  languageOptions,
@@ -35,6 +43,7 @@ export default tseslint.config({
35
43
  barrel,
36
44
  compat,
37
45
  depend,
46
+ json,
38
47
  lodash: lodashConfig,
39
48
  n,
40
49
  perfectionist,
@@ -160,7 +169,9 @@ export default tseslint.config({
160
169
  "no-unreachable-loop": "error",
161
170
  "no-unsafe-finally": "error",
162
171
  "no-unsafe-negation": "error",
163
- "no-unsafe-optional-chaining": "error",
172
+ "no-unsafe-optional-chaining": ["error", {
173
+ disallowArithmeticOperators: true
174
+ }],
164
175
  "no-unused-labels": "error",
165
176
  "no-unused-private-class-members": "error",
166
177
  "no-useless-backreference": "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethang/eslint-config",
3
- "version": "18.4.7",
3
+ "version": "18.4.9",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/eglove/eslint-config-ethang.git"
6
6
  },
@@ -16,9 +16,10 @@
16
16
  "author": "Ethan Glover",
17
17
  "license": "ISC",
18
18
  "peerDependencies": {
19
- "@eslint-react/eslint-plugin": "^1.9.0",
19
+ "@eslint-react/eslint-plugin": "^1.9.1",
20
20
  "@eslint/js": "^9.8.0",
21
- "@stylistic/eslint-plugin": "^2.6.1",
21
+ "@eslint/json": "^0.3.0",
22
+ "@stylistic/eslint-plugin": "^2.6.2",
22
23
  "@tanstack/eslint-plugin-query": "^5.51.15",
23
24
  "@typescript-eslint/parser": "^8.0.1",
24
25
  "eslint": "^9.8.0",
@@ -39,9 +40,10 @@
39
40
  "typescript-eslint": "^8.0.1"
40
41
  },
41
42
  "dependencies": {
42
- "@eslint-react/eslint-plugin": "^1.9.0",
43
+ "@eslint-react/eslint-plugin": "^1.9.1",
43
44
  "@eslint/js": "^9.8.0",
44
- "@stylistic/eslint-plugin": "^2.6.1",
45
+ "@eslint/json": "^0.3.0",
46
+ "@stylistic/eslint-plugin": "^2.6.2",
45
47
  "@tanstack/eslint-plugin-query": "^5.51.15",
46
48
  "@typescript-eslint/parser": "^8.0.1",
47
49
  "eslint": "^9.8.0",