Skip to content

Commit 552a36c

Browse files
tomast1337Bentroen
authored andcommitted
chore: remove @stylistic/eslint-plugin from devDependencies and update ESLint configuration for improved rule management
1 parent c9ffc37 commit 552a36c

File tree

2 files changed

+114
-67
lines changed

2 files changed

+114
-67
lines changed

bun.lock

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4203,6 +4203,34 @@
42034203

42044204
"terser-webpack-plugin/schema-utils/ajv-keywords": ["[email protected]", "", { "dependencies": { "fast-deep-equal": "^3.1.3" }, "peerDependencies": { "ajv": "^8.8.2" } }, "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw=="],
42054205

4206+
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "@typescript-eslint/visitor-keys": "8.44.1" } }, "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg=="],
4207+
4208+
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/type-utils": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "@typescript-eslint/typescript-estree": "8.44.1", "@typescript-eslint/utils": "8.44.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-KdEerZqHWXsRNKjF9NYswNISnFzXfXNDfPxoTh7tqohU/PRIbwTmsjGK6V9/RTYWau7NZvfo52lgVk+sJh0K3g=="],
4209+
4210+
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/visitor-keys": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "eslint-visitor-keys": "^4.2.1" } }, "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw=="],
4211+
4212+
"typescript-eslint/@typescript-eslint/parser/@typescript-eslint/scope-manager": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "@typescript-eslint/visitor-keys": "8.44.1" } }, "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg=="],
4213+
4214+
"typescript-eslint/@typescript-eslint/parser/@typescript-eslint/types": ["@typescript-eslint/[email protected]", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="],
4215+
4216+
"typescript-eslint/@typescript-eslint/parser/@typescript-eslint/visitor-keys": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "eslint-visitor-keys": "^4.2.1" } }, "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw=="],
4217+
4218+
"typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/project-service": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.44.1", "@typescript-eslint/types": "^8.44.1", "debug": "^4.3.4" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-ycSa60eGg8GWAkVsKV4E6Nz33h+HjTXbsDT4FILyL8Obk5/mx4tbvCNsLf9zret3ipSumAOG89UcCs/KRaKYrA=="],
4219+
4220+
"typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/tsconfig-utils": ["@typescript-eslint/[email protected]", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-B5OyACouEjuIvof3o86lRMvyDsFwZm+4fBOqFHccIctYgBjqR3qT39FBYGN87khcgf0ExpdCBeGKpKRhSFTjKQ=="],
4221+
4222+
"typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/types": ["@typescript-eslint/[email protected]", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="],
4223+
4224+
"typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "eslint-visitor-keys": "^4.2.1" } }, "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw=="],
4225+
4226+
"typescript-eslint/@typescript-eslint/typescript-estree/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
4227+
4228+
"typescript-eslint/@typescript-eslint/typescript-estree/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
4229+
4230+
"typescript-eslint/@typescript-eslint/utils/@typescript-eslint/scope-manager": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "@typescript-eslint/visitor-keys": "8.44.1" } }, "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg=="],
4231+
4232+
"typescript-eslint/@typescript-eslint/utils/@typescript-eslint/types": ["@typescript-eslint/[email protected]", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="],
4233+
42064234
"unified-engine/@types/node/undici-types": ["[email protected]", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="],
42074235

42084236
"unified-engine/concat-stream/readable-stream": ["[email protected]", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
@@ -4339,6 +4367,16 @@
43394367

43404368
"terser-webpack-plugin/schema-utils/ajv/json-schema-traverse": ["[email protected]", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="],
43414369

4370+
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager/@typescript-eslint/types": ["@typescript-eslint/[email protected]", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="],
4371+
4372+
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/type-utils/@typescript-eslint/types": ["@typescript-eslint/[email protected]", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="],
4373+
4374+
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/visitor-keys/@typescript-eslint/types": ["@typescript-eslint/[email protected]", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="],
4375+
4376+
"typescript-eslint/@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
4377+
4378+
"typescript-eslint/@typescript-eslint/utils/@typescript-eslint/scope-manager/@typescript-eslint/visitor-keys": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "eslint-visitor-keys": "^4.2.1" } }, "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw=="],
4379+
43424380
"vfile-reporter/string-width/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
43434381

43444382
"web-resource-inliner/htmlparser2/domutils/dom-serializer": ["[email protected]", "", { "dependencies": { "domelementtype": "^2.0.1", "domhandler": "^4.2.0", "entities": "^2.0.0" } }, "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag=="],

eslint.config.js

Lines changed: 76 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import js from '@eslint/js';
2-
import tseslint from '@typescript-eslint/eslint-plugin';
32
import tsparser from '@typescript-eslint/parser';
4-
import prettierConfig from 'eslint-config-prettier';
5-
import prettierPlugin from 'eslint-plugin-prettier';
3+
import tseslint from '@typescript-eslint/eslint-plugin';
64
import globals from 'globals';
5+
import importPlugin from 'eslint-plugin-import';
6+
import react from 'eslint-plugin-react';
77

