Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

[ESLint] Lint test files #306

Merged
merged 5 commits into from
Jul 23, 2019
Merged

[ESLint] Lint test files #306

merged 5 commits into from
Jul 23, 2019

Conversation

bbecquet
Copy link
Contributor

Description

Apply ESLint to test suite files, with slightly different rules:

  • jest+node as env to manage jest-specifics features without override (describe, test, etc.)
  • I set the max-len rule to warn only, because tests are full of loooong selectors and I don't think it's crucial. What do you think?

Why

No reason to have different coding practices on test code.

import AutocompleteHelper from '../helpers/autocomplete';
import ResponseHandler from '../helpers/response_handler';
const configBuilder = require('@qwant/nconf-builder');
const config = configBuilder.get();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should maybe enforce capitalized global consts. What do you think about it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, but in another PR :) There are a lot of things to improve on globals everywhere in the code, like stop polluting the window namespace. BTW, here this isn't really a global.

.eslintrc.json Outdated Show resolved Hide resolved
@GuillaumeGomez GuillaumeGomez merged commit ac0c857 into Qwant:master Jul 23, 2019
@bbecquet bbecquet deleted the lint-tests branch August 13, 2019 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants