@homestuck/eslint-config 1.0.1 → 1.1.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.
- package/CHANGELOG.md +8 -12
- package/eslint.config.mjs +25 -30
- package/package.json +19 -9
- package/react.mjs +54 -0
- package/tsconfig.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [1.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
### Miscellaneous Chores
|
|
3
|
+
## [1.1.1](https://github.com/homestuck/configs/compare/eslint-config@v1.1.0...eslint-config@v1.1.1) (2025-12-15)
|
|
7
4
|
|
|
8
|
-
* release 1.0.0 ([ab6be7b](https://github.com/homestuck/configs/commit/ab6be7b5a3352d5ed80f10731e022e0f18baece1))
|
|
9
|
-
* release 1.0.1 ([2a8c007](https://github.com/homestuck/configs/commit/2a8c007af9a26ef1bbe9b97c94ece6676262a07b))
|
|
10
5
|
|
|
11
|
-
|
|
6
|
+
### Bug Fixes
|
|
12
7
|
|
|
8
|
+
* **eslint:** Move eslint and globals from devDeps to deps ([#17](https://github.com/homestuck/configs/issues/17)) ([c91d958](https://github.com/homestuck/configs/commit/c91d958f76568dcc3b58e725ac2617a0c55633b9))
|
|
13
9
|
|
|
14
|
-
|
|
10
|
+
## [1.1.0](https://github.com/homestuck/configs/compare/eslint-config@v1.0.1...eslint-config@v1.1.0) (2025-12-11)
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
### Features
|
|
17
13
|
|
|
18
|
-
|
|
14
|
+
- **eslint:** adding eslint config for React environments ([#7](https://github.com/homestuck/configs/issues/7)) ([42055f4](https://github.com/homestuck/configs/commit/42055f48c251e8c7dfbfe53c6a9dd60430e3d0e4))
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
## [1.0.1](https://github.com/homestuck/configs/compare/eslint-config@v1.0.0...eslint-config@v1.0.1) (2025-12-09)
|
|
21
17
|
|
|
22
|
-
|
|
18
|
+
## [1.0.0](https://github.com/homestuck/configs/compare/eslint-config@v1.0.0...eslint-config@v1.0.0) (2025-12-09)
|
package/eslint.config.mjs
CHANGED
|
@@ -1,51 +1,46 @@
|
|
|
1
1
|
/* eslint-disable import/no-named-as-default-member */
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import ESLintPluginUnicorn from 'eslint-plugin-unicorn'
|
|
13
|
-
import ESLintPluginUnusedImports from 'eslint-plugin-unused-imports'
|
|
2
|
+
import eslint from '@eslint/js'
|
|
3
|
+
import tseslintParser from '@typescript-eslint/parser'
|
|
4
|
+
import eslintConfigPrettier from 'eslint-config-prettier'
|
|
5
|
+
import pluginImport from 'eslint-plugin-import'
|
|
6
|
+
import pluginPerfectionist from 'eslint-plugin-perfectionist'
|
|
7
|
+
import pluginRegexp from 'eslint-plugin-regexp'
|
|
8
|
+
import pluginStorybook from 'eslint-plugin-storybook'
|
|
9
|
+
import pluginTurbo from 'eslint-plugin-turbo'
|
|
10
|
+
import pluginUnicorn from 'eslint-plugin-unicorn'
|
|
11
|
+
import pluginUnusedImports from 'eslint-plugin-unused-imports'
|
|
14
12
|
import { defineConfig } from 'eslint/config'
|
|
15
13
|
import globals from 'globals'
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
19
|
-
const __dirname = path.dirname(__filename)
|
|
14
|
+
import tseslint from 'typescript-eslint'
|
|
20
15
|
|
|
21
16
|
export const rootEslintConfig = defineConfig(
|
|
22
17
|
{
|
|
23
18
|
ignores: ['**/.next', '**/dist', '**/pnpm-lock.yaml', '**/next-env.d.ts'],
|
|
24
19
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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'],
|
|
27
|
+
pluginUnicorn.configs.recommended,
|
|
28
|
+
pluginImport.flatConfigs.recommended,
|
|
34
29
|
// @ts-expect-error --- false positive
|
|
35
|
-
|
|
30
|
+
pluginStorybook.configs['flat/recommended'],
|
|
36
31
|
{
|
|
37
32
|
languageOptions: {
|
|
38
33
|
ecmaVersion: 'latest',
|
|
39
34
|
globals: {
|
|
40
35
|
...globals.node,
|
|
41
36
|
},
|
|
42
|
-
parser:
|
|
37
|
+
parser: tseslintParser,
|
|
43
38
|
parserOptions: {
|
|
44
39
|
ecmaFeatures: {
|
|
45
40
|
jsx: true,
|
|
46
41
|
},
|
|
47
42
|
projectService: true,
|
|
48
|
-
tsconfigRootDir:
|
|
43
|
+
tsconfigRootDir: import.meta.dirname,
|
|
49
44
|
},
|
|
50
45
|
sourceType: 'module',
|
|
51
46
|
},
|
|
@@ -54,7 +49,7 @@ export const rootEslintConfig = defineConfig(
|
|
|
54
49
|
},
|
|
55
50
|
name: 'Settings',
|
|
56
51
|
plugins: {
|
|
57
|
-
'unused-imports':
|
|
52
|
+
'unused-imports': pluginUnusedImports,
|
|
58
53
|
},
|
|
59
54
|
rules: {
|
|
60
55
|
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
|
@@ -164,7 +159,7 @@ export const rootEslintConfig = defineConfig(
|
|
|
164
159
|
],
|
|
165
160
|
},
|
|
166
161
|
},
|
|
167
|
-
|
|
162
|
+
eslintConfigPrettier,
|
|
168
163
|
)
|
|
169
164
|
|
|
170
165
|
export default rootEslintConfig
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homestuck/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Baseline eslint configs used and maintained by Homestuck Inc., et al.",
|
|
6
6
|
"repository": {
|
|
@@ -18,41 +18,51 @@
|
|
|
18
18
|
"node": "./eslint.config.mjs",
|
|
19
19
|
"require": "./eslint.config.mjs",
|
|
20
20
|
"default": "./eslint.config.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./react": {
|
|
23
|
+
"types": "./react.mjs",
|
|
24
|
+
"import": "./react.mjs",
|
|
25
|
+
"node": "./react.mjs",
|
|
26
|
+
"require": "./react.mjs",
|
|
27
|
+
"default": "./react.mjs"
|
|
21
28
|
}
|
|
22
29
|
},
|
|
23
30
|
"main": "./eslint.config.mjs",
|
|
24
31
|
"prettier": "@homestuck/prettier-config",
|
|
25
32
|
"dependencies": {
|
|
26
33
|
"@eslint/eslintrc": "3.3.3",
|
|
27
|
-
"@eslint/js": "9.39.
|
|
28
|
-
"@next/eslint-plugin-next": "16.0.
|
|
34
|
+
"@eslint/js": "9.39.2",
|
|
35
|
+
"@next/eslint-plugin-next": "16.0.10",
|
|
29
36
|
"@typescript-eslint/eslint-plugin": "8.49.0",
|
|
30
37
|
"@typescript-eslint/parser": "8.49.0",
|
|
38
|
+
"eslint": "9.39.2",
|
|
31
39
|
"eslint-config-prettier": "10.1.8",
|
|
32
40
|
"eslint-import-resolver-alias": "1.1.2",
|
|
33
41
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
34
42
|
"eslint-plugin-import": "2.32.0",
|
|
35
43
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
36
44
|
"eslint-plugin-perfectionist": "4.15.1",
|
|
45
|
+
"eslint-plugin-prettier": "5.5.4",
|
|
37
46
|
"eslint-plugin-react": "7.37.5",
|
|
47
|
+
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
38
48
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
39
49
|
"eslint-plugin-react-you-might-not-need-an-effect": "0.7.0",
|
|
40
50
|
"eslint-plugin-regexp": "2.10.0",
|
|
41
51
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
42
|
-
"eslint-plugin-storybook": "10.1.
|
|
52
|
+
"eslint-plugin-storybook": "10.1.9",
|
|
43
53
|
"eslint-plugin-turbo": "2.6.3",
|
|
44
54
|
"eslint-plugin-unicorn": "62.0.0",
|
|
45
55
|
"eslint-plugin-unused-imports": "4.3.0",
|
|
56
|
+
"globals": "16.5.0",
|
|
46
57
|
"typescript-eslint": "8.49.0"
|
|
47
58
|
},
|
|
48
59
|
"devDependencies": {
|
|
49
60
|
"@types/eslint": "9.6.1",
|
|
50
|
-
"@types/
|
|
51
|
-
"
|
|
52
|
-
"globals": "16.5.0",
|
|
61
|
+
"@types/eslint__js": "9.14.0",
|
|
62
|
+
"@types/node": "24.10.4",
|
|
53
63
|
"prettier": "3.7.4",
|
|
54
|
-
"@homestuck/prettier-config": "1.0
|
|
55
|
-
"@homestuck/tsconfig": "1.0
|
|
64
|
+
"@homestuck/prettier-config": "1.2.0",
|
|
65
|
+
"@homestuck/tsconfig": "1.1.0"
|
|
56
66
|
},
|
|
57
67
|
"scripts": {
|
|
58
68
|
"clean": "rm -rf .turbo node_modules",
|
package/react.mjs
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument */
|
|
2
|
+
|
|
3
|
+
// @ts-expect-error - no types
|
|
4
|
+
import pluginJSXA11y from 'eslint-plugin-jsx-a11y'
|
|
5
|
+
import pluginReact from 'eslint-plugin-react'
|
|
6
|
+
import pluginReactCompiler from 'eslint-plugin-react-compiler'
|
|
7
|
+
import pluginReactHooks from 'eslint-plugin-react-hooks'
|
|
8
|
+
import pluginReactYouMightNotNeedAnEffect from 'eslint-plugin-react-you-might-not-need-an-effect'
|
|
9
|
+
import { defineConfig } from 'eslint/config'
|
|
10
|
+
|
|
11
|
+
import { rootEslintConfig } from '@homestuck/eslint-config'
|
|
12
|
+
|
|
13
|
+
const $config = defineConfig(
|
|
14
|
+
...rootEslintConfig,
|
|
15
|
+
{ ...pluginReact.configs.flat.recommended },
|
|
16
|
+
pluginReactHooks.configs.flat.recommended,
|
|
17
|
+
pluginReactYouMightNotNeedAnEffect.configs.recommended,
|
|
18
|
+
pluginReactCompiler.configs.recommended,
|
|
19
|
+
pluginJSXA11y.flatConfigs.recommended,
|
|
20
|
+
{
|
|
21
|
+
languageOptions: {
|
|
22
|
+
...pluginReact.configs.flat.recommended?.languageOptions,
|
|
23
|
+
},
|
|
24
|
+
name: 'React',
|
|
25
|
+
rules: {
|
|
26
|
+
'jsx-a11y/label-has-associated-control': [
|
|
27
|
+
'error',
|
|
28
|
+
{
|
|
29
|
+
depth: 3,
|
|
30
|
+
labelAttributes: ['children'],
|
|
31
|
+
labelComponents: ['FormLabel'],
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
'react/function-component-definition': [
|
|
36
|
+
'error',
|
|
37
|
+
{
|
|
38
|
+
namedComponents: ['arrow-function', 'function-declaration'],
|
|
39
|
+
unnamedComponents: 'arrow-function',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
'react/no-array-index-key': ['warn'],
|
|
43
|
+
'react/prop-types': 'off',
|
|
44
|
+
'react/react-in-jsx-scope': ['off'],
|
|
45
|
+
},
|
|
46
|
+
settings: {
|
|
47
|
+
react: {
|
|
48
|
+
version: '19',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
export default $config
|
package/tsconfig.json
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"baseUrl": ".",
|
|
4
4
|
"paths": {
|
|
5
|
-
"@homestuck/eslint-config": ["eslint.config.mjs"]
|
|
5
|
+
"@homestuck/eslint-config": ["eslint.config.mjs"],
|
|
6
|
+
"@homestuck/eslint-config/react": ["react.mjs"]
|
|
6
7
|
},
|
|
7
8
|
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
|
|
8
9
|
"types": ["node"]
|