@borela-tech/eslint-config 1.0.0

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.
package/FUNDING.yml ADDED
@@ -0,0 +1 @@
1
+ github: borela
package/LICENSE.md ADDED
@@ -0,0 +1,176 @@
1
+ # Apache License
2
+
3
+ Copyright © 2025 Alexandre Borela (<alexandre@borela.tech>)
4
+
5
+ Version 2.0, January 2004
6
+ http://www.apache.org/licenses/
7
+
8
+ #### TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
9
+
10
+ ### 1. Definitions.
11
+
12
+ **“License”** shall mean the terms and conditions for use, reproduction, and
13
+ distribution as defined by Sections 1 through 9 of this document.
14
+
15
+ **“Licensor”** shall mean the copyright owner or entity authorized by the
16
+ copyright owner that is granting the License.
17
+
18
+ **“Legal Entity”** shall mean the union of the acting entity and all other
19
+ entities that control, are controlled by, or are under common control with that
20
+ entity. For the purposes of this definition, **“control”** means (i) the power,
21
+ direct or indirect, to cause the direction or management of such entity, whether
22
+ by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of
23
+ the outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ **“You”** (or **“Your”**) shall mean an individual or Legal Entity exercising
26
+ 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 source, and
30
+ configuration files.
31
+
32
+ **“Object”** form shall mean any form resulting from mechanical transformation
33
+ or translation of a Source form, including but not limited to compiled object
34
+ code, generated documentation, and conversions to other media types.
35
+
36
+ **“Work”** shall mean the work of authorship, whether in Source or Object form,
37
+ made available under the License, as indicated by a copyright notice that is
38
+ included in or attached to the work (an example is provided in the Appendix
39
+ below).
40
+
41
+ **“Derivative Works”** shall mean any work, whether in Source or Object form,
42
+ that is based on (or derived from) the Work and for which the editorial
43
+ revisions, annotations, elaborations, or other modifications represent, as a
44
+ whole, an original work of authorship. For the purposes of this License,
45
+ Derivative Works shall not include works that remain separable from, or merely
46
+ link (or bind by name) to the interfaces of, the Work and Derivative Works
47
+ thereof.
48
+
49
+ **“Contribution”** shall mean any work of authorship, including the original
50
+ version of the Work and any modifications or additions to that Work or
51
+ Derivative Works thereof, that is intentionally submitted to Licensor for
52
+ inclusion in the Work by the copyright owner or by an individual or Legal Entity
53
+ authorized to submit on behalf of the copyright owner. For the purposes of this
54
+ definition, **“submitted”** means any form of electronic, verbal, or written
55
+ communication sent to the Licensor or its representatives, including but not
56
+ limited to communication on electronic mailing lists, source code control
57
+ systems, and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but excluding
59
+ communication that is conspicuously marked or otherwise designated in writing by
60
+ the copyright owner as **“Not a Contribution.”**
61
+
62
+ **“Contributor”** shall mean Licensor and any individual or Legal Entity on
63
+ behalf of whom a Contribution has been received by Licensor and subsequently
64
+ incorporated within the Work.
65
+
66
+ ### 2. Grant of Copyright License.
67
+
68
+ Subject to the terms and conditions of this License, each Contributor hereby
69
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
70
+ irrevocable copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the Work and such
72
+ Derivative Works in Source or Object form.
73
+
74
+ ### 3. Grant of Patent License.
75
+
76
+ Subject to the terms and conditions of this License, each Contributor hereby
77
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
78
+ irrevocable (except as stated in this section) patent license to make, have
79
+ made, use, offer to sell, sell, import, and otherwise transfer the Work, where
80
+ such license applies only to those patent claims licensable by such Contributor
81
+ that are necessarily infringed by their Contribution(s) alone or by combination
82
+ of their Contribution(s) with the Work to which such Contribution(s) was
83
+ submitted. If You institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work or a
85
+ Contribution incorporated within the Work constitutes direct or contributory
86
+ patent infringement, then any patent licenses granted to You under this License
87
+ for that Work shall terminate as of the date such litigation is filed.
88
+
89
+ ### 4. Redistribution.
90
+
91
+ You may reproduce and distribute copies of the Work or Derivative Works thereof
92
+ in any medium, with or without modifications, and in Source or Object form,
93
+ provided that You meet the following conditions:
94
+
95
+ * **(a)** You must give any other recipients of the Work or Derivative Works a
96
+ copy of this License; and
97
+
98
+ * **(b)** You must cause any modified files to carry prominent notices stating
99
+ that You changed the files; and
100
+
101
+ * **(c)** You must retain, in the Source form of any Derivative Works that You
102
+ distribute, all copyright, patent, trademark, and attribution notices from the
103
+ Source form of the Work, excluding those notices that do not pertain to any part
104
+ of the Derivative Works; and
105
+
106
+ * **(d)** If the Work includes a **“NOTICE”** text file as part of its
107
+ distribution, then any Derivative Works that You distribute must include a
108
+ readable copy of the attribution notices contained within such NOTICE file,
109
+ excluding those notices that do not pertain to any part of the Derivative Works,
110
+ in at least one of the following places: within a NOTICE text file distributed
111
+ as part of the Derivative Works; within the Source form or documentation, if
112
+ provided along with the Derivative Works; or, within a display generated by the
113
+ Derivative Works, if and wherever such third-party notices normally appear. The
114
+ contents of the NOTICE file are for informational purposes only and do not
115
+ modify the License. You may add Your own attribution notices within Derivative
116
+ Works that You distribute, alongside or as an addendum to the NOTICE text from
117
+ the Work, provided that such additional attribution notices cannot be construed
118
+ as modifying the License.
119
+
120
+ You may add Your own copyright statement to Your modifications and may provide
121
+ additional or different license terms and conditions for use, reproduction, or
122
+ distribution of Your modifications, or for any such Derivative Works as a whole,
123
+ provided Your use, reproduction, and distribution of the Work otherwise complies
124
+ with the conditions stated in this License.
125
+
126
+ ### 5. Submission of Contributions.
127
+
128
+ Unless You explicitly state otherwise, any Contribution intentionally submitted
129
+ for inclusion in the Work by You to the Licensor shall be under the terms and
130
+ conditions of this License, without any additional terms or conditions.
131
+ Notwithstanding the above, nothing herein shall supersede or modify the terms of
132
+ any separate license agreement you may have executed with Licensor regarding
133
+ such Contributions.
134
+
135
+ ### 6. Trademarks.
136
+
137
+ This License does not grant permission to use the trade names, trademarks,
138
+ service marks, or product names of the Licensor, except as required for
139
+ reasonable and customary use in describing the origin of the Work and
140
+ reproducing the content of the NOTICE file.
141
+
142
+ ### 7. Disclaimer of Warranty.
143
+
144
+ Unless required by applicable law or agreed to in writing, Licensor provides the
145
+ Work (and each Contributor provides its Contributions) on an **“AS IS”** BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
147
+ including, without limitation, any warranties or conditions of TITLE,
148
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
149
+ solely responsible for determining the appropriateness of using or
150
+ redistributing the Work and assume any risks associated with Your exercise of
151
+ permissions under this License.
152
+
153
+ ### 8. Limitation of Liability.
154
+
155
+ In no event and under no legal theory, whether in tort (including negligence),
156
+ contract, or otherwise, unless required by applicable law (such as deliberate
157
+ and grossly negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special, incidental,
159
+ or consequential damages of any character arising as a result of this License or
160
+ out of the use or inability to use the Work (including but not limited to
161
+ damages for loss of goodwill, work stoppage, computer failure or malfunction, or
162
+ any and all other commercial damages or losses), even if such Contributor has
163
+ been advised of the possibility of such damages.
164
+
165
+ ### 9. Accepting Warranty or Additional Liability.
166
+
167
+ While redistributing the Work or Derivative Works thereof, You may choose to
168
+ offer, and charge a fee for, acceptance of support, warranty, indemnity, or
169
+ other liability obligations and/or rights consistent with this License. However,
170
+ in accepting such obligations, You may act only on Your own behalf and on Your
171
+ sole responsibility, not on behalf of any other Contributor, and only if You
172
+ agree to indemnify, defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason of your
174
+ accepting any such warranty or additional liability.
175
+
176
+ #### END OF TERMS AND CONDITIONS
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # @borela-tech/eslint-config
2
+
3
+ Shared ESLint configuration for Borela Tech projects.
4
+
5
+ ## Features
6
+
7
+ - Preconfigured ESLint rules
8
+ - Includes recommended rules from:
9
+ - ESLint
10
+ - TypeScript
11
+ - React (if applicable)
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install --save-dev @borela-tech/eslint-config
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ Create a file named `eslint.config.ts` in the root of your project and add the
22
+ following code:
23
+
24
+ ```typescript
25
+ import {CONFIG} from '@borela-tech/eslint-config'
26
+ export default CONFIG
27
+ ```
@@ -0,0 +1,5 @@
1
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
2
+
3
+ declare const CONFIG: _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
4
+
5
+ export { CONFIG };
package/dist/index.mjs ADDED
@@ -0,0 +1,88 @@
1
+ // src/index.ts
2
+ import eslint from "@eslint/js";
3
+ import react from "eslint-plugin-react";
4
+ import reactHooks from "eslint-plugin-react-hooks";
5
+ import stylistic from "@stylistic/eslint-plugin";
6
+ import typescript from "typescript-eslint";
7
+ var CONFIG = typescript.config(
8
+ {
9
+ ignores: [
10
+ "src/graphql/sdk.ts",
11
+ "**/node_modules/**",
12
+ "**/dist/**"
13
+ ],
14
+ settings: {
15
+ react: {
16
+ version: "19"
17
+ }
18
+ }
19
+ },
20
+ eslint.configs.recommended,
21
+ react.configs.flat.recommended,
22
+ stylistic.configs.recommended,
23
+ typescript.configs.recommended,
24
+ typescript.configs.stylistic,
25
+ {
26
+ plugins: {
27
+ "react-hooks": reactHooks
28
+ },
29
+ rules: reactHooks.configs.recommended.rules
30
+ },
31
+ {
32
+ rules: {
33
+ "capitalized-comments": [
34
+ "error",
35
+ "always",
36
+ { ignoreConsecutiveComments: true }
37
+ ],
38
+ "react/react-in-jsx-scope": "off",
39
+ "@stylistic/arrow-parens": [
40
+ "error",
41
+ "as-needed"
42
+ ],
43
+ "@stylistic/brace-style": [
44
+ "error",
45
+ "1tbs",
46
+ { allowSingleLine: true }
47
+ ],
48
+ "@stylistic/indent": [
49
+ "error",
50
+ 2,
51
+ { ignoredNodes: ["TSMappedType > *"] }
52
+ ],
53
+ "@stylistic/jsx-tag-spacing": [
54
+ "error",
55
+ {
56
+ afterOpening: "never",
57
+ beforeClosing: "never",
58
+ beforeSelfClosing: "never",
59
+ closingSlash: "never"
60
+ }
61
+ ],
62
+ "@stylistic/jsx-wrap-multilines": "off",
63
+ "@stylistic/lines-between-class-members": "off",
64
+ "@stylistic/object-curly-spacing": [
65
+ "error",
66
+ "never"
67
+ ],
68
+ "@stylistic/operator-linebreak": [
69
+ "error",
70
+ "before",
71
+ { overrides: { "=": "after" } }
72
+ ],
73
+ "@stylistic/quote-props": [
74
+ "error",
75
+ "as-needed"
76
+ ],
77
+ "@typescript-eslint/member-ordering": [
78
+ "error",
79
+ { default: { order: "natural" } }
80
+ ],
81
+ "@typescript-eslint/consistent-indexed-object-style": "off"
82
+ }
83
+ }
84
+ );
85
+ export {
86
+ CONFIG
87
+ };
88
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import eslint from '@eslint/js'\nimport react from 'eslint-plugin-react'\nimport reactHooks from 'eslint-plugin-react-hooks'\nimport stylistic from '@stylistic/eslint-plugin'\nimport typescript from 'typescript-eslint'\n\nexport const CONFIG = typescript.config(\n {\n ignores: [\n 'src/graphql/sdk.ts',\n '**/node_modules/**',\n '**/dist/**',\n ],\n settings: {\n react: {\n version: '19',\n },\n },\n },\n eslint.configs.recommended,\n react.configs.flat.recommended,\n stylistic.configs.recommended,\n typescript.configs.recommended,\n typescript.configs.stylistic,\n {\n plugins: {\n 'react-hooks': reactHooks,\n },\n rules: reactHooks.configs.recommended.rules,\n },\n {\n rules: {\n 'capitalized-comments': [\n 'error',\n 'always',\n {ignoreConsecutiveComments: true},\n ],\n 'react/react-in-jsx-scope': 'off',\n '@stylistic/arrow-parens': [\n 'error',\n 'as-needed',\n ],\n '@stylistic/brace-style': [\n 'error',\n '1tbs',\n {allowSingleLine: true},\n ],\n '@stylistic/indent': [\n 'error',\n 2,\n {ignoredNodes: ['TSMappedType > *']},\n ],\n '@stylistic/jsx-tag-spacing': [\n 'error',\n {\n afterOpening: 'never',\n beforeClosing: 'never',\n beforeSelfClosing: 'never',\n closingSlash: 'never',\n },\n ],\n '@stylistic/jsx-wrap-multilines': 'off',\n '@stylistic/lines-between-class-members': 'off',\n '@stylistic/object-curly-spacing': [\n 'error',\n 'never',\n ],\n '@stylistic/operator-linebreak': [\n 'error',\n 'before',\n {overrides: {'=': 'after'}},\n ],\n '@stylistic/quote-props': [\n 'error',\n 'as-needed',\n ],\n '@typescript-eslint/member-ordering': [\n 'error',\n {default: {order: 'natural'}},\n ],\n '@typescript-eslint/consistent-indexed-object-style': 'off',\n },\n },\n)\n"],"mappings":";AAAA,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AAEhB,IAAM,SAAS,WAAW;AAAA,EAC/B;AAAA,IACE,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,OAAO,QAAQ;AAAA,EACf,MAAM,QAAQ,KAAK;AAAA,EACnB,UAAU,QAAQ;AAAA,EAClB,WAAW,QAAQ;AAAA,EACnB,WAAW,QAAQ;AAAA,EACnB;AAAA,IACE,SAAS;AAAA,MACP,eAAe;AAAA,IACjB;AAAA,IACA,OAAO,WAAW,QAAQ,YAAY;AAAA,EACxC;AAAA,EACA;AAAA,IACE,OAAO;AAAA,MACL,wBAAwB;AAAA,QACtB;AAAA,QACA;AAAA,QACA,EAAC,2BAA2B,KAAI;AAAA,MAClC;AAAA,MACA,4BAA4B;AAAA,MAC5B,2BAA2B;AAAA,QACzB;AAAA,QACA;AAAA,MACF;AAAA,MACA,0BAA0B;AAAA,QACxB;AAAA,QACA;AAAA,QACA,EAAC,iBAAiB,KAAI;AAAA,MACxB;AAAA,MACA,qBAAqB;AAAA,QACnB;AAAA,QACA;AAAA,QACA,EAAC,cAAc,CAAC,kBAAkB,EAAC;AAAA,MACrC;AAAA,MACA,8BAA8B;AAAA,QAC5B;AAAA,QACA;AAAA,UACE,cAAc;AAAA,UACd,eAAe;AAAA,UACf,mBAAmB;AAAA,UACnB,cAAc;AAAA,QAChB;AAAA,MACF;AAAA,MACA,kCAAkC;AAAA,MAClC,0CAA0C;AAAA,MAC1C,mCAAmC;AAAA,QACjC;AAAA,QACA;AAAA,MACF;AAAA,MACA,iCAAiC;AAAA,QAC/B;AAAA,QACA;AAAA,QACA,EAAC,WAAW,EAAC,KAAK,QAAO,EAAC;AAAA,MAC5B;AAAA,MACA,0BAA0B;AAAA,QACxB;AAAA,QACA;AAAA,MACF;AAAA,MACA,sCAAsC;AAAA,QACpC;AAAA,QACA,EAAC,SAAS,EAAC,OAAO,UAAS,EAAC;AAAA,MAC9B;AAAA,MACA,sDAAsD;AAAA,IACxD;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,2 @@
1
+ import {CONFIG} from './src'
2
+ export default CONFIG
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@borela-tech/eslint-config",
3
+ "version": "1.0.0",
4
+ "description": "ESLint config used in Borela Tech projects.",
5
+ "main": "eslint.config.ts",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/borela-tech/eslint-config.git"
9
+ },
10
+ "keywords": [
11
+ "borela",
12
+ "borela-tech",
13
+ "config",
14
+ "eslint",
15
+ "tech"
16
+ ],
17
+ "author": {
18
+ "name": "Alexandre Borela",
19
+ "email": "alexandre@borela.tech"
20
+ },
21
+ "license": "Apache-2.0",
22
+ "exports": {
23
+ "./package.json": "./package.json",
24
+ ".": {
25
+ "types": "./dist/index.d.mts",
26
+ "import": "./dist/index.mjs"
27
+ }
28
+ },
29
+ "dependencies": {
30
+ "@eslint/js": "^9.24.0",
31
+ "@stylistic/eslint-plugin": "^4.2.0",
32
+ "eslint": "^9.24.0",
33
+ "eslint-plugin-react": "^7.37.5",
34
+ "eslint-plugin-react-hooks": "^5.2.0",
35
+ "typescript-eslint": "^8.29.1"
36
+ },
37
+ "devDependencies": {
38
+ "jiti": "^2.4.2",
39
+ "tsup": "^8.3.5",
40
+ "typescript": "^5.8.3"
41
+ }
42
+ }