Skip to content
Snippets Groups Projects
Unverified Commit 0782081f authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

Merge pull request #415 from MatissJanis/matiss/eslint

chore: fix eslint issues and make warnings CI blocking
parents 1816e914 9c1d68c1
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@ module.exports = {
extends: ['react-app'],
rules: {
'prettier/prettier': 'error',
'no-unused-vars': 'off',
'no-loop-func': 'off',
'no-restricted-globals': 'off',
......
......@@ -29,7 +29,7 @@
"test:debug": "yarn workspaces foreach --verbose run test",
"rebuild-electron": "./node_modules/.bin/electron-rebuild -f -m ./packages/loot-core",
"rebuild-node": "yarn workspace loot-core rebuild",
"lint": "yarn workspaces foreach --verbose run lint",
"lint": "yarn workspaces foreach --verbose run lint --max-warnings 0",
"postinstall": "rm -rf ./packages/loot-design/node_modules/react && rm -rf ./packages/mobile/node_modules/react && rm -rf ./node_modules/react-native && patch-package"
},
"devDependencies": {
......
......@@ -140,6 +140,10 @@ class Tutorial extends React.Component {
);
case 'budget-next-month':
return <div>hi</div>;
default:
throw new Error(
`Encountered an unexpected error rendering the tutorial content for ${stage}`
);
}
}
......@@ -213,6 +217,8 @@ class Tutorial extends React.Component {
navigationProps={navigationProps}
/>
);
default:
// Default case defined below (outside the switch statement)
}
const { node: targetNode, expand } = this.context.getTutorialNode(stage);
......@@ -244,7 +250,6 @@ class Tutorial extends React.Component {
<path
fill="rgba(0, 0, 0, .2)"
fill-rule="evenodd"
// prettier-ignore
d={generatePath(targetRect, windowRect)}
style={{ pointerEvents: 'fill' }}
/>
......
......@@ -10,8 +10,12 @@ function Final({ targetRect, navigationProps }) {
<Title>That's it!</Title>
<P>
With that workflow you can have peace of mind that what you are looking
at reflects reality. &#128524; The amount of money in a category is cash
that you can safely spend right now.
at reflects reality.{' '}
<span role="img" aria-label="Relieved smile" aria-hidden="true">
&#128524;
</span>{' '}
The amount of money in a category is cash that you can safely spend
right now.
</P>
<P>
......
......@@ -15,7 +15,10 @@ function Intro({ fromYNAB, nextTutorialStage, closeTutorial }) {
<Standalone width={500}>
<Title>Let's get started</Title>
<P>
Welcome to Actual! &#127881;{' '}
Welcome to Actual!{' '}
<span role="img" aria-label="Party" aria-hidden="true">
&#127881;
</span>{' '}
<strong>Learn the basic workflow with this quick tutorial.</strong> You
can always restart it from the File menu.
</P>
......
......@@ -2,9 +2,7 @@ const { ipcRenderer } = require('electron');
const root = document.querySelector('#root');
const { version: appVersion } = ipcRenderer.sendSync(
'get-bootstrap-data'
);
const { version: appVersion } = ipcRenderer.sendSync('get-bootstrap-data');
const iconPath = __dirname + '/../icons/icon.png';
......@@ -85,9 +83,7 @@ ipcRenderer.on('update-error', (event, msg) => {
text = 'Error updating the app. Please try again later.';
}
// prettier-ignore
errorEl.innerHTML =
`<div style="text-align:center; color:#F65151">${text}</div>`;
errorEl.innerHTML = `<div style="text-align:center; color:#F65151">${text}</div>`;
errorEl.style.display = 'block';
});
......
......@@ -162,7 +162,6 @@ function transformContents(name, contents, isReactNative) {
return null;
}
// prettier-ignore
const reactNativeImport = `
import {${reactNativeTags.join(', ')}} from 'mobile/node_modules/react-native-svg'
`;
......
diff --git a/node_modules/eslint-config-react-app/index.js b/node_modules/eslint-config-react-app/index.js
index ca232b8..2d88066 100644
--- a/node_modules/eslint-config-react-app/index.js
+++ b/node_modules/eslint-config-react-app/index.js
@@ -126,13 +126,6 @@ module.exports = {
},
],
'no-unused-labels': 'warn',
- 'no-unused-vars': [
- 'warn',
- {
- args: 'none',
- ignoreRestSiblings: true,
- },
- ],
'no-use-before-define': [
'warn',
{
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment