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

Chaos 518 frontend ci git actions #519

Open
wants to merge 16 commits into
base: CHAOS-511-react-query-migration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint

on: [push]

jobs:
eslint:
name: linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install packages
working-directory: frontend
run: yarn install

- name: Run Prettier
working-directory: frontend
run: yarn prettier . --check

- name: Run EsLint
working-directory: frontend
run: yarn lint

- name: Run tsc
working-directory: frontend
run: tsc src/*.ts
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
Loading