8-
export default [
9-
// Base JavaScript configuration
10-
js.configs.recommended,
11-
12-
// Global ignore patterns
8+
export default tseslint.config(
9+
// Global ignores (no changes here)
1310
{
1411
ignores: [
1512
'**/node_modules/**',
@@ -26,86 +23,98 @@ export default [
2623
],
2724
},
2825

29-
// Universal TypeScript configuration for the entire monorepo
26+
// Base recommended configurations
27+
js.configs.recommended,
28+
...tseslint.configs.recommended,
29+
30+
// Main configuration object
3031
{
3132
files: ['**/*.ts', '**/*.tsx'],
3233
languageOptions: {
3334
parser: tsparser,
34-
parserOptions: {
35-
ecmaVersion: 2021,
36-
sourceType: 'module',
37-
// Don't use project-based parsing to avoid config issues
38-
ecmaFeatures: {
39-
jsx: true,
40-
},
41-
},
42-
globals: {
43-
// Universal globals that work everywhere
44-
...globals.node,
45-
...globals.browser,
46-
...globals.es2021,
47-
console: 'readonly',
48-
process: 'readonly',
49-
Buffer: 'readonly',
50-
__dirname: 'readonly',
51-
__filename: 'readonly',
52-
global: 'readonly',
53-
React: 'readonly',
54-
JSX: 'readonly',
55-
},
35+
globals: { ...globals.node, ...globals.es2021, ...globals.bun },
5636
},
5737
plugins: {
58-
'@typescript-eslint': tseslint,
59-
prettier: prettierPlugin,
38+
import: importPlugin,
39+
},
40+
settings: {
41+
'import/resolver': {
42+
typescript: {
43+
project: [
44+
'apps/*/tsconfig.json',
45+
'packages/*/tsconfig.json',
46+
'./tsconfig.json',
47+
],
48+
},
49+
node: true,
50+
},
51+
'import/core-modules': ['bun:test', 'bun:sqlite', 'bun'],
6052
},
6153
rules: {
62-
// Turn off rules that conflict with TypeScript
63-
'no-undef': 'off', // TypeScript handles this
64-
'no-unused-vars': 'off', // Use TypeScript version instead
65-
'no-redeclare': 'off', // TypeScript handles this better
66-
67-
// Turn off rules that don't exist or cause issues
68-
'react-hooks/exhaustive-deps': 'off',
69-
'@next/next/no-sync-scripts': 'off',
70-
'no-shadow-restricted-names': 'off',
54+
...importPlugin.configs.recommended.rules,
55+
...importPlugin.configs.typescript.rules,
7156

72-
// TypeScript specific rules - simplified and lenient
57+
// Core and TypeScript rules
58+
'no-console': 'warn',
59+
'@typescript-eslint/no-explicit-any': 'warn',
60+
'@typescript-eslint/no-require-imports': 'warn',
61+
'@typescript-eslint/ban-ts-comment': 'warn',
7362
'@typescript-eslint/no-unused-vars': [
7463
'warn',
7564
{
76-
argsIgnorePattern: '^_',
65+
vars: 'all',
7766
varsIgnorePattern: '^_',
78-
caughtErrorsIgnorePattern: '^_',
79-
ignoreRestSiblings: true,
67+
args: 'after-used',
68+
argsIgnorePattern: '^_',
8069
},
8170
],
82-
'@typescript-eslint/no-explicit-any': 'off',
83-
'@typescript-eslint/explicit-function-return-type': 'off',
84-
'@typescript-eslint/explicit-module-boundary-types': 'off',
85-
'@typescript-eslint/no-inferrable-types': 'off',
86-
87-
// Prettier integration
88-
'prettier/prettier': [
71+
'lines-between-class-members': [
8972
'warn',
73+
'always',
74+
{ exceptAfterSingleLine: true },
75+
],
76+
77+
// Import rules
78+
'import/order': [
79+
'error',
9080
{
91-
endOfLine: 'auto',
92-
trailingComma: 'all',
81+
groups: [
82+
'builtin',
83+
'external',
84+
'internal',
85+
'parent',
86+
'sibling',
87+
'index',
88+
'object',
89+
'unknown',
90+
],
91+
pathGroups: [{ pattern: '@/**', group: 'internal' }],
92+
pathGroupsExcludedImportTypes: ['builtin'],
93+
'newlines-between': 'always',
94+
alphabetize: { order: 'asc', caseInsensitive: true },
9395
},
9496
],
97+
'import/newline-after-import': 'error',
98+
'import/no-duplicates': 'error',
99+
},
100+
},
95101

96-
// Relaxed rules for monorepo compatibility
97-
'no-console': 'off',
98-
'prefer-const': 'warn',
99-
'no-constant-condition': 'warn',
100-
'no-constant-binary-expression': 'warn',
102+
// React specific configuration
103+
{
104+
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
105+
plugins: {
106+
react,
107+
},
108+
rules: {
109+
...react.configs.recommended.rules,
110+
'react/react-in-jsx-scope': 'off',
111+
'react/no-unknown-property': [
112+
'error',
113+
{ ignore: ['custom-prop', 'cmdk-input-wrapper', 'cmdk-group-heading'] },
114+
],
101115
},
102116
settings: {
103-
react: {
104-
version: 'detect',
105-
},
117+
react: { version: 'detect' },
106118
},
107119
},
108-
109-
// Prettier config (must be last to override conflicting rules)
110-
prettierConfig,
111-
];
120+
);

0 commit comments

Comments
 (0)