@homestuck/eslint-config 1.3.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/CHANGELOG.md +7 -0
- package/eslint.config.mjs +21 -16
- package/next.mjs +16 -11
- package/package.json +6 -3
- package/react.mjs +20 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
|
|
3
10
|
## [1.3.0](https://github.com/homestuck/configs/compare/eslint-config@v1.2.0...eslint-config@v1.3.0) (2026-01-15)
|
|
4
11
|
|
|
5
12
|
|
package/eslint.config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable import/no-named-as-default-member */
|
|
2
|
-
import
|
|
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
|
|
14
|
+
import ts from 'typescript-eslint'
|
|
15
15
|
|
|
16
16
|
const rootEslintConfig = defineConfig(
|
|
17
|
+
pluginTurbo.configs['flat/recommended'],
|
|
17
18
|
{
|
|
18
|
-
|
|
19
|
+
name: 'eslint/js/recommended',
|
|
20
|
+
...js.configs.recommended,
|
|
19
21
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
|
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
|
|
7
|
-
baseDirectory: import.meta.dirname,
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
const $config = defineConfig([
|
|
6
|
+
const $config = defineConfig(
|
|
11
7
|
reactEslintConfig,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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.
|
|
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": {
|
|
@@ -68,12 +68,15 @@
|
|
|
68
68
|
"@types/eslint__js": "^9.14.0",
|
|
69
69
|
"@types/node": "^24.10.8",
|
|
70
70
|
"prettier": "3.7.4",
|
|
71
|
-
"@homestuck/
|
|
72
|
-
"@homestuck/
|
|
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
|
|
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
|
-
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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',
|