Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Issues with the Preact preset linting config #821

Closed
edmorley opened this issue Apr 26, 2018 · 0 comments · Fixed by #827
Closed

Issues with the Preact preset linting config #821

edmorley opened this issue Apr 26, 2018 · 0 comments · Fixed by #827
Assignees
Milestone

Comments

@edmorley
Copy link
Member

Spotted whilst working on babel 7.

The @neutrinojs/preact currently depends on eslint-plugin-react:
https://github.com/mozilla-neutrino/neutrino-dev/blob/082515268e3587e065989c787c0bd35b6f6b8dab/packages/preact/package.json#L37

...however it doesn't activate the react plugin (unlike @neutrinojs/react):
https://github.com/mozilla-neutrino/neutrino-dev/blob/082515268e3587e065989c787c0bd35b6f6b8dab/packages/preact/index.js#L50-L57

...meaning that dependency is currently unused.

We should probably activate the plugin and also set the pragma correctly, to prevent false positives. eg:

      plugins: ['react'],
      baseConfig: {
        settings: {
          react: {
            pragma: 'h'
          }
        }
      }
@edmorley edmorley added this to the v9 milestone Apr 27, 2018
@edmorley edmorley self-assigned this Apr 27, 2018
edmorley added a commit that referenced this issue Apr 27, 2018
`@neutrinojs/preact` already had a dependency on `eslint-plugin-react`,
but wasn't actually using it. Now the React ESLint plugin is enabled
if an ESLint configuration is found - the same as for the React preset.

This will make it easier for Preact users to realise what changes they
need to make, now that we're not using `babel-plugin-jsx-pragmatic`.

Fixes #821.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

1 participant