1- ## Getting Started
1+ # Getting Started
22
3- ### JavaScript
4-
5- #### Install
6-
7- ``` sh copy filename="Terminal"
8- npm install --save-dev @eslint-react/eslint-plugin
9- ```
10-
11- #### Setup
12-
13- ``` js filename="eslint.config.js"
14- import react from " @eslint-react/eslint-plugin" ;
15-
16- export default [
17- {
18- files: [" **/*.js" , " **/*.jsx" ],
19- ... react .configs [" recommended" ],
20- languageOptions: {
21- parserOptions: {
22- ecmaFeatures: {
23- jsx: true ,
24- },
25- },
26- },
27- },
28- {
29- files: [" **/*.js" , " **/*.jsx" ],
30- rules: {
31- // Put rules you want to override here
32- },
33- },
34- ];
35- ```
36-
37- ### TypeScript
38-
39- #### Install
3+ ## Install
404
415``` sh filename="Terminal"
426npm install --save-dev typescript-eslint @eslint-react/eslint-plugin
437```
448
45- #### Setup
9+ ## Setup
4610
4711``` js filename="eslint.config.js"
4812
@@ -66,31 +30,3 @@ export default tseslint.config({
6630 },
6731});
6832```
69-
70- ### JavaScript with Babel
71-
72- ``` sh copy filename="Terminal"
73- npm install --save-dev @babel/core @babel/eslint-parser @babel/preset-env @babel/preset-react @eslint-react/eslint-plugin
74- ```
75-
76- ``` js filename="eslint.config.js"
77- import parser from " @babel/eslint-parser" ;
78- import react from " @eslint-react/eslint-plugin" ;
79-
80- export default [
81- {
82- files: [" **/*.js" , " **/*.jsx" ],
83- languageOptions: {
84- parser,
85- parserOptions: {
86- requireConfigFile: false ,
87- babelOptions: {
88- babelrc: false ,
89- configFile: false ,
90- presets: [" @babel/preset-env" , " @babel/preset-react" ],
91- },
92- },
93- },
94- },
95- ];
96- ```
0 commit comments