A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/eslint-community/eslint-plugin-eslint-plugin below:

eslint-community/eslint-plugin-eslint-plugin: An ESLint plugin for linting ESLint plugins

An ESLint plugin for linting ESLint plugins. Rules written in CJS, ESM, and TypeScript are all supported.

You'll first need to install ESLint:

Next, install eslint-plugin-eslint-plugin:

npm install eslint-plugin-eslint-plugin --save-dev

Here's an example ESLint configuration that:

Note: you might need to set sourceType to module or script depending on your codebase.

// eslint.config.js
import eslintPlugin from 'eslint-plugin-eslint-plugin';

export default [
  eslintPlugin.configs.recommended,
  {
    rules: {
      'eslint-plugin/require-meta-docs-description': 'error',
    },
  },
];

💼 Configurations enabled in.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.
💭 Requires type information.

Name Description ✅ recommended enables all recommended rules in this plugin rules-recommended enables all recommended rules that are aimed at linting ESLint rule files tests-recommended enables all recommended rules that are aimed at linting ESLint test files all enables all rules in this plugin, excluding those requiring type information all-type-checked enables all rules in this plugin, including those requiring type information rules enables all rules that are aimed at linting ESLint rule files tests enables all rules that are aimed at linting ESLint test files Semantic versioning policy

The list of recommended rules will only change in a major release of this plugin. However, new non-recommended rules might be added in a minor release of this plugin. Therefore, using the all, rules, and tests presets is not recommended for production use, because the addition of new rules in a minor release could break your build.

Example of applying the recommended config to all files.

// eslint.config.js
import eslintPlugin from 'eslint-plugin-eslint-plugin';

export default [eslintPlugin.configs.recommended];

Or to apply linting only to the appropriate rule or test files:

// eslint.config.js
import eslintPlugin from 'eslint-plugin-eslint-plugin';

export default [
  {
    files: ['lib/rules/*.{js,ts}'],
    ...eslintPlugin.configs['rules-recommended'],
  },
  {
    files: ['tests/lib/rules/*.{js,ts}'],
    ...eslintPlugin.configs['tests-recommended'],
  },
];

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4