You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.
Right now, when you run eslint, you see the following warning:
$> eslint frontend --ext .js,.jsx
The react/require-extension rule is deprecated. Please use the import/extensions rule from eslint-plugin-import instead.
Doing some digging identifies that updating the eslint-config-airbnb dependency to 12.0.0 should fix this issue: airbnb/javascript#978
Updating that eslint-config-airbnb to 12.0.0, however, produces _133 new errors_:
$> git diff
diff --git a/package.json b/package.json
index 9505e04..334fd6e 100644
--- a/package.json
+++ b/package.json
@@ -88,7 +88,7 @@
"devDependencies": {
"babel-eslint": "^6.1.2",
"eslint": "^3.4.0",
- "eslint-config-airbnb": "^10.0.1",
+ "eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.1.1",
"eslint-plugin-react": "^6.0.0",
$> eslint frontend --ext .js,.jsx
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\App\App.jsx
16:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\AuthenticatedAdminRoutes\AuthenticatedAdminRoutes.jsx
10:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\AuthenticatedRoutes\AuthenticatedRoutes.jsx
14:5 error Prop type `object` is forbidden react/forbid-prop-types
15:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\Avatar\Avatar.jsx
19:3 error Prop type `object` is forbidden react/forbid-prop-types
20:3 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\buttons\Button\Button.jsx
8:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\buttons\ElipsisMenu\ElipsisMenu.jsx
11:5 error Prop type `object` is forbidden react/forbid-prop-types
84:7 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\buttons\Slider\Slider.jsx
9:5 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\FlashMessage\FlashMessage.jsx
35:9 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
36:9 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
44:3 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\forms\Admin\EditUserForm\EditUserForm.jsx
16:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\forms\fields\Dropdown\Dropdown.jsx
8:5 error Prop type `object` is forbidden react/forbid-prop-types
10:13 error 'options.*.text' PropType is defined but prop is never used react/no-unused-prop-types
11:14 error 'options.*.value' PropType is defined but prop is never used react/no-unused-prop-types
14:5 error Prop type `object` is forbidden react/forbid-prop-types
50:24 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\forms\fields\InputField\InputField.jsx
10:5 error Prop type `object` is forbidden react/forbid-prop-types
11:5 error Prop type `object` is forbidden react/forbid-prop-types
13:5 error Prop type `object` is forbidden react/forbid-prop-types
17:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\forms\fields\InputFieldWithIcon\InputFieldWithIcon.jsx
15:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\forms\InviteUserForm\InviteUserForm.jsx
13:11 error 'invitedBy.id' PropType is defined but prop is never used react/no-unused-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\forms\LoginForm\LoginForm.jsx
15:17 error 'serverErrors.username' PropType is defined but prop is never used react/no-unused-prop-types
16:17 error 'serverErrors.password' PropType is defined but prop is never used react/no-unused-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\forms\LogoutForm\LogoutForm.jsx
8:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\forms\queries\SaveQueryForm\SaveQueryForm.jsx
143:11 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
153:9 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
267:46 error HTML entities must be escaped react/no-unescaped-entities
267:52 error HTML entities must be escaped react/no-unescaped-entities
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\forms\validators\validate_presence\validate_presence.tests.js
19:25 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
25:27 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\hosts\HostDetails\HostDetails.jsx
44:11 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
49:11 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
95:15 error 'host.hostname' PropType is defined but prop is never used react/no-unused-prop-types
96:9 error 'host.ip' PropType is defined but prop is never used react/no-unused-prop-types
97:10 error 'host.mac' PropType is defined but prop is never used react/no-unused-prop-types
98:13 error 'host.memory' PropType is defined but prop is never used react/no-unused-prop-types
99:15 error 'host.platform' PropType is defined but prop is never used react/no-unused-prop-types
100:13 error 'host.uptime' PropType is defined but prop is never used react/no-unused-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\icons\Icon.jsx
12:10 error 'alt' PropType is defined but prop is never used react/no-unused-prop-types
14:14 error 'onClick' PropType is defined but prop is never used react/no-unused-prop-types
15:5 error Prop type `object` is forbidden react/forbid-prop-types
15:12 error 'style' PropType is defined but prop is never used react/no-unused-prop-types
16:14 error 'variant' PropType is defined but prop is never used react/no-unused-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\icons\svg\base.tests.jsx
6:39 error Unexpected use of file extension "jsx" for "./KolideLoginBackground/KolideLoginBackground.svg.jsx" import/extensions
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\LoginRoutes\LoginRoutes.jsx
14:17 error 'location.pathname' PropType is defined but prop is never used react/no-unused-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\Modal\Modal.jsx
9:5 error Prop type `object` is forbidden react/forbid-prop-types
9:21 error 'overrideStyles' PropType is defined but prop is never used react/no-unused-prop-types
28:13 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\Queries\QuerySidePanel\QuerySidePanel.jsx
19:5 error Prop type `object` is forbidden react/forbid-prop-types
70:24 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
94:9 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
104:46 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
125:30 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\SidePanel\SidePanel.jsx
15:21 error 'config.org_logo_url' PropType is defined but prop is never used react/no-unused-prop-types
16:17 error 'config.org_name' PropType is defined but prop is never used react/no-unused-prop-types
20:5 error Prop type `object` is forbidden react/forbid-prop-types
149:9 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
198:9 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
219:25 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
235:7 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\components\StackedWhiteBoxes\StackedWhiteBoxes.jsx
12:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\kolide\base.js
70:12 error Expected 'this' to be used by class method '_request' class-methods-use-this
83:13 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
87:17 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\kolide\index.js
16:13 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
23:13 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
30:13 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
37:13 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
44:13 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
87:13 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\kolide\index.tests.js
179:16 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
219:16 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\layouts\CoreLayout\CoreLayout.jsx
12:21 error 'config.org_logo_url' PropType is defined but prop is never used react/no-unused-prop-types
13:17 error 'config.org_name' PropType is defined but prop is never used react/no-unused-prop-types
16:5 error Prop type `object` is forbidden react/forbid-prop-types
18:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\pages\Admin\UserManagementPage\UserBlock\UserBlock.jsx
12:5 error Prop type `object` is forbidden react/forbid-prop-types
16:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\pages\Admin\UserManagementPage\UserManagementPage.jsx
15:5 error Prop type `object` is forbidden react/forbid-prop-types
110:14 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
196:22 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
199:24 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\pages\HomePage\HomePage.jsx
10:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\pages\hosts\ManageHostsPage\ManageHostsPage.jsx
12:5 error Prop type `array` is forbidden react/forbid-prop-types
38:22 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\pages\hosts\NewHostPage\NewHostPage.jsx
110:27 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
113:14 error Visible, non-interactive elements should not have mouse or keyboard event listeners jsx-a11y/no-static-element-interactions
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\pages\hosts\NewHostPage\NewHostPage.tests.jsx
17:65 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\pages\LoginPage\LoginPage.jsx
21:14 error 'loading' PropType is defined but prop is never used react/no-unused-prop-types
23:5 error Prop type `object` is forbidden react/forbid-prop-types
24:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\pages\LogoutPage\LogoutPage.jsx
14:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\pages\ResetPasswordPage\ResetPasswordPage.jsx
15:5 error Prop type `object` is forbidden react/forbid-prop-types
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\middlewares\auth.js
8:41 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\nodes\app\actions.js
29:13 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
34:14 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\nodes\app\actions.tests.js
33:18 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\nodes\auth\actions.js
36:13 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
44:14 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
57:15 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
66:16 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\nodes\auth\reducer.tests.js
52:15 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
64:15 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
75:15 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
86:15 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\nodes\components\ForgotPasswordPage\actions.js
39:14 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\nodes\components\ForgotPasswordPage\reducer.tests.js
97:16 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\nodes\components\ResetPasswordPage\actions.js
29:14 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\nodes\components\ResetPasswordPage\reducer.tests.js
106:16 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\nodes\entities\base\reduxConfig.js
95:30 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
105:15 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
112:16 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
134:16 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
151:15 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
158:16 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
172:15 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
179:16 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
193:15 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
199:16 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\redux\nodes\entities\base\reduxConfig.tests.js
37:61 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
89:61 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
139:61 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
192:61 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
242:61 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
294:61 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
344:61 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
396:61 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
C:\Users\marpaia\go\src\github.com\kolide\kolide-ose\frontend\utilities\osquery_tables.js
2:31 error Missing file extension "json" for "../osquery_tables" import/extensions
6:32 error Expected parentheses around arrow function argument having a body with curly braces arrow-parens
✖ 133 problems (133 errors, 0 warnings)
Unfortunately, most of the errors are legitimately things that should be fixed.
The text was updated successfully, but these errors were encountered:
Right now, when you run eslint, you see the following warning:
Doing some digging identifies that updating the
eslint-config-airbnb
dependency to12.0.0
should fix this issue: airbnb/javascript#978Updating that
eslint-config-airbnb
to12.0.0
, however, produces _133 new errors_:Unfortunately, most of the errors are legitimately things that should be fixed.
The text was updated successfully, but these errors were encountered: