@santi020k/eslint-config-santi020k 3.2.2 → 3.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -203
  2. package/README.md +132 -152
  3. package/dist/index.js +27 -25
  4. package/package.json +23 -24
package/LICENSE CHANGED
@@ -1,203 +1,21 @@
1
- # License
2
-
3
- Apache License
4
- Version 2.0, January 2004
5
- http://www.apache.org/licenses/
6
-
7
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
-
9
- 1. Definitions.
10
-
11
- "License" shall mean the terms and conditions for use, reproduction,
12
- and distribution as defined by Sections 1 through 9 of this document.
13
-
14
- "Licensor" shall mean the copyright owner or entity authorized by
15
- the copyright owner that is granting the License.
16
-
17
- "Legal Entity" shall mean the union of the acting entity and all
18
- other entities that control, are controlled by, or are under common
19
- control with that entity. For the purposes of this definition,
20
- "control" means (i) the power, direct or indirect, to cause the
21
- direction or management of such entity, whether by contract or
22
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
- outstanding shares, or (iii) beneficial ownership of such entity.
24
-
25
- "You" (or "Your") shall mean an individual or Legal Entity
26
- exercising permissions granted by this License.
27
-
28
- "Source" form shall mean the preferred form for making modifications,
29
- including but not limited to software source code, documentation
30
- source, and configuration files.
31
-
32
- "Object" form shall mean any form resulting from mechanical
33
- transformation or translation of a Source form, including but
34
- not limited to compiled object code, generated documentation,
35
- and conversions to other media types.
36
-
37
- "Work" shall mean the work of authorship, whether in Source or
38
- Object form, made available under the License, as indicated by a
39
- copyright notice that is included in or attached to the work
40
- (an example is provided in the Appendix below).
41
-
42
- "Derivative Works" shall mean any work, whether in Source or Object
43
- form, that is based on (or derived from) the Work and for which the
44
- editorial revisions, annotations, elaborations, or other modifications
45
- represent, as a whole, an original work of authorship. For the purposes
46
- of this License, Derivative Works shall not include works that remain
47
- separable from, or merely link (or bind by name) to the interfaces of,
48
- the Work and Derivative Works thereof.
49
-
50
- "Contribution" shall mean any work of authorship, including
51
- the original version of the Work and any modifications or additions
52
- to that Work or Derivative Works thereof, that is intentionally
53
- submitted to Licensor for inclusion in the Work by the copyright owner
54
- or by an individual or Legal Entity authorized to submit on behalf of
55
- the copyright owner. For the purposes of this definition, "submitted"
56
- means any form of electronic, verbal, or written communication sent
57
- to the Licensor or its representatives, including but not limited to
58
- communication on electronic mailing lists, source code control systems,
59
- and issue tracking systems that are managed by, or on behalf of, the
60
- Licensor for the purpose of discussing and improving the Work, but
61
- excluding communication that is conspicuously marked or otherwise
62
- designated in writing by the copyright owner as "Not a Contribution."
63
-
64
- "Contributor" shall mean Licensor and any individual or Legal Entity
65
- on behalf of whom a Contribution has been received by Licensor and
66
- subsequently incorporated within the Work.
67
-
68
- 2. Grant of Copyright License. Subject to the terms and conditions of
69
- this License, each Contributor hereby grants to You a perpetual,
70
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
- copyright license to reproduce, prepare Derivative Works of,
72
- publicly display, publicly perform, sublicense, and distribute the
73
- Work and such Derivative Works in Source or Object form.
74
-
75
- 3. Grant of Patent License. Subject to the terms and conditions of
76
- this License, each Contributor hereby grants to You a perpetual,
77
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
- (except as stated in this section) patent license to make, have made,
79
- use, offer to sell, sell, import, and otherwise transfer the Work,
80
- where such license applies only to those patent claims licensable
81
- by such Contributor that are necessarily infringed by their
82
- Contribution(s) alone or by combination of their Contribution(s)
83
- with the Work to which such Contribution(s) was submitted. If You
84
- institute patent litigation against any entity (including a
85
- cross-claim or counterclaim in a lawsuit) alleging that the Work
86
- or a Contribution incorporated within the Work constitutes direct
87
- or contributory patent infringement, then any patent licenses
88
- granted to You under this License for that Work shall terminate
89
- as of the date such litigation is filed.
90
-
91
- 4. Redistribution. You may reproduce and distribute copies of the
92
- Work or Derivative Works thereof in any medium, with or without
93
- modifications, and in Source or Object form, provided that You
94
- meet the following conditions:
95
-
96
- (a) You must give any other recipients of the Work or
97
- Derivative Works a copy of this License; and
98
-
99
- (b) You must cause any modified files to carry prominent notices
100
- stating that You changed the files; and
101
-
102
- (c) You must retain, in the Source form of any Derivative Works
103
- that You distribute, all copyright, patent, trademark, and
104
- attribution notices from the Source form of the Work,
105
- excluding those notices that do not pertain to any part of
106
- the Derivative Works; and
107
-
108
- (d) If the Work includes a "NOTICE" text file as part of its
109
- distribution, then any Derivative Works that You distribute must
110
- include a readable copy of the attribution notices contained
111
- within such NOTICE file, excluding those notices that do not
112
- pertain to any part of the Derivative Works, in at least one
113
- of the following places: within a NOTICE text file distributed
114
- as part of the Derivative Works; within the Source form or
115
- documentation, if provided along with the Derivative Works; or,
116
- within a display generated by the Derivative Works, if and
117
- wherever such third-party notices normally appear. The contents
118
- of the NOTICE file are for informational purposes only and
119
- do not modify the License. You may add Your own attribution
120
- notices within Derivative Works that You distribute, alongside
121
- or as an addendum to the NOTICE text from the Work, provided
122
- that such additional attribution notices cannot be construed
123
- as modifying the License.
124
-
125
- You may add Your own copyright statement to Your modifications and
126
- may provide additional or different license terms and conditions
127
- for use, reproduction, or distribution of Your modifications, or
128
- for any such Derivative Works as a whole, provided Your use,
129
- reproduction, and distribution of the Work otherwise complies with
130
- the conditions stated in this License.
131
-
132
- 5. Submission of Contributions. Unless You explicitly state otherwise,
133
- any Contribution intentionally submitted for inclusion in the Work
134
- by You to the Licensor shall be under the terms and conditions of
135
- this License, without any additional terms or conditions.
136
- Notwithstanding the above, nothing herein shall supersede or modify
137
- the terms of any separate license agreement you may have executed
138
- with Licensor regarding such Contributions.
139
-
140
- 6. Trademarks. This License does not grant permission to use the trade
141
- names, trademarks, service marks, or product names of the Licensor,
142
- except as required for reasonable and customary use in describing the
143
- origin of the Work and reproducing the content of the NOTICE file.
144
-
145
- 7. Disclaimer of Warranty. Unless required by applicable law or
146
- agreed to in writing, Licensor provides the Work (and each
147
- Contributor provides its Contributions) on an "AS IS" BASIS,
148
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
- implied, including, without limitation, any warranties or conditions
150
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
- PARTICULAR PURPOSE. You are solely responsible for determining the
152
- appropriateness of using or redistributing the Work and assume any
153
- risks associated with Your exercise of permissions under this License.
154
-
155
- 8. Limitation of Liability. In no event and under no legal theory,
156
- whether in tort (including negligence), contract, or otherwise,
157
- unless required by applicable law (such as deliberate and grossly
158
- negligent acts) or agreed to in writing, shall any Contributor be
159
- liable to You for damages, including any direct, indirect, special,
160
- incidental, or consequential damages of any character arising as a
161
- result of this License or out of the use or inability to use the
162
- Work (including but not limited to damages for loss of goodwill,
163
- work stoppage, computer failure or malfunction, or any and all
164
- other commercial damages or losses), even if such Contributor
165
- has been advised of the possibility of such damages.
166
-
167
- 9. Accepting Warranty or Additional Liability. While redistributing
168
- the Work or Derivative Works thereof, You may choose to offer,
169
- and charge a fee for, acceptance of support, warranty, indemnity,
170
- or other liability obligations and/or rights consistent with this
171
- License. However, in accepting such obligations, You may act only
172
- on Your own behalf and on Your sole responsibility, not on behalf
173
- of any other Contributor, and only if You agree to indemnify,
174
- defend, and hold each Contributor harmless for any liability
175
- incurred by, or claims asserted against, such Contributor by reason
176
- of your accepting any such warranty or additional liability.
177
-
178
- END OF TERMS AND CONDITIONS
179
-
180
- APPENDIX: How to apply the Apache License to your work.
181
-
182
- To apply the Apache License to your work, attach the following
183
- boilerplate notice, with the fields enclosed by brackets "[]"
184
- replaced with your own identifying information. (Don't include
185
- the brackets!) The text should be enclosed in the appropriate
186
- comment syntax for the file format. We also recommend that a
187
- file or class name and description of purpose be included on the
188
- same "printed page" as the copyright notice for easier
189
- identification within third-party archives.
190
-
191
- Copyright [yyyy] [name of copyright owner]
192
-
193
- Licensed under the Apache License, Version 2.0 (the "License");
194
- you may not use this file except in compliance with the License.
195
- You may obtain a copy of the License at
196
-
197
- http://www.apache.org/licenses/LICENSE-2.0
198
-
199
- Unless required by applicable law or agreed to in writing, software
200
- distributed under the License is distributed on an "AS IS" BASIS,
201
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
- See the License for the specific language governing permissions and
203
- limitations under the License.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 santi020k
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,219 +1,199 @@
1
1
  # @santi020k/eslint-config-santi020k
2
2
 
3
- Welcome to @santi020k/eslint-config-santi020k, a comprehensive and opinionated ESLint configuration package for JavaScript, TypeScript, React, and various other frameworks. This repository was born out of my frustration with projects that suffer from bad practices and poor code quality. By automating code quality and reducing cognitive load during code reviews, this package aims to enforce a consistent coding style across your projects.
3
+ Welcome to **@santi020k/eslint-config-santi020k**, a comprehensive and opinionated ESLint configuration package for JavaScript, TypeScript, React, and other frameworks. Born from a desire to eliminate bad practices and ensure high-quality code, this configuration automates code quality checks and reduces cognitive load during code reviews by enforcing a consistent coding style across your projects.
4
4
 
5
5
  ## Why Use This Configuration?
6
6
 
7
- - **Consistency**: Enforces a uniform coding style, minimizing code differences and easing collaboration.
8
- - **Quality**: Promotes best practices and helps avoid common pitfalls in JavaScript, TypeScript, and React development.
9
- - **Automation**: Reduces the need for manual code reviews by catching issues early in the development process.
10
- - **Customization**: While opinionated, it can be tailored to fit your project's specific needs.
7
+ - **Consistency:** Enforces a uniform coding style, reducing code discrepancies and easing collaboration.
8
+ - **Quality:** Promotes best practices and helps avoid common pitfalls in JavaScript, TypeScript, Frameworks, Libraries, Tools and more.
9
+ - **Automation:** Catches issues early in the development process, minimizing manual code review effort.
10
+ - **Customization:** While it comes with strong opinions, you can tailor it to suit your project's specific needs.
11
11
 
