chore: add shared ESLint and Prettier configuration
Closes #615 - Add @probo/eslint-config package with ESLint 9.x flat config - Enhance @probo/prettier with aligned stylistic rules - Migrate console, trust, and UI packages to shared config - Remove duplicate ESLint dependencies from individual packages Signed-off-by: Yash Gupta <yash3144@gmail.com>
This commit is contained in:
@@ -1,28 +1,6 @@
|
||||
// @ts-check
|
||||
import { browser } from "@probo/eslint-config";
|
||||
|
||||
import js from "@eslint/js";
|
||||
import { defineConfig } from "eslint/config";
|
||||
import globals from "globals";
|
||||
import reactHooks from "eslint-plugin-react-hooks";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default defineConfig([
|
||||
{ ignores: ["dist"] },
|
||||
{
|
||||
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
||||
files: ["**/*.{ts,tsx}"],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
parserOptions: {
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
"react-hooks": reactHooks,
|
||||
},
|
||||
rules: {
|
||||
...reactHooks.configs.recommended.rules,
|
||||
},
|
||||
},
|
||||
]);
|
||||
export default [
|
||||
{ ignores: ["dist", "eslint.config.mjs", "*.config.{js,mjs,ts}"] },
|
||||
...browser(["./tsconfig.app.json", "./tsconfig.node.json"], import.meta.dirname),
|
||||
];
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
"zod": "^3.25.17"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.25.0",
|
||||
"@probo/eslint-config": "1.0.0",
|
||||
"@probo/prettier": "1.0.0",
|
||||
"@tailwindcss/vite": "^4.1.7",
|
||||
"@types/node": "^22.15.21",
|
||||
"@types/react": "^19.1.2",
|
||||
@@ -50,14 +51,13 @@
|
||||
"@vitejs/plugin-react": "^4.4.1",
|
||||
"babel-plugin-relay": "^19.0.0",
|
||||
"eslint": "^9.25.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"globals": "^16.0.0",
|
||||
"graphql": "^16.11.0",
|
||||
"prettier": "^3.5.3",
|
||||
"relay-compiler": "^19.0.0",
|
||||
"tailwindcss": "^4.1.7",
|
||||
"typescript": "~5.8.3",
|
||||
"typescript-eslint": "^8.30.1",
|
||||
"vite": "^6.4.1"
|
||||
}
|
||||
},
|
||||
"prettier": "@probo/prettier"
|
||||
}
|
||||
|
||||
@@ -1,27 +1,6 @@
|
||||
// @ts-check
|
||||
import { browser } from "@probo/eslint-config";
|
||||
|
||||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import reactHooks from "eslint-plugin-react-hooks";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: ["dist"] },
|
||||
{
|
||||
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
||||
files: ["**/*.{ts,tsx}"],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
parserOptions: {
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
"react-hooks": reactHooks,
|
||||
},
|
||||
rules: {
|
||||
...reactHooks.configs.recommended.rules,
|
||||
},
|
||||
}
|
||||
);
|
||||
export default [
|
||||
{ ignores: ["dist", "eslint.config.mjs", "*.config.{js,mjs,ts}"] },
|
||||
...browser(["./tsconfig.app.json", "./tsconfig.node.json"], import.meta.dirname),
|
||||
];
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
"zod": "^3.25.71"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.25.0",
|
||||
"@probo/eslint-config": "1.0.0",
|
||||
"@probo/prettier": "1.0.0",
|
||||
"@tailwindcss/vite": "^4.1.7",
|
||||
"@types/node": "^22.15.21",
|
||||
"@types/react": "^19.1.2",
|
||||
@@ -41,16 +42,14 @@
|
||||
"@vitejs/plugin-react": "^4.4.1",
|
||||
"babel-plugin-relay": "^19.0.0",
|
||||
"eslint": "^9.25.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"globals": "^16.0.0",
|
||||
"graphql": "^16.11.0",
|
||||
"prettier": "^3.5.3",
|
||||
"relay-compiler": "^19.0.0",
|
||||
"tailwindcss": "^4.1.7",
|
||||
"typescript": "~5.8.3",
|
||||
"typescript-eslint": "^8.30.1",
|
||||
"vite": "^6.4.1"
|
||||
},
|
||||
"prettier": "@probo/prettier",
|
||||
"volta": {
|
||||
"node": "24.4.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user