Skip to content

Commit

Permalink
feat(frontend): Update ESLint and Prettier config (#490)
Browse files Browse the repository at this point in the history
* add 2024 sponsor logos

* add tailwind prettier plugin

* update eslint-plugin-prettier to compatible version

* format and lint code

* update eslint config

* remove grouped tailwind psuedo-classes

* format tailwind classes

* set prettier config options

* format according to prettier config

* format tw macros via Tailwind functions config
  • Loading branch information
JoshCLim authored Oct 7, 2024
1 parent c107963 commit 4f8aafe
Show file tree
Hide file tree
Showing 46 changed files with 1,258 additions and 9,941 deletions.
62 changes: 35 additions & 27 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
"plugin:import/typescript",
"plugin:react/jsx-runtime"
],
"ignorePatterns": [
"babel-plugin-macros.config.js",
"tailwind.config.js",
"prettier.config.js",
"postcss.config.js",
"vite.config.ts"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
Expand All @@ -32,42 +39,43 @@
"@typescript-eslint/no-shadow": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
1,
"warn",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},
"error",
{
"selector": "default",
"format": ["camelCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},

{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},

{
"selector": "function",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "function",
"format": ["camelCase", "PascalCase"]
},

{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "typeLike",
"format": ["PascalCase"],
"leadingUnderscore": "allow"
},

{
"selector": "objectLiteralProperty",
"format": null
}
{
"selector": "objectLiteralProperty",
"format": null
}
],
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
Expand Down Expand Up @@ -103,7 +111,7 @@
"custom": "ignore"
}
],
"react/no-unknown-property": [2, { "ignore": ["tw", "css"] }],
"react/no-unknown-property": ["error", { "ignore": ["tw", "css"] }],
"react/require-default-props": "off",
"@typescript-eslint/consistent-type-imports": "error",
"no-void": "off",
Expand Down
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
Loading

0 comments on commit 4f8aafe

Please sign in to comment.