12
12
  ## Installation
13
13
 
14
- First, ensure you have ESLint (9.0.0 or latest) installed:
14
+ Before installing, make sure you have ESLint (version 9.0.0 or later) installed:
15
15
 
16
16
  ```bash
17
- npm install eslint --save-dev
17
+ npm install eslint --save-dev
18
18
  ```
19
19
 
20
- Then, install the configuration package:
20
+ Then, install the configuration package. **Important:** I recommend using a fixed version (do not use `^` or `~`), as any new functionality or change may introduce new linter errors that require manual updates.
21
21
 
22
22
  ```bash
23
- npm install @santi020k/eslint-config-santi020k --save-dev
23
+ npm install @santi020k/eslint-config-santi020k --save-dev
24
24
  ```
25
25
 
26
26
  ## Usage
27
27
 
28
- Create an `eslint.config.js` file (or use your existing one) and extend @santi020k/eslint-config-santi020k based on your project type:
28
+ Create an `eslint.config.js` file (or update your existing one) and extend **@santi020k/eslint-config-santi020k** based on your project type.
29
29
 
30
30
  ### Basic Usage
31
31
 
32
- For a basic JavaScript project:
32
+ For a basic JavaScript/Node.js project:
33
33
 
34
34
  ```js
35
- import { eslintConfig } from '@santi020k/eslint-config-santi020k'
35
+ import { eslintConfig } from '@santi020k/eslint-config-santi020k'
36
36
 
37
- export default [
38
- ...eslintConfig(),
39
- // Your custom config
40
- ]
37
+ export default [
38
+ ...eslintConfig()
39
+ // Your custom config
40
+ ]
41
41
  ```
