diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-23 20:38:19 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-30 09:20:37 +0100 |
commit | 3aeea07185ebb2eceeab4a0ec520f7d641d02f39 (patch) | |
tree | 0406942e88fa3ae9d9539186ff31520beaac90ac /server/sonar-web/src/main/js/components/measure | |
parent | 973d117229fc17176e9ea3384ec4a737178b28c2 (diff) | |
download | sonarqube-3aeea07185ebb2eceeab4a0ec520f7d641d02f39.tar.gz sonarqube-3aeea07185ebb2eceeab4a0ec520f7d641d02f39.zip |
use eslint for typescript, update eslint configuration (#2742)
Diffstat (limited to 'server/sonar-web/src/main/js/components/measure')
-rw-r--r-- | server/sonar-web/src/main/js/components/measure/Measure.tsx | 4 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/components/measure/__tests__/Measure-test.tsx | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/components/measure/Measure.tsx b/server/sonar-web/src/main/js/components/measure/Measure.tsx index e52c12a7512..cb9a85aab5e 100644 --- a/server/sonar-web/src/main/js/components/measure/Measure.tsx +++ b/server/sonar-web/src/main/js/components/measure/Measure.tsx @@ -31,14 +31,14 @@ interface Props { } export default function Measure({ className, decimals, measure }: Props) { - if (measure == undefined) { + if (measure === undefined) { return <span>{'–'}</span>; } const metric = measure.metric; const value = isDiffMetric(metric.key) ? measure.leak : measure.value; - if (value == undefined) { + if (value === undefined) { return <span>{'–'}</span>; } diff --git a/server/sonar-web/src/main/js/components/measure/__tests__/Measure-test.tsx b/server/sonar-web/src/main/js/components/measure/__tests__/Measure-test.tsx index 5eb0a6efa3e..80f2e31efab 100644 --- a/server/sonar-web/src/main/js/components/measure/__tests__/Measure-test.tsx +++ b/server/sonar-web/src/main/js/components/measure/__tests__/Measure-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* eslint-disable import/first */ jest.mock('../../../helpers/measures', () => { const measures = require.requireActual('../../../helpers/measures'); measures.getRatingTooltip = jest.fn(() => 'tooltip'); |