11# @alma-oss/eslint-config-react
22
3- > Alma’s ESLint configuration for React projects
3+ > ESLint configuration for React projects
44
5- ## Installation
5+ ## 📦 Installation
6+
7+ ``` sh
8+ npm install --save-dev eslint @alma-oss/eslint-config-react
9+ # or
10+ yarn add --dev eslint @alma-oss/eslint-config-react
11+ ```
612
713Wee need to install everything needed by the config using (installs package and also peer dependencies):
814
@@ -12,28 +18,31 @@ npx install-peerdeps --dev @alma-oss/eslint-config-react
1218
1319You can see in your package.json there is now a big list of devDependencies.
1420
15- ## Configurations
21+ ## 🧩 Rulesets
1622
1723- ** ` @alma-oss/eslint-config-react ` **
1824
19- Use this ruleset to configure ESLint to work with React code.
25+ A generic ruleset that focuses on code correctness .
2026
2127- ** ` @alma-oss/eslint-config-react/optional ` **
2228
23- Use this ruleset together with the above ruleset. Provides additional insights into potential inconsistencies in the project .
29+ Additional ruleset that might provide useful tips and hints how to improve your code .
2430
2531> For new projects, it is recommended to enable this ruleset. For existing projects, it is only recommended for the brave.
2632
27- ## Recommended ESLint Configuration
33+ ## 👨💻 Usage
2834
2935``` js
30- // eslint.config.mjs
36+ // eslint.config.js
3137
3238import { defineConfig } from ' eslint/config' ;
33- import base from ' @alma-oss/eslint-config-react' ;
39+ import react from ' @alma-oss/eslint-config-react' ;
3440import optional from ' @alma-oss/eslint-config-react/optional' ;
3541
36- export default defineConfig ([... base, ... optional]);
42+ export default defineConfig ({
43+ ... react,
44+ ... optional,
45+ });
3746```
3847
3948It is also recommended that you lint the whole project folder (that is ` npx eslint . ` ) instead of just
@@ -64,6 +73,15 @@ export default defineConfig({
6473});
6574```
6675
67- ## License
76+ ## 🙌 Contributing
77+
78+ We’re always looking for contributors to help us fix bugs, build new features,
79+ or help us improve the project documentation. If you’re interested, definitely
80+ check out our [ Contributing Guide] [ contributing ] ! 👀
81+
82+ ## 📝 License
83+
84+ Licensed under the [ MIT] [ license ] .
6885
69- See the [ LICENSE] ( LICENSE ) file for information.
86+ [ contributing ] : https://github.com/lmc-eu/code-quality-tools/blob/main/CONTRIBUTING.md
87+ [ license ] : https://github.com/lmc-eu/code-quality-tools/blob/main/LICENSE.md
0 commit comments