diff --git a/.eslintrc b/.eslintrc index 35af0bb1855..6962ed049a8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -83,12 +83,13 @@ "react/prefer-stateless-function": "off", "react/jsx-indent-props": "off", "react/jsx-closing-bracket-location": "off", + // FIXME: Switch using .jsx for jsx files https://github.com/mozilla/addons-frontend/issues/969. + "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], "react/jsx-first-prop-new-line": "off", + "react/jsx-key": "error", "react/no-string-refs": "error", // FIXME: Deprecate use of findDOMNode https://github.com/mozilla/addons-frontend/issues/968 "react/no-find-dom-node": "off", - // FIXME: Switch using .jsx for jsx files https://github.com/mozilla/addons-frontend/issues/969. - "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }] }, "settings": { "import/ignore": [ diff --git a/src/admin/containers/AddonPage/index.js b/src/admin/containers/AddonPage/index.js index 29363c7acb2..bcfdbf4e852 100644 --- a/src/admin/containers/AddonPage/index.js +++ b/src/admin/containers/AddonPage/index.js @@ -33,6 +33,7 @@ class AddonPage extends React.Component { ]; if (addon.homepage) { items.push([ + // eslint-disable-next-line react/jsx-key {_('View homepage')}, 'homepage', @@ -40,12 +41,14 @@ class AddonPage extends React.Component { } if (addon.support_email) { items.push([ + // eslint-disable-next-line react/jsx-key {_('Email support')}, 'support_email', ]); } if (addon.support_url) { items.push([ + // eslint-disable-next-line react/jsx-key {_('View support site')}, 'support_url', @@ -85,6 +88,7 @@ class AddonPage extends React.Component { [file.status, 'status'], [`${file.size} bytes`, 'size'], [file.created, 'created'], + // eslint-disable-next-line react/jsx-key [{_('Download')}, 'download'], ], 'file-info')} diff --git a/src/amo/components/Categories.js b/src/amo/components/Categories.js index 138ff9a0200..4e6fdffa0f5 100644 --- a/src/amo/components/Categories.js +++ b/src/amo/components/Categories.js @@ -49,7 +49,7 @@ export class CategoriesBase extends React.Component {