@fullstacksjs/eslint-config 11.1.22 → 11.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.
@@ -22,17 +22,26 @@ function perfectionist() {
22
22
  'perfectionist/sort-exports': 'warn',
23
23
  'perfectionist/sort-imports': ['warn', {}],
24
24
  'perfectionist/sort-interfaces': 'off',
25
- 'perfectionist/sort-intersection-types': 'warn',
26
- 'perfectionist/sort-jsx-props': 'warn',
27
- 'perfectionist/sort-maps': 'warn',
25
+ 'perfectionist/sort-intersection-types': ['warn', {
26
+ groups: ['conditional', 'function', 'import', 'intersection', 'keyword', 'literal', 'named', 'object', 'operator', 'tuple', 'union', 'nullish']
27
+ }],
28
+ 'perfectionist/sort-jsx-props': ['warn', {
29
+ groups: ['shorthand', 'unknown', 'callback', 'multiline'],
30
+ customGroups: {
31
+ callback: 'on*'
32
+ }
33
+ }],
34
+ 'perfectionist/sort-maps': 'off',
28
35
  'perfectionist/sort-named-exports': 'warn',
29
36
  'perfectionist/sort-named-imports': 'warn',
30
37
  'perfectionist/sort-object-types': 'off',
31
38
  'perfectionist/sort-objects': 'off',
32
39
  'perfectionist/sort-sets': 'warn',
33
40
  'perfectionist/sort-svelte-attributes': 'warn',
34
- 'perfectionist/sort-switch-case': 'warn',
35
- 'perfectionist/sort-union-types': 'warn',
41
+ 'perfectionist/sort-switch-case': 'off',
42
+ 'perfectionist/sort-union-types': ['warn', {
43
+ groups: ['conditional', 'function', 'import', 'intersection', 'keyword', 'literal', 'named', 'object', 'operator', 'tuple', 'union', 'nullish']
44
+ }],
36
45
  'perfectionist/sort-variable-declarations': 'warn',
37
46
  'perfectionist/sort-vue-attributes': 'warn'
38
47
  }
@@ -24,7 +24,7 @@ function react() {
24
24
  },
