Commit graph

7 commits

Author SHA1 Message Date
Martin Pitt
0e608d562a Use current babel/eslint integration
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
2021-04-09 09:46:56 +02:00
Martin Pitt
04d6c566c7 eslint: Drop some disabled but desirable warnings
Project authors can/should decide about these by themselves.
2021-04-09 09:46:56 +02:00
Martin Pitt
024b1a2b16 Add eslint rules for React hooks
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
2019-10-18 13:00:17 +02:00
Sanne Raymaekers
044b8da55a
eslintrc: Set "root" to true
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/configuring

Closes #212
2019-08-21 17:50:44 +02:00
Martin Pitt
f6430895c7
Move to latest eslint standard plugin
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
2019-02-06 09:48:55 +01:00
Martin Pitt
133badfa3d Enable a lot of eslint options and plugins
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
2018-08-28 22:57:52 +02:00
Dominik Perpeet
a01820e565 Add more sample content to subscriptions page 2017-07-26 10:33:14 +02:00