Skip to content

Commit

Permalink
fix: Resolve trailing whitespace issue
Browse files Browse the repository at this point in the history
  • Loading branch information
freshavocado7 committed Sep 26, 2024
1 parent e38e743 commit e2bb35a
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
15 changes: 10 additions & 5 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,25 @@ module.exports = {
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'plugin:storybook/recommended'
'plugin:storybook/recommended',
'prettier'
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
settings: {
react: {
version: '18.2'
}
},
plugins: ['react-refresh', 'prettier'],
rules: {
'react/jsx-no-target-blank': 'off',
'react/prop-types': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true }
],
'max-len': ['error', { code: 100 }],
'react/no-unescaped-entities': 'off'
'max-len': ['error', { code: 100, ignoreUrls: true, ignoreStrings: true }],
'prettier/prettier': ['error']
}
};
2 changes: 2 additions & 0 deletions frontend/.prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ module.exports = {
singleQuote: true,
trailingComma: 'none',
bracketSameLine: true,
endOfLine: 'lf',
useTabs: false,
endingPosition: 'absolute-with-indent'
};
4 changes: 0 additions & 4 deletions frontend/src/components/ModelDiff.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@ export const ModelDiff = ({ onRefetch, hasDiffed }) => {
<p className="font-semibold text-red-500">
Cannot generate model diff: {error}
</p>
<p>
Select 'Deep clone' before running the session or run
model within git repo.
</p>
</div>
) : (
<>
Expand Down
13 changes: 6 additions & 7 deletions frontend/src/components/TemplateDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,19 @@ export const TemplateDetails = ({ endpoint, onSingleInstance }) => {
}}
className={`${
objectID && object.idx === objectID
? `w-full bg-custom-blue text-white dark:bg-custom-blue
dark:text-gray-100`
: `w-full bg-gray-200 text-gray-900
dark:bg-custom-dark-4`
? `w-full bg-custom-blue text-white
dark:bg-custom-blue ` + 'dark:text-gray-100'
: 'w-full bg-gray-200 text-gray-900 ' +
'dark:bg-custom-dark-4'
} dark:bg-dark-quaternary m-2 min-w-0 cursor-pointer
rounded-lg shadow-md hover:bg-custom-blue
hover:text-white dark:border-gray-700 dark:shadow-dark
dark:hover:bg-blue-500`}>
<div className="p-2">
<h5
className={`text-md break-words font-bold
dark:text-gray-100 ${
objectID && object.idx === objectID ? '' : '' }`}>
dark:text-gray-100
${objectID && object.idx === objectID ? '' : ''}`}>
{object.name}
</h5>
</div>
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/WiredTemplatesList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ export const WiredTemplatesList = () => {
if (error) {
return (
<div
className={`rounded bg-red-500 p-4 text-2xl text-white
dark:bg-custom-dark-error`}>
className={
'rounded bg-red-500 p-4 text-2xl text-white dark:bg-custom-dark-error'
}>
{error === 'Failed to fetch'
? `Can't connect to the server. Maybe your session was inactive for
too long? If that's the case, request a new session / restart the app.`
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/ModelComparisonView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ export const ModelComparisonView = ({ endpoint }) => {
)}
</div>
<div
className={`flex-1 overflow-y-hidden ${
isSmallScreen ? (isSidebarVisible ? 'pl-96' : '') : 'pl-96' }`}>
className={`flex-1 overflow-y-hidden
${isSmallScreen ? (isSidebarVisible ? 'pl-96' : '') : 'pl-96'}`}>
<div className="relative flex flex-1">
{objectID && <DiffView objectID={objectID} endpoint={endpoint} />}
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/TemplateView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export const TemplateView = ({ endpoint }) => {
<p
className={`absolute left-1/2 top-1/2 -translate-x-1/2
-translate-y-1/2 transform text-xl text-gray-700
dark:text-gray-300 ${
isSidebarVisible && isSmallScreen ? 'hidden' : '' }`}>
dark:text-gray-300
${isSidebarVisible && isSmallScreen ? 'hidden' : ''}`}>
Select an Instance
</p>
)}
Expand Down

0 comments on commit e2bb35a

Please sign in to comment.