@borela-tech/eslint-config 1.1.1 → 1.2.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.
@@ -40,9 +40,21 @@ var CONFIG = typescript.config(
40
40
  "error",
41
41
  "as-needed"
42
42
  ],
43
+ "@stylistic/array-bracket-newline": [
44
+ "error",
45
+ "consistent"
46
+ ],
47
+ "@stylistic/array-bracket-spacing": [
48
+ "error",
49
+ "never"
50
+ ],
51
+ "@stylistic/array-element-newline": [
52
+ "error",
53
+ "consistent"
54
+ ],
43
55
  "@stylistic/brace-style": [
44
56
  "error",
45
- "1tbs",
57
+ "stroustrup",
46
58
  { allowSingleLine: true }
47
59
  ],
48
60
  "@stylistic/indent": [
@@ -61,6 +73,10 @@ var CONFIG = typescript.config(
61
73
  ],
62
74
  "@stylistic/jsx-wrap-multilines": "off",
63
75
  "@stylistic/lines-between-class-members": "off",
76
+ "@stylistic/object-curly-newline": [
77
+ "error",
78
+ { consistent: true }
79
+ ],
64
80
  "@stylistic/object-curly-spacing": [
65
81
  "error",
66
82
  "never"
@@ -70,14 +86,21 @@ var CONFIG = typescript.config(
70
86
  "before",
71
87
  { overrides: { "=": "after" } }
72
88
  ],
89
+ "@stylistic/quotes": [
90
+ "error",
91
+ "single",
92
+ { avoidEscape: true }
93
+ ],
73
94
  "@stylistic/quote-props": [
74
95
  "error",
75
96
  "as-needed"
76
97
  ],
77
- "@typescript-eslint/member-ordering": [
98
+ "@stylistic/semi": [
78
99
  "error",
79
- { default: { order: "natural" } }
100
+ "never",
101
+ { beforeStatementContinuationChars: "always" }
80
102
  ],
103
+ "@typescript-eslint/no-empty-function": "off",
81
104
  "@typescript-eslint/consistent-indexed-object-style": "off"
82
105
  }
83
106
  }
@@ -85,4 +108,4 @@ var CONFIG = typescript.config(
85
108
  export {
86
109
  CONFIG
87
110
  };
88
- //# sourceMappingURL=index.mjs.map
111
+ //# sourceMappingURL=index.js.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/array-bracket-newline': [\n 'error',\n 'consistent',\n ],\n '@stylistic/array-bracket-spacing': [\n 'error',\n 'never',\n ],\n '@stylistic/array-element-newline': [\n 'error',\n 'consistent',\n ],\n '@stylistic/brace-style': [\n 'error',\n 'stroustrup',\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-newline': [\n 'error',\n {consistent: true},\n ],\n '@stylistic/object-curly-spacing': [\n 'error',\n 'never',\n ],\n '@stylistic/operator-linebreak': [\n 'error',\n 'before',\n {overrides: {'=': 'after'}},\n ],\n '@stylistic/quotes': [\n 'error',\n 'single',\n {avoidEscape: true},\n ],\n '@stylistic/quote-props': [\n 'error',\n 'as-needed',\n ],\n '@stylistic/semi': [\n 'error',\n 'never',\n {beforeStatementContinuationChars: 'always'},\n ],\n '@typescript-eslint/no-empty-function': 'off',\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,oCAAoC;AAAA,QAClC;AAAA,QACA;AAAA,MACF;AAAA,MACA,oCAAoC;AAAA,QAClC;AAAA,QACA;AAAA,MACF;AAAA,MACA,oCAAoC;AAAA,QAClC;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,EAAC,YAAY,KAAI;AAAA,MACnB;AAAA,MACA,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,qBAAqB;AAAA,QACnB;AAAA,QACA;AAAA,QACA,EAAC,aAAa,KAAI;AAAA,MACpB;AAAA,MACA,0BAA0B;AAAA,QACxB;AAAA,QACA;AAAA,MACF;AAAA,MACA,mBAAmB;AAAA,QACjB;AAAA,QACA;AAAA,QACA,EAAC,kCAAkC,SAAQ;AAAA,MAC7C;AAAA,MACA,wCAAwC;AAAA,MACxC,sDAAsD;AAAA,IACxD;AAAA,EACF;AACF;","names":[]}
package/package.json CHANGED
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "name": "@borela-tech/eslint-config",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "ESLint config used in Borela Tech projects.",
5
- "main": "eslint.config.ts",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "exports": {
8
+ "import": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ }
12
+ },
6
13
  "repository": {
7
14
  "type": "git",
8
15
  "url": "git+https://github.com/borela-tech/eslint-config.git"
@@ -19,12 +26,6 @@
19
26
  "email": "alexandre@borela.tech"
20
27
  },
21
28
  "license": "Apache-2.0",
22
- "exports": {
23
- "import": {
24
- "types": "./dist/index.d.mts",
25
- "default": "./dist/index.mjs"
26
- }
27
- },
28
29
  "dependencies": {
29
30
  "@eslint/js": "^9.24.0",
30
31
  "@stylistic/eslint-plugin": "^4.2.0",
package/src/index.ts ADDED
@@ -0,0 +1,107 @@
1
+ import eslint from '@eslint/js'
2
+ import react from 'eslint-plugin-react'
3
+ import reactHooks from 'eslint-plugin-react-hooks'
4
+ import stylistic from '@stylistic/eslint-plugin'
5
+ import typescript from 'typescript-eslint'
6
+
7
+ export const 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/array-bracket-newline': [
44
+ 'error',
45
+ 'consistent',
46
+ ],
47
+ '@stylistic/array-bracket-spacing': [
48
+ 'error',
49
+ 'never',
50
+ ],
51
+ '@stylistic/array-element-newline': [
52
+ 'error',
53
+ 'consistent',
54
+ ],
55
+ '@stylistic/brace-style': [
56
+ 'error',
57
+ 'stroustrup',
58
+ {allowSingleLine: true},
59
+ ],
60
+ '@stylistic/indent': [
61
+ 'error',
62
+ 2,
63
+ {ignoredNodes: ['TSMappedType > *']},
64
+ ],
65
+ '@stylistic/jsx-tag-spacing': [
66
+ 'error',
67
+ {
68
+ afterOpening: 'never',
69
+ beforeClosing: 'never',
70
+ beforeSelfClosing: 'never',
71
+ closingSlash: 'never',
72
+ },
73
+ ],
74
+ '@stylistic/jsx-wrap-multilines': 'off',
75
+ '@stylistic/lines-between-class-members': 'off',
76
+ '@stylistic/object-curly-newline': [
77
+ 'error',
78
+ {consistent: true},
79
+ ],
80
+ '@stylistic/object-curly-spacing': [
81
+ 'error',
82
+ 'never',
83
+ ],
84
+ '@stylistic/operator-linebreak': [
85
+ 'error',
86
+ 'before',
87
+ {overrides: {'=': 'after'}},
88
+ ],
89
+ '@stylistic/quotes': [
90
+ 'error',
91
+ 'single',
92
+ {avoidEscape: true},
93
+ ],
94
+ '@stylistic/quote-props': [
95
+ 'error',
96
+ 'as-needed',
97
+ ],
98
+ '@stylistic/semi': [
99
+ 'error',
100
+ 'never',
101
+ {beforeStatementContinuationChars: 'always'},
102
+ ],
103
+ '@typescript-eslint/no-empty-function': 'off',
104
+ '@typescript-eslint/consistent-indexed-object-style': 'off',
105
+ },
106
+ },
107
+ )
@@ -1 +0,0 @@
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":[]}
package/eslint.config.ts DELETED
@@ -1,2 +0,0 @@
1
- import {CONFIG} from './src'
2
- export default CONFIG
File without changes