Skip to content

💡: Add support for YML to the CSpell ESLint Plugin #5740

@dblock

Description

@dblock

Problem

Coming from opensearch-project/opensearch-api-specification#337 we are using eslint to check markdown files. Those have a lot of English text that we'd like to spell-check.

Solution

import parserYml from "yaml-eslint-parser"
import pluginYml from 'eslint-plugin-yml'
import pluginCspell from '@cspell/eslint-plugin'

export default [
  ...pluginYml.configs['flat/standard'],
  {
    files: ["**/*.yaml", "**/*.yml"],
    languageOptions: {
      parser: parserYml
    },
    plugins: {
      'yml': pluginYml,
      '@cspell': pluginCspell
    },
    rules: {
      '@cspell/spellchecker': 'warn'
    }
  }
]

Alternatives

No response

Additional Context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions