Skip to content

Commit

Permalink
feat: Support spell checking of JSX/TSX Text
Browse files Browse the repository at this point in the history
- New Option: `checkJSXText` defaults to `true`.

fixes: #3342
  • Loading branch information
Jason3S committed Aug 7, 2022
1 parent a0e6341 commit 1c0ebc3
Show file tree
Hide file tree
Showing 13 changed files with 1,376 additions and 20 deletions.
14 changes: 14 additions & 0 deletions packages/cspell-eslint-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,25 @@ interface Options {
* @default true
*/
checkStringTemplates?: boolean;
/**
* Spell check JSX Text
* @default true
*/
checkJSXText?: boolean;
/**
* Spell check comments
* @default true
*/
checkComments?: boolean;
/**
* Specify a path to a custom word list file.
*
* example:
* ```js
* customWordListFile: "./myWords.txt"
* ```
*/
customWordListFile?: string | { path: string };
/**
* Output debug logs
* @default false
Expand Down
1 change: 1 addition & 0 deletions packages/cspell-eslint-plugin/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
],
"words": [
"estree",
"treeshake",
"tsbuildinfo"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
ReactDOM.render(
<div>
<h1>Hello, Welcome to React and TypeScript</h1>
</div>,
document.getElementById("root")
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
ReactDOM.render(
<div>
<h1>Hello, Welcome to React and TypeScript</h1>
</div>,
document.getElementById("root")
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import FirstComponent from './components/FirstComponent';
import UserComponent from './components/UserComponent';
ReactDOM.render(
<div>
<h1>Hello, Welcomeeeee to React and TypeScript</h1>
<FirstComponent />
<UserComponent name="John Doe" age={26} address="87 Summmer St, Boston, MA 02110" dob={new Date()} />
</div>,
document.getElementById('root')
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
import FirstComponent from './components/FirstComponent'
import UserComponent from './components/UserComponent'
ReactDOM.render(
<div>
<h1>Hello, Welcomeeeee to React and TypeScript</h1>
<FirstComponent/>
<UserComponent name="John Doe" age={26} address="87 Summmer St, Boston, MA 02110" dob={new Date()} />
</div>,
document.getElementById("root")
);
Loading

0 comments on commit 1c0ebc3

Please sign in to comment.