42
42
 
43
43
  ### Advanced Usage
44
44
 
45
- For projects with specific configurations (TypeScript, React, Next.js, etc.), use the appropriate options:
45
+ For projects that require specific configurations (e.g., TypeScript, React, Next.js, ...Etc), use the appropriate options:
46
46
 
47
47
  ```js
48
- import { ConfigOption, eslintConfig } from '@santi020k/eslint-config-santi020k';
49
-
50
- // Examples of different configurations
51
-
52
- // TypeScript project
53
- export default [
54
- ...eslintConfig({ config: [ConfigOption.Ts] }),
55
- // Your custom config
56
- ];
57
-
58
- // React project
59
- export default [
60
- ...eslintConfig({ config: [ConfigOption.React] }),
61
- // Your custom config
62
- ];
63
-
64
- // TypeScript and React project
65
- export default [
66
- ...eslintConfig({ config: [ConfigOption.React, ConfigOption.Ts] }),
67
- // Your custom config
68
- ];
69
-
70
- // Next.js project
71
- export default [
72
- ...eslintConfig({ config: [ConfigOption.Next] }),
73
- // Your custom config
74
- ];
75
-
76
- // TypeScript and Next.js project
77
- export default [
78
- ...eslintConfig({ config: [ConfigOption.Next, ConfigOption.Ts] }),
79
- // Your custom config
80
- ];
81
-
82
- // Expo project (Beta)
83
- export default [
84
- ...eslintConfig({ config: [ConfigOption.Expo] }),
85
- // Your custom config
86
- ];
87
-
88
- // TypeScript and Expo project (Beta)
89
- export default [
90
- ...eslintConfig({ config: [ConfigOption.Expo, ConfigOption.Ts] }),
91
- // Your custom config
92
- ];
93
-
94
- // Astro project (beta, supports Astro with React)
95
- export default [
96
- ...eslintConfig({ config: [ConfigOption.Astro] }),
97
- // Your custom config
98
- ];
99
-
100
- // TypeScript and Astro project (beta, supports Astro with React)
101
- export default [
102
- ...eslintConfig({ config: [ConfigOption.Astro, ConfigOption.Ts] }),
103
- // Your custom config
104
- ];
48
+ import { ConfigOption, eslintConfig } from '@santi020k/eslint-config-santi020k'
49
+
50
+ // TypeScript project
51
+ export default [
52
+ ...eslintConfig({ config: [ConfigOption.Ts] })
53
+ // Your custom config
54
+ ]
55
+
56
+ // React project
57
+ export default [
58
+ ...eslintConfig({ config: [ConfigOption.React] })
59
+ // Your custom config
60
+ ]
61
+
62
+ // TypeScript and React project
63
+ export default [
64
+ ...eslintConfig({ config: [ConfigOption.React, ConfigOption.Ts] })
65
+ // Your custom config
66
+ ]
67
+
68
+ // Next.js project
69
+ export default [
70
+ ...eslintConfig({ config: [ConfigOption.Next] })
71
+ // Your custom config
72
+ ]
73
+
74
+ // Expo project (Beta)
75
+ export default [
76
+ ...eslintConfig({ config: [ConfigOption.Expo] })
77
+ // Your custom config
78
+ ]
79
+
80
+ // Astro project (beta, supports Astro with React)
81
+ export default [
82
+ ...eslintConfig({ config: [ConfigOption.Astro] })
83
+ // Your custom config
84
+ ]
105
85
  ```
