Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint-plugin Doesn't check plain text in JSX #3342

Closed
2 tasks done
yury-tk opened this issue Aug 7, 2022 · 1 comment · Fixed by #3346
Closed
2 tasks done

eslint-plugin Doesn't check plain text in JSX #3342

yury-tk opened this issue Aug 7, 2022 · 1 comment · Fixed by #3346

Comments

@yury-tk
Copy link

yury-tk commented Aug 7, 2022

Info

Kind of Issue

  • runtime - command-line tools

Which Tool or library

  • cspell/eslint-plugin -- the eslint-plugin spelling tool

Which Version

Version: 6.5.0

Bug Description

Describe the bug

I have TSX code like <>wrongword</> with any tag.
Linting with @cspell/eslint-plugin with recommended settings ignores content of the tag

To Reproduce

Steps to reproduce the behavior:

  1. create CRA project with lint config and @cspell/eslint-plugin
  2. add file with TSX tag and broken word in it
  3. run linter
  4. see that word is ignored

Expected behavior

text in JSX tags should be processed and misspellings found

eslint config

  "eslintConfig": {
    "extends": [
      "react-app",
      "plugin:@cspell/recommended"
    ]
  }

cspell.json

  "cspell": {
    "version": "0.2",
    "language": "en",
    "useGitignore": true,
    "dictionaryDefinitions": [
      {
        "name": "import-names",
        "path": "./.cspell/import-names.txt"
      },
      {
        "name": "known-names",
        "path": "./.cspell/known-names.txt"
      },
      {
        "name": "project-words",
        "path": "./.cspell/project-words.txt",
        "addWords": true
      }
    ],
    "dictionaries": [
      "import-names",
      "project-words",
      "known-names"
    ],
    "ignorePaths": [
      "node_modules",
      ".cspell",
      "package.json",
      "countries.json"
    ]
  },
Jason3S added a commit that referenced this issue Aug 7, 2022
- New Option: `checkJSXText` defaults to `true`.

fixes: #3342
Jason3S added a commit that referenced this issue Aug 7, 2022
- New Option: `checkJSXText` defaults to `true`.

fixes: #3342
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant