This started giving errors like:
22:10 error 'Alert' is defined but never used no-unused-vars
Use eslint-plugin-react to improve the JSX usage, not just to silence this error.
`var` has broken/unexpected scoping in JavaScript, and can lead to
subtle errors. It's preferable and safer to use `const` whenever
possible, and `let` where necessary.
There are no usages of `var` in starter-kit right now, so just enable
the rule to ensure that it stays that way.
Fixes these `npm install` warnings:
> deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
> deprecated eslint-loader@4.0.2: This loader has been deprecated. Please use eslint-webpack-plugin
These make components with simple state (only a few variables) easier to
read and maintain. See https://reactjs.org/docs/hooks-intro.html for
details. Hook are available since React 16.8, and we already depend on 16.10.
We can't use hooks in our actual code, as our only `Application`
component needs a constructor. But this enables the ESLint plugin to
guide developers to the right path if they use hooks.
Closes#239
Eslint shimmies up directories looking for more eslintrcs. As
make-checkout now clones projects in a subdirectory of cockpit, this can
result in some strange interactions.
https://eslint.org/docs/user-guide/configuringCloses#212
This fixes the three warnings that recently started to appear:
[ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The 'parserOptions.ecmaFeatures.experimentalObjectRestSpread' option is deprecated. Use 'parserOptions.ecmaVersion' instead. (found in "standard-react")
[ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The 'parserOptions.ecmaFeatures.experimentalObjectRestSpread' option is deprecated. Use 'parserOptions.ecmaVersion' instead. (found in "node_modules/eslint-config-standard-jsx/index.js")
[ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The 'parserOptions.ecmaFeatures.experimentalObjectRestSpread' option is deprecated. Use 'parserOptions.ecmaVersion' instead. (found in "standard")
Closes#99
Taken rules from Cockpit, which have been proven to be effective for
finding bugs and keeping clean code, and sensible (not taking
unreasonable effort to satisfy).
Fix code layout in app.jsx accordingly.
Closes#39