106
86
 
107
- ### Optionals Usage
87
+ ### Optional Usage
108
88
 
109
- Additionally, there are some optional parameters that add support to other technologies that could be needed in a front-end project. The idea is to add support for more options in the future. Here is an example of how to use these optionals:
89
+ There are additional optional parameters to add support for other front-end/back-end technologies. This enables you to extend support as needed:
110
90
 
111
91
  ```js
112
- import { ConfigOption, eslintConfig, OptionalOption } from '@santi020k/eslint-config-santi020k';
113
-
114
- export default [
115
- ...eslintConfig({
116
- config: [ConfigOption.Next, ConfigOption.Ts],
117
- optionals: [
118
- // Spell checker
119
- OptionalOption.Cspell,
120
- // TailwindCss
121
- OptionalOption.Tailwind,
122
- // Vitest and testing-library
123
- OptionalOption.Vitest,
124
- // I18next
125
- OptionalOption.I18next,
126
- // Mdx
127
- OptionalOption.Mdx,
128
- // Markdown
129
- OptionalOption.Markdown,
130
- // Stencil
131
- OptionalOption.Stencil
132
- ]
133
- }),
134
- // Your custom config
135
- ];
92
+ import { ConfigOption, eslintConfig, OptionalOption } from '@santi020k/eslint-config-santi020k'
93
+
94
+ export default [
95
+ ...eslintConfig({
96
+ config: [ConfigOption.Next, ConfigOption.Ts],
97
+ optionals: [
98
+ // Spell checker
99
+ OptionalOption.Cspell,
100
+ // TailwindCss
101
+ OptionalOption.Tailwind,
102
+ // Vitest and testing-library
103
+ OptionalOption.Vitest,
104
+ // I18next
105
+ OptionalOption.I18next,
106
+ // Mdx
107
+ OptionalOption.Mdx,
108
+ // Markdown
109
+ OptionalOption.Markdown,
110
+ // Stencil
111
+ OptionalOption.Stencil
112
+ ]
113
+ })
114
+ // Your custom config
115
+ ]
136
116
  ```
137
117
 
138
- ### Setting Usage (experimental)
118
+ ### Settings Usage (Experimental)
119
+
120
+ This experimental option allows ESLint to honor your `.gitignore` file:
139
121
 
140
122
  ```js
141
- import { eslintConfig, SettingOption } from '@santi020k/eslint-config-santi020k';
142
-
143
- export default [
144
- ...eslintConfig({
145
- // Adds support for .gitignore file, eslint will ignore files in the .gitignore file
146
- settings: [SettingOption.Gitignore]
147
- }),
148
- // Your custom config
149
- ];
123
+ import { eslintConfig, SettingOption } from '@santi020k/eslint-config-santi020k'
124
+
125
+ export default [
126
+ ...eslintConfig({
127
+ // ESLint will ignore files specified in .gitignore
128
+ settings: [SettingOption.Gitignore]
129
+ })
130
+ // Your custom config
131
+ ]
150
132
  ```
151
133
 
152
134
  ## Opinionated but Flexible
153
135
 
