Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI ESLint #42184

Merged
merged 25 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
af4bb66
🚨 new ESLint rules and configuration.
loucyx Sep 11, 2024
6cffb64
🚨 fix all linting errors.
loucyx Sep 11, 2024
cb01ed5
🚚 fix component casing.
loucyx Sep 12, 2024
cf29ca2
🔧 add new import sorting for prettier.
loucyx Sep 12, 2024
5e48aff
🚨 apply new sorting of imports.
loucyx Sep 12, 2024
290a860
🔧 add missing `noUncheckedIndexedAccess` setting to avoid potential m…
loucyx Sep 12, 2024
0ef4c2d
📄 add license to `prettier.config.js`
loucyx Sep 12, 2024
960e084
🎨 format code examples to use spaces instead of tabs.
loucyx Sep 12, 2024
3a4d2d6
🎨 format openapi-gen files.
loucyx Sep 12, 2024
0454147
🔧 exclude `pnpm-lock.yaml` from adding a license.
loucyx Sep 12, 2024
d5865a3
🔧 add ignore of `pnpm-lock.yaml` in more places.
loucyx Sep 12, 2024
002ebe0
🔧 add `.vscode/settings.json`
loucyx Sep 12, 2024
4437852
🔧 add `*.tsbuildinfo` to `.gitignore`.
loucyx Sep 13, 2024
aee0ce8
🔧 revert `.vscode` files ignore in gitignore.
loucyx Sep 13, 2024
142a435
⏪ revert formatting in .pre-commit-config.yaml
loucyx Sep 13, 2024
ae3d023
Merge branch 'main' into ui-eslint
loucyx Sep 13, 2024
9e4c928
🚚 change casing of files to match main.
loucyx Sep 13, 2024
faeb43c
Merge branch 'main' into ui-eslint
loucyx Sep 13, 2024
bad87b6
🔀 fix main merge issues -_-
loucyx Sep 13, 2024
64d0502
🚚 fix incorrect main file casing change.
loucyx Sep 13, 2024
04c0aec
🔥 delete duplicated files that were moved in main.
loucyx Sep 13, 2024
8acdf92
🎨 add missing space in pre-commit-config
loucyx Sep 13, 2024
998833c
✏️ fix pnpm-lock.yaml
loucyx Sep 13, 2024
c3785f2
🔧 fix dist ignoring.
loucyx Sep 16, 2024
dc91558
🤔 Lint and fox vite.config.ts.
loucyx Sep 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ ENV/
.idea/
*.iml

# Visual Studio Code
.vscode/

# vim
*.swp

Expand Down
11 changes: 0 additions & 11 deletions airflow/ui/.prettierrc

This file was deleted.

59 changes: 25 additions & 34 deletions airflow/ui/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,29 @@
* under the License.
*/

import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";
import pluginPrettier from "eslint-plugin-prettier";
import pluginReact from "eslint-plugin-react";
/**
* @import { FlatConfig } from "@typescript-eslint/utils/ts-eslint";
*/
import { coreRules } from "./rules/core.js";
import { perfectionistRules } from "./rules/perfectionist.js";
import { prettierRules } from "./rules/prettier.js";
import { reactRules } from "./rules/react.js";
import { stylisticRules } from "./rules/stylistic.js";
import { typescriptRules } from "./rules/typescript.js";
import { unicornRules } from "./rules/unicorn.js";

export default tseslint.config(
{ ignores: ["dist", "openapi-gen"] },
{
extends: [
js.configs.recommended,
...tseslint.configs.recommended,
pluginReact.recommended,
pluginPrettier.recommended,
],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
}
);
/**
* ESLint configuration.
* @see [ESLint configuration](https://eslint.org/docs/latest/use/configure/)
*/
export default /** @type {const} @satisfies {ReadonlyArray<FlatConfig.Config>} */ ([
// Base rules
coreRules,
typescriptRules,
// Da rest
perfectionistRules,
prettierRules,
reactRules,
stylisticRules,
unicornRules,
]);
27 changes: 16 additions & 11 deletions airflow/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint . && tsc --p tsconfig.app.json",
"lint": "eslint --quiet && tsc --p tsconfig.app.json",
"lint:fix": "eslint --fix && tsc --p tsconfig.app.json",
"format": "pnpm prettier --write .",
"preview": "vite preview",
Expand All @@ -21,7 +21,7 @@
"@emotion/styled": "^11.13.0",
"@tanstack/react-query": "^5.52.1",
"@tanstack/react-table": "^8.20.1",
"axios": "^1.7.4",
"axios": "^1.7.7",
"chakra-react-select": "^4.9.2",
"framer-motion": "^11.3.29",
"react": "^18.3.1",
Expand All @@ -31,25 +31,30 @@
},
"devDependencies": {
"@7nohe/openapi-react-query-codegen": "^1.6.0",
"@eslint/js": "^9.9.0",
"@eslint/js": "^9.10.0",
"@stylistic/eslint-plugin": "^2.8.0",
"@tanstack/eslint-plugin-query": "^5.52.0",
"@testing-library/jest-dom": "^6.4.8",
"@testing-library/react": "^16.0.0",
"@types/react": "^18.3.3",
"@types/node": "^22.5.4",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"eslint": "^9.9.0",
"eslint": "^9.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-perfectionist": "^3.5.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"eslint-plugin-react": "^7.35.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.11",
"eslint-plugin-unicorn": "^55.0.0",
"globals": "^15.9.0",
"happy-dom": "^15.0.0",
"prettier": "^3.3.3",
"typescript": "^5.5.3",
"typescript-eslint": "^8.2.0",
"vite": "^5.4.1",
"typescript": "^5.6.2",
"typescript-eslint": "^8.5.0",
"vite": "^5.4.4",
"vitest": "^2.0.5"
}
}
Loading
Loading