From 187856df46e23c6acc1b37b65fa4f4677e7a8d4b Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Fri, 6 Jul 2018 21:28:49 -0700 Subject: [PATCH 1/6] Use Airbnb ESLint --- .eslintrc.js | 34 +- examples/basics/core/Footer.js | 1 - .../pages/en/help-with-translations.js | 2 - examples/versions/pages/en/versions.js | 146 +- package-lock.json | 12250 ---------------- package.json | 32 +- website/core/Footer.js | 89 +- website/pages/en/versions.js | 176 +- yarn.lock | 326 +- 9 files changed, 371 insertions(+), 12685 deletions(-) delete mode 100644 package-lock.json diff --git a/.eslintrc.js b/.eslintrc.js index 67e770809249..dcad10dedc4c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,29 +3,11 @@ const WARNING = 1; const ERROR = 2; module.exports = { - extends: [ - 'fbjs', // eslint-config-fbjs - 'prettier' // eslint-config-prettier - ], - overrides: [ - { - files: ['lib/**/*.js'], - rules: { - // allow console - 'no-console': OFF, - // require radix argument in parseInt - 'radix': ERROR, - // disallow unused vars - 'no-unused-vars': ERROR, - // almost certainly a bug - 'no-duplicate-case': ERROR, - } - }, - { - files: ['examples/**/*.js'], - rules: { - 'no-unused-vars': OFF - } - } - ] -}; \ No newline at end of file + extends: ['airbnb', 'prettier'], + rules: { + // allow console + 'no-console': OFF, + // require radix argument in parseInt + radix: ERROR, + }, +}; diff --git a/examples/basics/core/Footer.js b/examples/basics/core/Footer.js index b43f1d6adff0..22d90f1492ef 100644 --- a/examples/basics/core/Footer.js +++ b/examples/basics/core/Footer.js @@ -19,7 +19,6 @@ class Footer extends React.Component { } render() { - const currentYear = new Date().getFullYear(); return (