154
- This ESLint configuration is based on my personal preferences and practices. As such, it may evolve over time. I recommend using a fixed version to avoid unexpected changes. If a rule is too strict, consider changing it from an error to a warning to allow for more flexibility during development.
136
+ This ESLint configuration is based on my personal preferences and practices, and it may evolve over time. **Important:** I recommend using a fixed version to avoid unexpected changes that might introduce new linter errors. To ensure stability, do not use `^` or `~` when specifying the version. If a rule feels too strict, consider changing it from an error to a warning to allow more flexibility during development.
155
137
 
156
138
  ## Scripts
157
139
 
158
- Here are some useful scripts you can add to your `package.json`:
140
+ Add the following useful scripts to your `package.json`:
159
141
 
160
142
  ```json
161
- "scripts": {
162
- "lint": "eslint . --report-unused-disable-directives",
163
- "lint:fix": "npm run lint -- --fix"
164
- }
143
+ "scripts": {
144
+ "lint": "eslint . --report-unused-disable-directives",
145
+ "lint:fix": "npm run lint -- --fix"
146
+ }
165
147
  ```
166
148
 
167
149
  ## How to Implement in an Existing Project
168
150
 
169
- 1. Install the Dependencies: Ensure you have ESLint and this configuration package installed in your project.
170
-
171
- 2. Update Your ESLint Configuration: Extend `@santi020k/eslint-config-santi020k` in your ESLint configuration file as shown above.
172
-
173
- 3. Run ESLint: Run ESLint to lint your project files and fix issues:
151
+ 1. **Install the Dependencies:** Ensure that both ESLint and this configuration package are installed.
152
+ 2. **Update Your ESLint Configuration:** Extend **@santi020k/eslint-config-santi020k** in your ESLint configuration file as shown above.
153
+ 3. **Run ESLint:** Lint your project files and automatically fix issues if possible:
174
154
 
175
- ```bash
176
- npm run lint
177
- npm run lint:fix
178
- ```
155
+ ```bash
156
+ npm run lint
157
+ npm run lint:fix
158
+ ```
179
159
 
180
- 4. Adjust as Necessary: Review the linting rules and adjust them based on your project's needs. Since this configuration is opinionated, some rules might be too strict or not applicable to your project. Feel free to disable or modify them.
160
+ 4. **Adjust as Necessary:** Review and modify the linting rules based on your project's needs. Some rules might be too strict or not applicable; feel free to disable or adjust them.
181
161
 
182
162
  ## Future Features
183
163
 
184
164
  - [ ] Unit testing
185
- - [ ] Better documentation
186
- - [ ] Additional Frameworks support
165
+ - [ ] Enhanced documentation
166
+ - [ ] Additional framework support:
187
167
  - [ ] Vue
188
168
  - [ ] Angular
189
169
  - [ ] Astro (Process)
190
- - [X] Refactor rules structure (eslint configurations are currently duplicated)
170
+ - [X] Refactored rules structure (previously duplicated configurations)
191
171
 
192
172
  ## Contributing
193
173
 
