@homestuck/eslint-config 1.2.0 → 1.4.0

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/.prettierignore CHANGED
@@ -1 +1,2 @@
1
1
  /CHANGELOG.md
2
+
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.4.0](https://github.com/homestuck/configs/compare/eslint-config@v1.3.0...eslint-config@v1.4.0) (2026-01-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * **eslint:** Revised eslint configs to be cleaner, adding package script for config inspector ([#41](https://github.com/homestuck/configs/issues/41)) ([4156bb3](https://github.com/homestuck/configs/commit/4156bb30d003144676a7d6319f8dfc03f66ecfe6))
9
+
10
+ ## [1.3.0](https://github.com/homestuck/configs/compare/eslint-config@v1.2.0...eslint-config@v1.3.0) (2026-01-15)
11
+
12
+
13
+ ### Miscellaneous Chores
14
+
15
+ * release 1.3.0 ([c010dbb](https://github.com/homestuck/configs/commit/c010dbb267e3d36d33cffd0f9827484b89125f96))
16
+
3
17
  ## [1.2.0](https://github.com/homestuck/configs/compare/eslint-config@v1.1.1...eslint-config@v1.2.0) (2025-12-15)
4
18
 
5
19
 
package/eslint.config.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable import/no-named-as-default-member */
2
- import eslint from '@eslint/js'
2
+ import js from '@eslint/js'
3
3
  import tseslintParser from '@typescript-eslint/parser'
4
- import eslintConfigPrettier from 'eslint-config-prettier'
4
+ import eslintConfigPrettier from 'eslint-config-prettier/flat'
5
5
  import pluginImport from 'eslint-plugin-import'
6
6
  import pluginPerfectionist from 'eslint-plugin-perfectionist'
7
7
  import pluginRegexp from 'eslint-plugin-regexp'
@@ -9,25 +9,32 @@ import pluginStorybook from 'eslint-plugin-storybook'
9
9
  import pluginTurbo from 'eslint-plugin-turbo'
10
10
  import pluginUnicorn from 'eslint-plugin-unicorn'
11
11
  import pluginUnusedImports from 'eslint-plugin-unused-imports'
12
- import { defineConfig } from 'eslint/config'
12
+ import { defineConfig, globalIgnores } from 'eslint/config'
13
13
  import globals from 'globals'
14
- import tseslint from 'typescript-eslint'
14
+ import ts from 'typescript-eslint'
15
15
 
16
16
  const rootEslintConfig = defineConfig(
17
+ pluginTurbo.configs['flat/recommended'],
17
18
  {
18
- ignores: ['**/.next', '**/dist', '**/pnpm-lock.yaml', '**/next-env.d.ts'],
19
+ name: 'eslint/js/recommended',
20
+ ...js.configs.recommended,
19
21
  },
20
- pluginTurbo.configs['flat/recommended'],
21
- eslint.configs.recommended,
22
- tseslint.configs.recommendedTypeChecked,
23
- tseslint.configs.strictTypeChecked,
24
- tseslint.configs.stylisticTypeChecked,
25
- pluginPerfectionist.configs['recommended-natural'],
26
- pluginRegexp.configs['flat/recommended'],
22
+ ts.configs.strictTypeChecked,
23
+ ts.configs.stylisticTypeChecked,
24
+ {
25
+ ...pluginPerfectionist.configs['recommended-natural'],
26
+ name: 'perfectionist/recommended-natural',
27
+ },
28
+ { ...pluginRegexp.configs['flat/recommended'], name: 'regexp/recommended' },
27
29
  pluginUnicorn.configs.recommended,
28
30
  pluginImport.flatConfigs.recommended,
29
31
  // @ts-expect-error --- false positive
30
32
  pluginStorybook.configs['flat/recommended'],
33
+ { ...eslintConfigPrettier, name: 'prettier/recommended' },
34
+ globalIgnores(
35
+ ['**/.next', '**/dist', '**/pnpm-lock.yaml', '**/next-env.d.ts'],
36
+ 'Global Ignores',
37
+ ),
31
38
  {
32
39
  languageOptions: {
33
40
  ecmaVersion: 'latest',
@@ -47,7 +54,7 @@ const rootEslintConfig = defineConfig(
47
54
  linterOptions: {
48
55
  reportUnusedDisableDirectives: true,
49
56
  },
50
- name: 'Settings',
57
+ name: 'Global Settings',
51
58
  plugins: {
52
59
  'unused-imports': pluginUnusedImports,
53
60
  },
@@ -73,7 +80,6 @@ const rootEslintConfig = defineConfig(
73
80
  partitionByNewLine: false,
74
81
  },
75
82
  ],
76
-
77
83
  'perfectionist/sort-objects': [
78
84
  'error',
79
85
  {
@@ -141,7 +147,7 @@ const rootEslintConfig = defineConfig(
141
147
  { fixStyle: 'inline-type-imports', prefer: 'type-imports' },
142
148
  ],
143
149
  '@typescript-eslint/no-empty-function': ['warn'],
144
- '@typescript-eslint/no-explicit-any': ['error'],
150
+ // '@typescript-eslint/no-explicit-any': ['error'],
145
151
  '@typescript-eslint/no-misused-promises': [
146
152
  2,
147
153
  { checksVoidReturn: { attributes: false } },
@@ -159,7 +165,6 @@ const rootEslintConfig = defineConfig(
159
165
  ],
160
166
  },
161
167
  },
162
- eslintConfigPrettier,
163
168
  )
164
169
 
165
170
  export default rootEslintConfig
package/next.mjs CHANGED
@@ -1,18 +1,23 @@
1
- import { FlatCompat } from '@eslint/eslintrc'
1
+ import pluginNext from '@next/eslint-plugin-next'
2
2
  import { defineConfig } from 'eslint/config'
3
3
 
4
4
  import reactEslintConfig from '@homestuck/eslint-config/react'
5
5
 
6
- const compat = new FlatCompat({
7
- baseDirectory: import.meta.dirname,
8
- })
9
-
10
- const $config = defineConfig([
6
+ const $config = defineConfig(
11
7
  reactEslintConfig,
12
- // @ts-expect-error - False positive config type mismatch
13
- ...compat.config({
14
- extends: ['plugin:@next/next/recommended'],
15
- }),
16
- ])
8
+ {
9
+ name: '@next/next/recommended',
10
+ plugins: {
11
+ // @ts-expect-error --- false positive from NextJS custom typedef
12
+ '@next/next': pluginNext,
13
+ },
14
+ rules: {
15
+ ...pluginNext.configs.recommended.rules,
16
+ },
17
+ },
18
+ {
19
+ name: 'Next Settings',
20
+ },
21
+ )
17
22
 
18
23
  export default $config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homestuck/eslint-config",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "private": false,
5
5
  "description": "Baseline eslint configs used and maintained by Homestuck Inc., et al.",
6
6
  "repository": {
@@ -37,43 +37,46 @@
37
37
  "main": "./eslint.config.mjs",
38
38
  "prettier": "@homestuck/prettier-config",
39
39
  "dependencies": {
40
- "@eslint/eslintrc": "3.3.3",
41
- "@eslint/js": "9.39.2",
42
- "@next/eslint-plugin-next": "16.0.10",
43
- "@typescript-eslint/eslint-plugin": "8.49.0",
44
- "@typescript-eslint/parser": "8.49.0",
45
- "eslint": "9.39.2",
46
- "eslint-config-prettier": "10.1.8",
47
- "eslint-import-resolver-alias": "1.1.2",
48
- "eslint-import-resolver-typescript": "4.4.4",
49
- "eslint-plugin-import": "2.32.0",
50
- "eslint-plugin-jsx-a11y": "6.10.2",
51
- "eslint-plugin-perfectionist": "4.15.1",
52
- "eslint-plugin-prettier": "5.5.4",
53
- "eslint-plugin-react": "7.37.5",
40
+ "@eslint/eslintrc": "^3.3.3",
41
+ "@eslint/js": "^9.39.2",
42
+ "@next/eslint-plugin-next": "^16.1.1",
43
+ "@typescript-eslint/eslint-plugin": "^8.53.0",
44
+ "@typescript-eslint/parser": "^8.53.0",
45
+ "eslint": "^9.39.2",
46
+ "eslint-config-prettier": "^10.1.8",
47
+ "eslint-import-resolver-alias": "^1.1.2",
48
+ "eslint-import-resolver-typescript": "^4.4.4",
49
+ "eslint-plugin-import": "^2.32.0",
50
+ "eslint-plugin-jsx-a11y": "^6.10.2",
51
+ "eslint-plugin-perfectionist": "^5.3.1",
52
+ "eslint-plugin-prettier": "^5.5.5",
53
+ "eslint-plugin-react": "^7.37.5",
54
54
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
55
- "eslint-plugin-react-hooks": "7.0.1",
56
- "eslint-plugin-react-you-might-not-need-an-effect": "0.7.0",
57
- "eslint-plugin-regexp": "2.10.0",
58
- "eslint-plugin-simple-import-sort": "12.1.1",
59
- "eslint-plugin-storybook": "10.1.9",
60
- "eslint-plugin-turbo": "2.6.3",
61
- "eslint-plugin-unicorn": "62.0.0",
62
- "eslint-plugin-unused-imports": "4.3.0",
63
- "globals": "16.5.0",
64
- "typescript-eslint": "8.49.0"
55
+ "eslint-plugin-react-hooks": "^7.0.1",
56
+ "eslint-plugin-react-you-might-not-need-an-effect": "^0.8.5",
57
+ "eslint-plugin-regexp": "^2.10.0",
58
+ "eslint-plugin-simple-import-sort": "^12.1.1",
59
+ "eslint-plugin-storybook": "^10.1.11",
60
+ "eslint-plugin-turbo": "^2.7.4",
61
+ "eslint-plugin-unicorn": "^62.0.0",
62
+ "eslint-plugin-unused-imports": "^4.3.0",
63
+ "globals": "^17",
64
+ "typescript-eslint": "^8.53.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@types/eslint": "9.6.1",
68
- "@types/eslint__js": "9.14.0",
69
- "@types/node": "24.10.4",
67
+ "@types/eslint": "^9.6.1",
68
+ "@types/eslint__js": "^9.14.0",
69
+ "@types/node": "^24.10.8",
70
70
  "prettier": "3.7.4",
71
- "@homestuck/prettier-config": "1.2.0",
72
- "@homestuck/tsconfig": "1.1.0"
71
+ "@homestuck/tsconfig": "1.3.0",
72
+ "@homestuck/prettier-config": "1.3.1"
73
73
  },
74
74
  "scripts": {
75
75
  "clean": "rm -rf .turbo node_modules",
76
76
  "format": "prettier --check . --ignore-path ../../.gitignore --ignore-path ./.prettierignore",
77
+ "inspect:eslint": "eslint --inspect-config --config ./eslint.config.mjs",
78
+ "inspect:next": "eslint --inspect-config --config ./next.mjs",
79
+ "inspect:react": "eslint --inspect-config --config ./react.mjs",
77
80
  "lint": "eslint .",
78
81
  "typecheck": "tsc --noEmit"
79
82
  }
package/react.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument */
1
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
2
2
 
3
3
  // @ts-expect-error - no types
4
4
  import pluginJSXA11y from 'eslint-plugin-jsx-a11y'
@@ -11,17 +11,30 @@ import { defineConfig } from 'eslint/config'
11
11
  import rootEslintConfig from '@homestuck/eslint-config'
12
12
 
13
13
  const $config = defineConfig(
14
- ...rootEslintConfig,
15
- { ...pluginReact.configs.flat.recommended },
16
- pluginReactHooks.configs.flat.recommended,
17
- pluginReactYouMightNotNeedAnEffect.configs.recommended,
18
- pluginReactCompiler.configs.recommended,
14
+ rootEslintConfig,
15
+ {
16
+ ...pluginReact.configs.flat.recommended,
17
+ name: 'react/recommended',
18
+ },
19
+ {
20
+ ...pluginReactHooks.configs.flat.recommended,
21
+ name: 'react-hooks/recommended',
22
+ },
23
+ {
24
+ ...pluginReactYouMightNotNeedAnEffect.configs.recommended,
25
+ name: 'react-you-might-not-need-an-effect/recommended',
26
+ },
27
+ {
28
+ ...pluginReactCompiler.configs.recommended,
29
+ name: 'react-compiler/recommended',
30
+ },
31
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
19
32
  pluginJSXA11y.flatConfigs.recommended,
20
33
  {
21
34
  languageOptions: {
22
35
  ...pluginReact.configs.flat.recommended?.languageOptions,
23
36
  },
24
- name: 'React',
37
+ name: 'React Settings',
25
38
  rules: {
26
39
  'jsx-a11y/label-has-associated-control': [
27
40
  'error',