25
25
  rules: {
26
26
  '@eslint-react/dom/no-children-in-void-dom-elements': 'warn',
27
- '@eslint-react/dom/no-dangerously-set-innerhtml': 'warn',
27
+ '@eslint-react/dom/no-dangerously-set-innerhtml': 'off',
28
28
  '@eslint-react/dom/no-dangerously-set-innerhtml-with-children': 'error',
29
29
  '@eslint-react/dom/no-find-dom-node': 'error',
30
30
  '@eslint-react/dom/no-missing-button-type': 'warn',
@@ -6,12 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
 
7
7
  /** @return { Promise<import('eslint').Linter.Config> } */
8
8
  async function tailwind() {
9
- const {
10
- default: tailwindcss
11
- } = await Promise.resolve().then(() => require('eslint-plugin-tailwindcss'));
9
+ const plugin = await Promise.resolve().then(() => require('eslint-plugin-tailwindcss'));
12
10
  return {
13
11
  plugins: {
14
- tailwindcss
12
+ tailwindcss: plugin.default ?? plugin
15
13
  },
16
14
  rules: {
17
15
  'tailwindcss/classnames-order': 'warn',
@@ -247,6 +247,7 @@ function typescript(options = {}) {
247
247
  // Need useless-fragment for JSX return type
248
248
 
249
249
  // Conflicts with @typescript-eslint
250
+ 'default-case': 'off',
250
251
  'import/named': 'off',
251
252
  'import/namespace': 'off',
252
253
  'import/default': 'off',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "11.1.22",
3
+ "version": "11.2.0",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
@@ -14,17 +14,59 @@ function perfectionist() {
14
14
  'perfectionist/sort-exports': 'warn',
15
15
  'perfectionist/sort-imports': ['warn', {}],
16
16
  'perfectionist/sort-interfaces': 'off',
17
- 'perfectionist/sort-intersection-types': 'warn',
18
- 'perfectionist/sort-jsx-props': 'warn',
19
- 'perfectionist/sort-maps': 'warn',
17
+ 'perfectionist/sort-intersection-types': [
18
+ 'warn',
19
+ {
20
+ groups: [
21
+ 'conditional',
22
+ 'function',
23
+ 'import',
24
+ 'intersection',
25
+ 'keyword',
26
+ 'literal',
27
+ 'named',
28
+ 'object',
29
+ 'operator',
30
+ 'tuple',
31
+ 'union',
32
+ 'nullish',
33
+ ],
34
+ },
35
+ ],
36
+ 'perfectionist/sort-jsx-props': [
37
+ 'warn',
38
+ {
39
+ groups: ['shorthand', 'unknown', 'callback', 'multiline'],
40
+ customGroups: { callback: 'on*' },
41
+ },
42
+ ],
43
+ 'perfectionist/sort-maps': 'off',
20
44
  'perfectionist/sort-named-exports': 'warn',
21
45
  'perfectionist/sort-named-imports': 'warn',
22
46
  'perfectionist/sort-object-types': 'off',
23
47
  'perfectionist/sort-objects': 'off',
24
48
  'perfectionist/sort-sets': 'warn',
25
49
  'perfectionist/sort-svelte-attributes': 'warn',
26
- 'perfectionist/sort-switch-case': 'warn',
27
- 'perfectionist/sort-union-types': 'warn',
50
+ 'perfectionist/sort-switch-case': 'off',
51
+ 'perfectionist/sort-union-types': [
52
+ 'warn',
53
+ {
54
+ groups: [
55
+ 'conditional',
56
+ 'function',
57
+ 'import',
58
+ 'intersection',
59
+ 'keyword',
60
+ 'literal',
61
+ 'named',
62
+ 'object',
63
+ 'operator',
64
+ 'tuple',
65
+ 'union',
66
+ 'nullish',
67
+ ],
68
+ },
69
+ ],
28
70
  'perfectionist/sort-variable-declarations': 'warn',
29
71
  'perfectionist/sort-vue-attributes': 'warn',
30
72
  },
@@ -18,7 +18,7 @@ function react() {
18
18
  },
19
19
  rules: {
20
20
  '@eslint-react/dom/no-children-in-void-dom-elements': 'warn',
21
- '@eslint-react/dom/no-dangerously-set-innerhtml': 'warn',
21
+ '@eslint-react/dom/no-dangerously-set-innerhtml': 'off',
22
22
  '@eslint-react/dom/no-dangerously-set-innerhtml-with-children': 'error',
23
23
  '@eslint-react/dom/no-find-dom-node': 'error',
24
24
  '@eslint-react/dom/no-missing-button-type': 'warn',
@@ -1,8 +1,8 @@
1
1
  /** @return { Promise<import('eslint').Linter.Config> } */
2
2
  async function tailwind() {
3
- const { default: tailwindcss } = await import('eslint-plugin-tailwindcss');
3
+ const plugin = await import('eslint-plugin-tailwindcss');
4
4
  return {
5
- plugins: { tailwindcss },
5
+ plugins: { tailwindcss: plugin.default ?? plugin },
6
6
  rules: {
7
7
  'tailwindcss/classnames-order': 'warn',
8
8
  'tailwindcss/enforces-negative-arbitrary-values': 'warn',
@@ -214,6 +214,7 @@ function typescript(options = {}) {
214
214
  'react/jsx-no-useless-fragment': 'off', // Need useless-fragment for JSX return type
215
215
 
216
216
  // Conflicts with @typescript-eslint
217
+ 'default-case': 'off',
217
218
  'import/named': 'off',
218
219
  'import/namespace': 'off',
219
220
  'import/default': 'off',