194
- If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the [GitHub repository](https://github.com/santi020k/eslint-config-santi020k).
174
+ If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the [GitHub repository](https://github.com/santi020k/eslint-config-santi020k).
195
175
 
196
176
  ## Acknowledgements
197
177
 
198
- I would like to express my gratitude to the developers and maintainers of the following libraries, which form the backbone of this ESLint configuration:
199
-
200
- - `eslint-config-standard`
201
- - `eslint-plugin-import`
202
- - `eslint-plugin-jsx-a11y`
203
- - `eslint-plugin-n`
204
- - `eslint-plugin-promise`
205
- - `eslint-plugin-react`
206
- - `eslint-plugin-react-hooks`
207
- - `eslint-plugin-simple-import-sort`
208
- - `eslint-plugin-sonarjs`
209
- - `eslint-plugin-unused-imports`
210
- - `@stylistic/eslint-plugin`
211
- - `@typescript-eslint`
212
- - `@cspell/eslint-plugin`
213
- - `eslint-plugin-tailwindcss`
214
- - `eslint-plugin-vitest`
215
- - `etc...`
216
-
217
- These tools have significantly contributed to the JavaScript and TypeScript ecosystem, and their continued development helps maintain the high standards of code quality that we all strive for.
218
-
219
- Thank you for using @santi020k/eslint-config-santi020k. Together, let's write cleaner, more maintainable code!
178
+ Special thanks to the developers and maintainers of the following libraries, which form the backbone of this ESLint configuration:
179
+
180
+ - eslint-config-standard
181
+ - eslint-plugin-import
182
+ - eslint-plugin-jsx-a11y
183
+ - eslint-plugin-n
184
+ - eslint-plugin-promise
185
+ - eslint-plugin-react
186
+ - eslint-plugin-react-hooks
187
+ - eslint-plugin-simple-import-sort
188
+ - eslint-plugin-sonarjs
189
+ - eslint-plugin-unused-imports
190
+ - @stylistic/eslint-plugin
191
+ - @typescript-eslint
192
+ - @cspell/eslint-plugin
193
+ - eslint-plugin-tailwindcss
194
+ - eslint-plugin-vitest
195
+ - ...and many others
196
+
197
+ Their ongoing contributions help maintain the high standards of code quality we all strive for.
198
+
199
+ Thank you for using **@santi020k/eslint-config-santi020k**. Together, let's write cleaner, more maintainable code!
package/dist/index.js CHANGED
@@ -512,34 +512,36 @@ var markdown = [
512
512
  ];
513
513
 
514
514
  // src/optionals/mdx.ts
515
- import eslintMdx from "eslint-mdx";
516
- import pluginMdx from "eslint-plugin-mdx";
515
+ import * as pluginMdx from "eslint-plugin-mdx";
516
+ var rules7 = {
517
+ ...pluginMdx.flatCodeBlocks.rules,
518
+ "no-var": "error",
519
+ "prefer-const": "error",
520
+ "react/react-in-jsx-scope": 0,
521
+ "no-unused-vars": "off",
522
+ "@stylistic/indent": "off",
523
+ "@stylistic/jsx-closing-bracket-location": "off",
524
+ indent: "off",
525
+ "no-multi-spaces": "off",
526
+ "@stylistic/no-multi-spaces": "off",
527
+ "comma-dangle": "off",
528
+ "@stylistic/jsx-tag-spacing": "off",
529
+ "import/export": "off"
530
+ };
517
531
  var mdx = [
518
532
  {
519
533
  files: ["**/*.mdx"],
520
- languageOptions: {
521
- sourceType: "module",
522
- ecmaVersion: "latest",
523
- parser: eslintMdx,
524
- globals: {
525
- React: false
526
- }
527
- },
528
- plugins: {
529
- mdx: pluginMdx
530
- },
531
- rules: {
532
- "mdx/remark": "warn",
533
- "react/react-in-jsx-scope": 0,
534
- "no-unused-vars": "off",
535
- "@stylistic/indent": "off",
536
- "@stylistic/jsx-closing-bracket-location": "off",
537
- indent: "off",
538
- "no-multi-spaces": "off",
539
- "@stylistic/no-multi-spaces": "off",
540
- "comma-dangle": "off",
541
- "@stylistic/jsx-tag-spacing": "off"
542
- }
534
+ ...pluginMdx.flat,
535
+ processor: pluginMdx.createRemarkProcessor({
536
+ lintCodeBlocks: true,
537
+ languageMapper: {}
538
+ }),
539
+ rules: rules7
540
+ },
541
+ {
542
+ files: ["**/*.mdx"],
543
+ ...pluginMdx.flatCodeBlocks,
544
+ rules: rules7
543
545
  }
544
546
  ];
545
547
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@santi020k/eslint-config-santi020k",
3
- "version": "3.2.2",
3
+ "version": "3.2.4",
4
4
  "description": "A comprehensive ESLint configuration package for JavaScript, TypeScript, and React projects, including popular plugins and custom rules for consistent coding style.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -61,32 +61,31 @@
61
61
  "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@eslint/config-inspector": "^1.0.0",
65
- "@types/eslint__eslintrc": "^2.1.2",
66
- "@types/node": "^22.12.0",
64
+ "@eslint/config-inspector": "^1.0.2",
65
+ "@types/node": "^22.14.1",
67
66
  "cz-conventional-changelog": "^3.3.0",
68
- "esbuild": "^0.24.2",
67
+ "esbuild": "^0.25.2",
69
68
  "husky": "^9.1.7",
70
- "lint-staged": "^15.4.3",
71
- "react": "^19.0.0",
72
- "react-dom": "^19.0.0",
69
+ "lint-staged": "^15.5.1",
70
+ "react": "^19.1.0",
71
+ "react-dom": "^19.1.0",
73
72
  "tslib": "^2.8.1",
74
- "tsup": "^8.3.6",
75
- "typescript": "^5.7.3",
73
+ "tsup": "^8.4.0",
74
+ "typescript": "^5.8.3",
76
75
  "yalc": "^1.0.0-pre.53"
77
76
  },
78
77
  "dependencies": {
79
- "@cspell/eslint-plugin": "^8.17.5",
80
- "@eslint/compat": "^1.2.7",
81
- "@eslint/js": "^9.21.0",
82
- "@eslint/markdown": "^6.2.2",
83
- "@next/eslint-plugin-next": "^15.1.7",
78
+ "@cspell/eslint-plugin": "^8.18.1",
79
+ "@eslint/compat": "^1.2.8",
80
+ "@eslint/js": "^9.24.0",
81
+ "@eslint/markdown": "^6.3.0",
82
+ "@next/eslint-plugin-next": "^15.3.0",
84
83
  "@stencil-community/eslint-plugin": "^0.10.0",
85
- "@stylistic/eslint-plugin": "^4.0.1",
86
- "@typescript-eslint/eslint-plugin": "^8.24.1",
87
- "@typescript-eslint/type-utils": "^8.24.1",
84
+ "@stylistic/eslint-plugin": "^4.2.0",
85
+ "@typescript-eslint/eslint-plugin": "^8.30.1",
86
+ "@typescript-eslint/type-utils": "^8.30.1",
88
87
  "cross-dirname": "^0.1.0",
89
- "eslint": "^9.21.0",
88
+ "eslint": "^9.24.0",
90
89
  "eslint-config-expo": "^8.0.1",
91
90
  "eslint-config-standard": "^17.1.0",
92
91
  "eslint-plugin-astro": "^1.3.1",
@@ -94,11 +93,11 @@
94
93
  "eslint-plugin-i18next": "^6.1.1",
95
94
  "eslint-plugin-import": "^2.31.0",
96
95
  "eslint-plugin-jsx-a11y": "^6.10.2",
97
- "eslint-plugin-mdx": "^3.1.5",
98
- "eslint-plugin-n": "^17.15.1",
96
+ "eslint-plugin-mdx": "^3.4.0",
97
+ "eslint-plugin-n": "^17.17.0",
99
98
  "eslint-plugin-promise": "^7.2.1",
100
- "eslint-plugin-react": "^7.37.4",
101
- "eslint-plugin-react-hooks": "^5.1.0",
99
+ "eslint-plugin-react": "^7.37.5",
100
+ "eslint-plugin-react-hooks": "^5.2.0",
102
101
  "eslint-plugin-simple-import-sort": "^12.1.1",
103
102
  "eslint-plugin-sonarjs": "^3.0.2",
104
103
  "eslint-plugin-tailwindcss": "^3.18.0",
@@ -106,7 +105,7 @@
106
105
  "eslint-plugin-unused-imports": "^4.1.4",
107
106
  "eslint-plugin-vitest": "^0.5.4",
108
107
  "globals": "^16.0.0",
109
- "typescript-eslint": "^8.24.1"
108
+ "typescript-eslint": "^8.30.1"
110
109
  },
111
110
  "overrides": {
112
111
  "eslint-config-standard": "$eslint-config-standard",