@santi020k/eslint-config-santi020k 1.1.5 → 1.1.7

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.
@@ -41,7 +41,7 @@ const groups = [
41
41
  // Style imports.
42
42
  ["^.+\\.?(css)$"]
43
43
  ];
44
- const rules$3 = {
44
+ const rules$5 = {
45
45
  "unused-imports/no-unused-imports": "warn",
46
46
  "@stylistic/indent": ["warn", 2],
47
47
  "@stylistic/quote-props": ["warn", "as-needed"],
@@ -62,17 +62,17 @@ const rules$3 = {
62
62
  "@stylistic/member-delimiter-style": ["error", {
63
63
  multiline: {
64
64
  delimiter: "none",
65
- requireLast: true
65
+ requireLast: false
66
66
  },
67
67
  singleline: {
68
68
  delimiter: "comma",
69
- requireLast: true
69
+ requireLast: false
70
70
  },
71
71
  overrides: {
72
72
  interface: {
73
73
  multiline: {
74
74
  delimiter: "none",
75
- requireLast: true
75
+ requireLast: false
76
76
  }
77
77
  }
78
78
  }
@@ -153,7 +153,8 @@ const rules$3 = {
153
153
  "no-useless-constructor": "warn",
154
154
  "no-new": "warn",
155
155
  "prefer-regex-literals": "warn",
156
- "@stylistic/multiline-comment-style": "off"
156
+ "@stylistic/multiline-comment-style": "off",
157
+ "space-before-function-paren": "off"
157
158
  };
158
159
 
159
160
  const languageOptions$1 = {
@@ -184,7 +185,7 @@ const jsConfig = [
184
185
  rules: {
185
186
  ...configStandard.rules,
186
187
  ...pluginSonarJs.configs.recommended.rules,
187
- "import/first": 0
188
+ "import/first": "off"
188
189
  }
189
190
  },
190
191
  {
@@ -195,12 +196,12 @@ const jsConfig = [
195
196
  name: "custom",
196
197
  languageOptions: languageOptions$1,
197
198
  files: ["**/*.{js,jsx,mjs,cjs}"],
198
- rules: rules$3
199
+ rules: rules$5
199
200
  }
200
201
  ];
201
202
 
202
- const rules$2 = {
203
- ...rules$3,
203
+ const rules$4 = {
204
+ ...rules$5,
204
205
  "react/react-in-jsx-scope": "off",
205
206
  "react/jsx-max-depth": ["warn", { max: 7 }],
206
207
  "react/prop-types": "off",
@@ -277,7 +278,7 @@ const reactConfig = [
277
278
  ...configStandard.rules,
278
279
  ...pluginSonarJs.configs.recommended.rules,
279
280
  ...pluginReactHooks.configs.recommended.rules,
280
- ...rules$2
281
+ ...rules$4
281
282
  }
282
283
  }
283
284
  ];
@@ -305,17 +306,17 @@ const astroConfig = [
305
306
  "mdx/language-mapper": {}
306
307
  },
307
308
  rules: {
308
- "max-len": 0,
309
- "react/react-in-jsx-scope": 0
309
+ "max-len": "off",
310
+ "react/react-in-jsx-scope": "off"
310
311
  }
311
312
  }
312
313
  ]
313
314
  }))
314
315
  ];
315
316
 
316
- const rules$1 = {
317
- ...rules$3,
318
- "@typescript-eslint/indent": 0,
317
+ const rules$3 = {
318
+ ...rules$5,
319
+ "@typescript-eslint/indent": "off",
319
320
  "@typescript-eslint/no-unused-vars": [
320
321
  "warn",
321
322
  {
@@ -348,13 +349,22 @@ const tsConfig = [
348
349
  {
349
350
  name: "custom-ts",
350
351
  files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
351
- rules: rules$1
352
+ rules: rules$3
352
353
  }
353
354
  ];
354
355
 
356
+ const rules$2 = {
357
+ ...rules$3,
358
+ ...rules$4
359
+ };
360
+
355
361
  const reactTsConfig = [
356
362
  ...reactConfig,
357
- ...tsConfig
363
+ ...tsConfig,
364
+ {
365
+ name: "custom-react-ts",
366
+ rules: rules$2
367
+ }
358
368
  ];
359
369
 
360
370
  const astroTsConfig = [
@@ -366,13 +376,14 @@ const astroTsConfig = [
366
376
  parser: "astro-eslint-parser",
367
377
  plugins: ["@typescript-eslint"],
368
378
  rules: {
369
- "@typescript-eslint/strict-boolean-expressions": 0
379
+ "@typescript-eslint/strict-boolean-expressions": "off"
370
380
  }
371
381
  }]
372
382
  }))
373
383
  ];
374
384
 
