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

fix(frontend): fix eslint config and enable it in CI #1681

Merged
merged 3 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
fix(frontend): fix eslint config and enable it in CI
  • Loading branch information
jorgeepc committed Dec 13, 2022
commit 79a58db2d6461f8ce94d8cfd9bc9bd0f16b49c83
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ jobs:
cd web/
npm ci

- name: Run eslint
- name: Run eslint and types
run: |
cd web/
npm run eslint | true
npm run lint

- name: Run unit tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion web/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ module.exports = {
},
],
},
ignorePatterns: ['package.json', './node_modules', './dist', '**/dist/*.js'],
ignorePatterns: ['package.json', './node_modules', './dist', '**/dist/*.js', 'grammar.terms.js'],
};
15 changes: 1 addition & 14 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"grammar:expressionQL": "lezer-generator ./src/components/Editor/Expression/grammar/syntax.grammar -o ./src/components/Editor/Expression/grammar/grammar.js",
"grammar:interpolationQL": "lezer-generator ./src/components/Editor/Interpolation/grammar/syntax.grammar -o ./src/components/Editor/Interpolation/grammar/grammar.js",
"types": "tsc",
"eslint": "eslint --ext=.js,.ts,.tsx ./src/**/* ./cypress/e2e/**/*",
"eslint": "eslint --ext .js,.ts,.tsx src/ cypress/",
"eject": "react-scripts eject",
"cy:open": "cypress open",
"cy:run": "cypress run",
Expand All @@ -88,19 +88,6 @@
"storybook": "start-storybook -p 6006 -s public",
"build-storybook": "build-storybook -s public"
},
"eslintConfig": {
"extends": "react-app",
"overrides": [
{
"files": [
"**/*.stories.*"
],
"rules": {
"import/no-anonymous-default-export": "off"
}
}
]
},
"browserslist": {
"production": [
">0.2%",
Expand Down
3 changes: 0 additions & 3 deletions web/src/components/AttributeRow/AttributeRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ const AttributeRow = ({
[assertions, key]
);

const passedCount = passed.length;
const failedCount = failed.length;

const handleOnClick = ({key: option}: {key: string}) => {
if (option === Action.Copy) {
message.success('Value copied to the clipboard');
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Header/__tests__/Header.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import {render, waitFor} from 'test-utils';
import Header from '../Header';

it('Header', async () => {
const {getByTestId} = render(<Header />);
const {getByTestId} = render(<Header isNoTracingMode />);
await waitFor(() => getByTestId('menu-link'));
});