0.5.0 • Published 2 months ago

eslint-plugin-eslint-env v0.5.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

eslint-plugin-eslint-env · npm version

An ESLint plugin to lint files with eslint-env comments using the flat config.

Prerequisites

ESLint 8.21 or later is required.

Installation

npm i -D eslint-plugin-eslint-env

Usage

In your eslint.config.js file, create a new EslintEnvProcessor and add it to your configuration.

+ import { EslintEnvProcessor } from 'eslint-plugin-eslint-env';

  export default
  [
      {
          files:      ['**/*.js'],
+         processor:  new EslintEnvProcessor(),
      },
  ];

To support plugin-defined environments in eslint-env comments (e.g. /* eslint-env cypress/globals */, /* eslint-env react-native/react-native */, etc.), add a plugins setting both to the configuration and to the EslintEnvProcessor constructor options.

  import { EslintEnvProcessor } from 'eslint-plugin-eslint-env';
+ import eslintPluginCypress from 'eslint-plugin-cypress';

+ const plugins = { 'cypress': eslintPluginCypress };

  export default
  [
      {
          files:      ['**/*.js'],
+         plugins,
+         processor:  new EslintEnvProcessor({ plugins }),
      },
  ];
0.5.0

2 months ago

0.4.0

8 months ago

0.3.2

11 months ago

0.3.0

2 years ago

0.3.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago