Skip to content

Commit

Permalink
Add prettier to check formatting during CI linting (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDevMinerTV authored Feb 26, 2023
1 parent 8efbb90 commit 69c175c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 99 deletions.
9 changes: 2 additions & 7 deletions gui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
"es2021": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
Expand All @@ -17,7 +13,7 @@
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react-hooks", "@typescript-eslint", "prettier"],
"plugins": ["react-hooks", "@typescript-eslint"],
"rules": {
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
Expand All @@ -27,7 +23,6 @@
"no-inline-styles": "off",
"@typescript-eslint/no-explicit-any": "off",
"react/no-unescaped-entities": "off",
"prettier/prettier": "warn",
"camelcase": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
Expand Down
4 changes: 1 addition & 3 deletions gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"dev": "tauri dev",
"skipbundler": "tauri build -b none",
"tauri": "tauri",
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx,json}\"",
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx,json}\" && prettier --check \"src/**/*.{js,jsx,ts,tsx,css,md,json}\"",
"lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx,json}\"",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,md,json}\"",
"preview-vite": "vite preview",
Expand Down Expand Up @@ -73,11 +73,9 @@
"cross-env": "^7.0.3",
"eslint": "^8.18.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.1.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-prettier": "^4.1.0",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.12",
Expand Down
2 changes: 1 addition & 1 deletion gui/src/components/onboarding/pages/ConnectTracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
StartWifiProvisioningRequestT,
StopWifiProvisioningRequestT,
WifiProvisioningStatus,
WifiProvisioningStatusResponseT
WifiProvisioningStatusResponseT,
} from 'solarxr-protocol';
import { useLayout } from '../../../hooks/layout';
import { useOnboarding } from '../../../hooks/onboarding';
Expand Down
2 changes: 1 addition & 1 deletion gui/src/components/tracker/TrackersTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MouseEventHandler, ReactNode, useMemo, useState } from 'react';
import {
TrackerDataT,
TrackerIdT,
TrackerStatus as TrackerStatusEnum
TrackerStatus as TrackerStatusEnum,
} from 'solarxr-protocol';
import { FlatDeviceTracker } from '../../hooks/app';
import { useConfig } from '../../hooks/config';
Expand Down
2 changes: 1 addition & 1 deletion gui/src/components/widgets/OverlayWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { KeyValuesT, MessageT, Payload, Topic } from 'solarxr-protocol';
import {
OVERLAY_DISPLAY_SETTINGS_TOPIC,
PayloadData,
usePubSub
usePubSub,
} from '../../hooks/pubSub';
import { CheckBox } from '../commons/Checkbox';
import { Typography } from '../commons/Typography';
Expand Down
86 changes: 0 additions & 86 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 69c175c

Please sign in to comment.