@homestuck/eslint-config 1.0.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/.lintstagedrc.json +9 -0
- package/.prettierignore +1 -0
- package/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/eslint.config.mjs +170 -0
- package/package.json +63 -0
- package/tsconfig.json +13 -0
package/.prettierignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/CHANGELOG.md
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.0.1](https://github.com/homestuck/configs/compare/eslint-config@v1.0.0...eslint-config@v1.0.1) (2025-12-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
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
|
+
|
|
11
|
+
## [1.0.0](https://github.com/homestuck/configs/compare/eslint-config@v1.0.0...eslint-config@v1.0.0) (2025-12-09)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Miscellaneous Chores
|
|
15
|
+
|
|
16
|
+
* release 1.0.0 ([ab6be7b](https://github.com/homestuck/configs/commit/ab6be7b5a3352d5ed80f10731e022e0f18baece1))
|
|
17
|
+
|
|
18
|
+
## [1.0.0](https://github.com/homestuck/configs/compare/eslint-config@v1.0.0-alpha.3...eslint-config@v1.0.0) (2025-12-09)
|
|
19
|
+
|
|
20
|
+
### Miscellaneous Chores
|
|
21
|
+
|
|
22
|
+
- release 1.0.0 ([291b20c](https://github.com/homestuck/configs/commit/291b20c3b1f9f95ed1e9e3e01ae405d0cc9e692d))
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Homestuck
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/* eslint-disable import/no-named-as-default-member */
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { fileURLToPath } from 'node:url'
|
|
4
|
+
import ESLint from '@eslint/js'
|
|
5
|
+
import TSESLintParser from '@typescript-eslint/parser'
|
|
6
|
+
import ESLintConfigPrettier from 'eslint-config-prettier'
|
|
7
|
+
import ESLintPluginImport from 'eslint-plugin-import'
|
|
8
|
+
import ESLintPluginPerfectionist from 'eslint-plugin-perfectionist'
|
|
9
|
+
import { configs as ESLintPluginRegexpConfigs } from 'eslint-plugin-regexp'
|
|
10
|
+
import ESLintPluginStorybook from 'eslint-plugin-storybook'
|
|
11
|
+
import ESLintPluginTurbo from 'eslint-plugin-turbo'
|
|
12
|
+
import ESLintPluginUnicorn from 'eslint-plugin-unicorn'
|
|
13
|
+
import ESLintPluginUnusedImports from 'eslint-plugin-unused-imports'
|
|
14
|
+
import { defineConfig } from 'eslint/config'
|
|
15
|
+
import globals from 'globals'
|
|
16
|
+
import TSESLint from 'typescript-eslint'
|
|
17
|
+
|
|
18
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
19
|
+
const __dirname = path.dirname(__filename)
|
|
20
|
+
|
|
21
|
+
export const rootEslintConfig = defineConfig(
|
|
22
|
+
{
|
|
23
|
+
ignores: ['**/.next', '**/dist', '**/pnpm-lock.yaml', '**/next-env.d.ts'],
|
|
24
|
+
},
|
|
25
|
+
ESLintPluginTurbo.configs['flat/recommended'],
|
|
26
|
+
ESLint.configs.recommended,
|
|
27
|
+
TSESLint.configs.recommendedTypeChecked,
|
|
28
|
+
TSESLint.configs.strictTypeChecked,
|
|
29
|
+
TSESLint.configs.stylisticTypeChecked,
|
|
30
|
+
ESLintPluginPerfectionist.configs['recommended-natural'],
|
|
31
|
+
ESLintPluginRegexpConfigs['flat/recommended'],
|
|
32
|
+
ESLintPluginUnicorn.configs.recommended,
|
|
33
|
+
ESLintPluginImport.flatConfigs.recommended,
|
|
34
|
+
// @ts-expect-error --- false positive
|
|
35
|
+
ESLintPluginStorybook.configs['flat/recommended'],
|
|
36
|
+
{
|
|
37
|
+
languageOptions: {
|
|
38
|
+
ecmaVersion: 'latest',
|
|
39
|
+
globals: {
|
|
40
|
+
...globals.node,
|
|
41
|
+
},
|
|
42
|
+
parser: TSESLintParser,
|
|
43
|
+
parserOptions: {
|
|
44
|
+
ecmaFeatures: {
|
|
45
|
+
jsx: true,
|
|
46
|
+
},
|
|
47
|
+
projectService: true,
|
|
48
|
+
tsconfigRootDir: __dirname,
|
|
49
|
+
},
|
|
50
|
+
sourceType: 'module',
|
|
51
|
+
},
|
|
52
|
+
linterOptions: {
|
|
53
|
+
reportUnusedDisableDirectives: true,
|
|
54
|
+
},
|
|
55
|
+
name: 'Settings',
|
|
56
|
+
plugins: {
|
|
57
|
+
'unused-imports': ESLintPluginUnusedImports,
|
|
58
|
+
},
|
|
59
|
+
rules: {
|
|
60
|
+
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
|
61
|
+
'import/first': ['error'],
|
|
62
|
+
'import/newline-after-import': ['error'],
|
|
63
|
+
'import/no-duplicates': ['error'],
|
|
64
|
+
'import/no-extraneous-dependencies': ['off'],
|
|
65
|
+
'import/order': ['off'],
|
|
66
|
+
'import/prefer-default-export': ['off'],
|
|
67
|
+
|
|
68
|
+
'no-console': ['warn'],
|
|
69
|
+
'no-unused-vars': ['off'],
|
|
70
|
+
|
|
71
|
+
'perfectionist/sort-enums': ['off'],
|
|
72
|
+
'perfectionist/sort-imports': ['off'],
|
|
73
|
+
'perfectionist/sort-named-imports': ['off'],
|
|
74
|
+
'perfectionist/sort-object-types': [
|
|
75
|
+
'error',
|
|
76
|
+
{
|
|
77
|
+
partitionByComment: true,
|
|
78
|
+
partitionByNewLine: false,
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
|
|
82
|
+
'perfectionist/sort-objects': [
|
|
83
|
+
'error',
|
|
84
|
+
{
|
|
85
|
+
partitionByComment: true,
|
|
86
|
+
partitionByNewLine: false,
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
|
|
90
|
+
'unicorn/better-regex': ['warn'],
|
|
91
|
+
'unicorn/consistent-function-scoping': ['off'],
|
|
92
|
+
'unicorn/filename-case': [
|
|
93
|
+
'error',
|
|
94
|
+
{
|
|
95
|
+
cases: {
|
|
96
|
+
camelCase: true,
|
|
97
|
+
kebabCase: true,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
'unicorn/no-array-reduce': ['off'],
|
|
102
|
+
'unicorn/no-null': ['off'],
|
|
103
|
+
'unicorn/no-useless-undefined': ['off'],
|
|
104
|
+
'unicorn/prevent-abbreviations': ['off'],
|
|
105
|
+
|
|
106
|
+
'unused-imports/no-unused-imports': ['error'],
|
|
107
|
+
},
|
|
108
|
+
settings: {
|
|
109
|
+
'import/extensions': [
|
|
110
|
+
'.ts',
|
|
111
|
+
'.cts',
|
|
112
|
+
'.mts',
|
|
113
|
+
'.tsx',
|
|
114
|
+
'.js',
|
|
115
|
+
'.jsx',
|
|
116
|
+
'.mjs',
|
|
117
|
+
'.cjs',
|
|
118
|
+
],
|
|
119
|
+
'import/resolver': {
|
|
120
|
+
node: {
|
|
121
|
+
extensions: [
|
|
122
|
+
'.ts',
|
|
123
|
+
'.cts',
|
|
124
|
+
'.mts',
|
|
125
|
+
'.tsx',
|
|
126
|
+
'.js',
|
|
127
|
+
'.jsx',
|
|
128
|
+
'.mjs',
|
|
129
|
+
'.cjs',
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
typescript: true,
|
|
133
|
+
},
|
|
134
|
+
react: {
|
|
135
|
+
defaultVersion: '19',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
141
|
+
name: 'TypeScript Settings',
|
|
142
|
+
rules: {
|
|
143
|
+
'@typescript-eslint/consistent-type-definitions': ['warn', 'type'],
|
|
144
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
145
|
+
'error',
|
|
146
|
+
{ fixStyle: 'inline-type-imports', prefer: 'type-imports' },
|
|
147
|
+
],
|
|
148
|
+
'@typescript-eslint/no-empty-function': ['warn'],
|
|
149
|
+
'@typescript-eslint/no-explicit-any': ['error'],
|
|
150
|
+
'@typescript-eslint/no-misused-promises': [
|
|
151
|
+
2,
|
|
152
|
+
{ checksVoidReturn: { attributes: false } },
|
|
153
|
+
],
|
|
154
|
+
'@typescript-eslint/no-unused-vars': [
|
|
155
|
+
'error',
|
|
156
|
+
{
|
|
157
|
+
argsIgnorePattern: '^_',
|
|
158
|
+
varsIgnorePattern: '^_',
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
'@typescript-eslint/no-use-before-define': [
|
|
162
|
+
'error',
|
|
163
|
+
{ classes: false, functions: false },
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
ESLintConfigPrettier,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
export default rootEslintConfig
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@homestuck/eslint-config",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Baseline eslint configs used and maintained by Homestuck Inc., et al.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/homestuck/configs.git",
|
|
9
|
+
"directory": "packages/eslint"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "Homestuck <support@homestuck.com> (https://homestuck.com)",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./eslint.config.mjs",
|
|
17
|
+
"import": "./eslint.config.mjs",
|
|
18
|
+
"node": "./eslint.config.mjs",
|
|
19
|
+
"require": "./eslint.config.mjs",
|
|
20
|
+
"default": "./eslint.config.mjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"main": "./eslint.config.mjs",
|
|
24
|
+
"prettier": "@homestuck/prettier-config",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@eslint/eslintrc": "3.3.3",
|
|
27
|
+
"@eslint/js": "9.39.1",
|
|
28
|
+
"@next/eslint-plugin-next": "16.0.7",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "8.49.0",
|
|
30
|
+
"@typescript-eslint/parser": "8.49.0",
|
|
31
|
+
"eslint-config-prettier": "10.1.8",
|
|
32
|
+
"eslint-import-resolver-alias": "1.1.2",
|
|
33
|
+
"eslint-import-resolver-typescript": "4.4.4",
|
|
34
|
+
"eslint-plugin-import": "2.32.0",
|
|
35
|
+
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
36
|
+
"eslint-plugin-perfectionist": "4.15.1",
|
|
37
|
+
"eslint-plugin-react": "7.37.5",
|
|
38
|
+
"eslint-plugin-react-hooks": "7.0.1",
|
|
39
|
+
"eslint-plugin-react-you-might-not-need-an-effect": "0.7.0",
|
|
40
|
+
"eslint-plugin-regexp": "2.10.0",
|
|
41
|
+
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
42
|
+
"eslint-plugin-storybook": "10.1.4",
|
|
43
|
+
"eslint-plugin-turbo": "2.6.3",
|
|
44
|
+
"eslint-plugin-unicorn": "62.0.0",
|
|
45
|
+
"eslint-plugin-unused-imports": "4.3.0",
|
|
46
|
+
"typescript-eslint": "8.49.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/eslint": "9.6.1",
|
|
50
|
+
"@types/node": "24.10.1",
|
|
51
|
+
"eslint": "9.39.1",
|
|
52
|
+
"globals": "16.5.0",
|
|
53
|
+
"prettier": "3.7.4",
|
|
54
|
+
"@homestuck/prettier-config": "1.0.1",
|
|
55
|
+
"@homestuck/tsconfig": "1.0.1"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"clean": "rm -rf .turbo node_modules",
|
|
59
|
+
"format": "prettier --check . --ignore-path ../../.gitignore --ignore-path ./.prettierignore",
|
|
60
|
+
"lint": "eslint .",
|
|
61
|
+
"typecheck": "tsc --noEmit"
|
|
62
|
+
}
|
|
63
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": ".",
|
|
4
|
+
"paths": {
|
|
5
|
+
"@homestuck/eslint-config": ["eslint.config.mjs"]
|
|
6
|
+
},
|
|
7
|
+
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
|
|
8
|
+
"types": ["node"]
|
|
9
|
+
},
|
|
10
|
+
"exclude": ["node_modules"],
|
|
11
|
+
"extends": "@homestuck/tsconfig/base.json",
|
|
12
|
+
"include": ["."]
|
|
13
|
+
}
|