375
- const rules = {
385
+ const rules$1 = {
386
+ ...rules$4,
376
387
  "simple-import-sort/imports": [
377
388
  "warn",
378
389
  {
@@ -391,13 +402,32 @@ const nextConfig = [
391
402
  ...compat.fixupConfigRules(flatCompat.extends("plugin:@next/next/core-web-vitals")),
392
403
  {
393
404
  name: "custom-next",
394
- rules
405
+ rules: rules$1
395
406
  }
396
407
  ];
397
408
 
409
+ const rules = {
410
+ ...rules$4,
411
+ "simple-import-sort/imports": [
412
+ "warn",
413
+ {
414
+ groups: [
415
+ // Packages `react` related packages come first.
416
+ ["^react"],
417
+ ["^next"],
418
+ ...groups
419
+ ]
420
+ }
421
+ ]
422
+ };
423
+
398
424
  const nextTsConfig = [
399
425
  ...reactTsConfig,
400
- ...nextConfig
426
+ ...nextConfig,
427
+ {
428
+ name: "custom-next-ts",
429
+ rules
430
+ }
401
431
  ];
402
432
 
403
433
  exports.astroEslint = astroConfig;
@@ -39,7 +39,7 @@ const groups = [
39
39
  // Style imports.
40
40
  ["^.+\\.?(css)$"]
41
41
  ];
42
- const rules$3 = {
42
+ const rules$5 = {
43
43
  "unused-imports/no-unused-imports": "warn",
44
44
  "@stylistic/indent": ["warn", 2],
45
45
  "@stylistic/quote-props": ["warn", "as-needed"],
@@ -60,17 +60,17 @@ const rules$3 = {
60
60
  "@stylistic/member-delimiter-style": ["error", {
61
61
  multiline: {
62
62
  delimiter: "none",
63
- requireLast: true
63
+ requireLast: false
64
64
  },
65
65
  singleline: {
66
66
  delimiter: "comma",
67
- requireLast: true
67
+ requireLast: false
68
68
  },
69
69
  overrides: {
70
70
  interface: {
71
71
  multiline: {
72
72
  delimiter: "none",
73
- requireLast: true
73
+ requireLast: false
74
74
  }
75
75
  }
76
76
  }
@@ -151,7 +151,8 @@ const rules$3 = {
151
151
  "no-useless-constructor": "warn",
152
152
  "no-new": "warn",
153
153
  "prefer-regex-literals": "warn",
154
- "@stylistic/multiline-comment-style": "off"
154
+ "@stylistic/multiline-comment-style": "off",
155
+ "space-before-function-paren": "off"
155
156
  };
156
157
 
157
158
  const languageOptions$1 = {
@@ -182,7 +183,7 @@ const jsConfig = [
182
183
  rules: {
183
184
  ...configStandard.rules,
184
185
  ...pluginSonarJs.configs.recommended.rules,
185
- "import/first": 0
186
+ "import/first": "off"
186
187
  }
187
188
  },
188
189
  {
@@ -193,12 +194,12 @@ const jsConfig = [
193
194
  name: "custom",
194
195
  languageOptions: languageOptions$1,
195
196
  files: ["**/*.{js,jsx,mjs,cjs}"],
196
- rules: rules$3
197
+ rules: rules$5
197
198
  }
198
199
  ];
199
200
 
200
- const rules$2 = {
201
- ...rules$3,
201
+ const rules$4 = {
202
+ ...rules$5,
202
203
  "react/react-in-jsx-scope": "off",
203
204
  "react/jsx-max-depth": ["warn", { max: 7 }],
204
205
  "react/prop-types": "off",
@@ -275,7 +276,7 @@ const reactConfig = [
275
276
  ...configStandard.rules,
276
277
  ...pluginSonarJs.configs.recommended.rules,
277
278
  ...pluginReactHooks.configs.recommended.rules,
278
- ...rules$2
279
+ ...rules$4
279
280
  }
280
281
  }
281
282
  ];
@@ -303,17 +304,17 @@ const astroConfig = [
303
304
  "mdx/language-mapper": {}
304
305
  },
305
306
  rules: {
306
- "max-len": 0,
307
- "react/react-in-jsx-scope": 0
307
+ "max-len": "off",
308
+ "react/react-in-jsx-scope": "off"
308
309
  }
309
310
  }
310
311
  ]
311
312
  }))
312
313
  ];
313
314
 
314
- const rules$1 = {
315
- ...rules$3,
316
- "@typescript-eslint/indent": 0,
315
+ const rules$3 = {
316
+ ...rules$5,
317
+ "@typescript-eslint/indent": "off",
317
318
  "@typescript-eslint/no-unused-vars": [
318
319
  "warn",
319
320
  {
@@ -346,13 +347,22 @@ const tsConfig = [
346
347
  {
347
348
  name: "custom-ts",
348
349
  files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
349
- rules: rules$1
350
+ rules: rules$3
350
351
  }
351
352
  ];
352
353
 
354
+ const rules$2 = {
355
+ ...rules$3,
356
+ ...rules$4
357
+ };
358
+
353
359
  const reactTsConfig = [
354
360
  ...reactConfig,
355
- ...tsConfig
361
+ ...tsConfig,
362
+ {
363
+ name: "custom-react-ts",
364
+ rules: rules$2
365
+ }
356
366
  ];
357
367
 
358
368
  const astroTsConfig = [
@@ -364,13 +374,14 @@ const astroTsConfig = [
364
374
  parser: "astro-eslint-parser",
365
375
  plugins: ["@typescript-eslint"],
366
376
  rules: {
367
- "@typescript-eslint/strict-boolean-expressions": 0
377
+ "@typescript-eslint/strict-boolean-expressions": "off"
368
378
  }
369
379
  }]
370
380
  }))
371
381
  ];
372
382
 
373
- const rules = {
383
+ const rules$1 = {
384
+ ...rules$4,
374
385
  "simple-import-sort/imports": [
375
386
  "warn",
376
387
  {
@@ -389,13 +400,32 @@ const nextConfig = [
389
400
  ...fixupConfigRules(flatCompat.extends("plugin:@next/next/core-web-vitals")),
390
401
  {
391
402
  name: "custom-next",
392
- rules
403
+ rules: rules$1
393
404
  }
394
405
  ];
395
406
 
407
+ const rules = {
408
+ ...rules$4,
409
+ "simple-import-sort/imports": [
410
+ "warn",
411
+ {
412
+ groups: [
413
+ // Packages `react` related packages come first.
414
+ ["^react"],
415
+ ["^next"],
416
+ ...groups
417
+ ]
418
+ }
419
+ ]
420
+ };
421
+
396
422
  const nextTsConfig = [
397
423
  ...reactTsConfig,
398
- ...nextConfig
424
+ ...nextConfig,
425
+ {
426
+ name: "custom-next-ts",
427
+ rules
428
+ }
399
429
  ];
400
430
 
401
431
  export { astroConfig as astroEslint, astroTsConfig as astroTsEslint, jsConfig as jsEslint, nextConfig as nextEslint, nextTsConfig as nextTsEslint, reactConfig as reactEslint, reactTsConfig as reactTsEslint, tsConfig as tsEslint };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@santi020k/eslint-config-santi020k",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
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/cjs/index.cjs",
@@ -47,7 +47,7 @@
47
47
  ],
48
48
  "license": "Apache License 2.0",
49
49
  "peerDependencies": {
50
- "eslint": "^9.4.0"
50
+ "eslint": "^9.0.0"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
@@ -58,7 +58,7 @@
58
58
  "devDependencies": {
59
59
  "@rollup/plugin-node-resolve": "^15.2.3",
60
60
  "@rollup/plugin-typescript": "^11.1.6",
61
- "@types/node": "^20.13.0",
61
+ "@types/node": "^20.14.2",
62
62
  "cz-conventional-changelog": "^3.3.0",
63
63
  "esbuild": "^0.21.4",
64
64
  "husky": "^9.0.11",
@@ -68,7 +68,7 @@
68
68
  "rollup": "^4.18.0",
69
69
  "rollup-plugin-copy": "^3.5.0",
70
70
  "rollup-plugin-esbuild": "^6.1.1",
71
- "tslib": "^2.6.2",
71
+ "tslib": "^2.6.3",
72
72
  "typescript": "^5.4.5"
73
73
  },
74
74
  "dependencies": {
@@ -77,25 +77,22 @@
77
77
  "@next/eslint-plugin-next": "^14.2.3",
78
78
  "@stylistic/eslint-plugin": "^2.1.0",
79
79
  "@types/eslint__js": "^8.42.3",
80
- "@typescript-eslint/eslint-plugin": "^7.11.0",
81
- "@typescript-eslint/type-utils": "^7.11.0",
80
+ "@typescript-eslint/eslint-plugin": "^7.12.0",
81
+ "@typescript-eslint/type-utils": "^7.12.0",
82
82
  "eslint-config-standard": "^17.1.0",
83
83
  "eslint-plugin-astro": "^1.2.0",
84
84
  "eslint-plugin-import": "^2.29.1",
85
85
  "eslint-plugin-jsx-a11y": "^6.8.0",
86
86
  "eslint-plugin-mdx": "^3.1.5",
87
- "eslint-plugin-n": "^17.7.0",
87
+ "eslint-plugin-n": "^17.8.0",
88
88
  "eslint-plugin-promise": "^6.2.0",
89
89
  "eslint-plugin-react": "^7.34.2",
90
90
  "eslint-plugin-react-hooks": "^4.6.2",
91
91
  "eslint-plugin-simple-import-sort": "^12.1.0",
92
92
  "eslint-plugin-sonarjs": "^1.0.3",
93
- "eslint-plugin-unused-imports": "^4.0.0",
93
+ "eslint-plugin-unused-imports": "^3.2.0",
94
94
  "globals": "^15.3.0",
95
- "typescript-eslint": "^7.11.0"
96
- },
97
- "resolutions": {
98
- "eslint": "$eslint"
95
+ "typescript-eslint": "^7.12.0"
99
96
  },
100
97
  "overrides": {
101
98
  "eslint-config-standard": "$eslint-config-standard",