@ethang/eslint-config 18.4.5 → 18.4.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.
- package/config.astro.js +3 -3
- package/config.react.js +4 -4
- package/config.solid.js +3 -3
- package/eslint.config.js +15 -11
- package/package.json +1 -1
package/config.astro.js
CHANGED
|
@@ -4,11 +4,11 @@ import tseslint from "typescript-eslint";
|
|
|
4
4
|
import { ignores, languageOptions } from "./eslint.config.js";
|
|
5
5
|
|
|
6
6
|
export default tseslint.config({
|
|
7
|
-
|
|
7
|
+
files: ["**/*.{astro}"],
|
|
8
8
|
ignores,
|
|
9
9
|
languageOptions,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
plugins: { astro },
|
|
11
|
+
rules: {
|
|
12
12
|
"astro/jsx-a11y/alt-text": "error",
|
|
13
13
|
"astro/jsx-a11y/anchor-ambiguous-text": "error",
|
|
14
14
|
"astro/jsx-a11y/anchor-has-content": "error",
|
package/config.react.js
CHANGED
|
@@ -5,15 +5,15 @@ import tseslint from "typescript-eslint";
|
|
|
5
5
|
import { ignores, languageOptions } from "./eslint.config.js";
|
|
6
6
|
|
|
7
7
|
export default tseslint.config({
|
|
8
|
-
|
|
8
|
+
files: ["**/*.{jsx,tsx}"],
|
|
9
9
|
ignores,
|
|
10
10
|
languageOptions,
|
|
11
|
-
|
|
11
|
+
plugins: {
|
|
12
12
|
react,
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
14
14
|
"react-hooks": reactHooks,
|
|
15
15
|
},
|
|
16
|
-
|
|
16
|
+
rules: {
|
|
17
17
|
"react-hooks/exhaustive-deps": "error",
|
|
18
18
|
"react-hooks/rules-of-hooks": "error",
|
|
19
19
|
"react/dom/no-children-in-void-dom-elements": "error",
|
|
@@ -37,7 +37,7 @@ export default tseslint.config({
|
|
|
37
37
|
"react/naming-convention/component-name": "error",
|
|
38
38
|
"react/naming-convention/filename": [
|
|
39
39
|
"error",
|
|
40
|
-
{
|
|
40
|
+
{ rule: "kebab-case" },
|
|
41
41
|
],
|
|
42
42
|
"react/naming-convention/filename-extension": "error",
|
|
43
43
|
"react/naming-convention/use-state": "error",
|
package/config.solid.js
CHANGED
|
@@ -4,11 +4,11 @@ import tseslint from "typescript-eslint";
|
|
|
4
4
|
import { ignores, languageOptions } from "./eslint.config.js";
|
|
5
5
|
|
|
6
6
|
export default tseslint.config({
|
|
7
|
-
|
|
7
|
+
files: ["**/*.{jsx,tsx}"],
|
|
8
8
|
ignores,
|
|
9
9
|
languageOptions,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
plugins: { solid },
|
|
11
|
+
rules: {
|
|
12
12
|
"solid/components-return-once": "error",
|
|
13
13
|
"solid/event-handlers": "error",
|
|
14
14
|
"solid/imports": "error",
|
package/eslint.config.js
CHANGED
|
@@ -539,9 +539,9 @@ export default tseslint.config({
|
|
|
539
539
|
"tailwind/no-contradicting-classname": "error",
|
|
540
540
|
"tailwind/no-unnecessary-arbitrary-value": "error",
|
|
541
541
|
|
|
542
|
-
"stylistic/array-bracket-newline": "error",
|
|
542
|
+
"stylistic/array-bracket-newline": ["error", "consistent"],
|
|
543
543
|
"stylistic/array-bracket-spacing": "error",
|
|
544
|
-
"stylistic/array-element-newline": "error",
|
|
544
|
+
"stylistic/array-element-newline": ["error", "consistent"],
|
|
545
545
|
"stylistic/arrow-parens": "error",
|
|
546
546
|
"stylistic/arrow-spacing": "error",
|
|
547
547
|
"stylistic/block-spacing": "error",
|
|
@@ -550,10 +550,10 @@ export default tseslint.config({
|
|
|
550
550
|
"stylistic/comma-spacing": "error",
|
|
551
551
|
"stylistic/comma-style": "error",
|
|
552
552
|
"stylistic/computed-property-spacing": "error",
|
|
553
|
-
"stylistic/dot-location": "error",
|
|
553
|
+
"stylistic/dot-location": ["error", "property"],
|
|
554
554
|
"stylistic/eol-last": "error",
|
|
555
555
|
"stylistic/func-call-spacing": "error",
|
|
556
|
-
"stylistic/function-call-argument-newline": "error",
|
|
556
|
+
"stylistic/function-call-argument-newline": ["error", "consistent"],
|
|
557
557
|
"stylistic/function-call-spacing": "error",
|
|
558
558
|
"stylistic/function-paren-newline": ["error", "consistent"],
|
|
559
559
|
"stylistic/generator-star-spacing": "error",
|
|
@@ -579,7 +579,7 @@ export default tseslint.config({
|
|
|
579
579
|
"stylistic/new-parens": "error",
|
|
580
580
|
"stylistic/newline-per-chained-call": "error",
|
|
581
581
|
"stylistic/no-confusing-arrow": "error",
|
|
582
|
-
"stylistic/no-extra-parens": "error",
|
|
582
|
+
"stylistic/no-extra-parens": ["error", "all", { ignoreJSX: "multi-line" }],
|
|
583
583
|
"stylistic/no-extra-semi": "error",
|
|
584
584
|
"stylistic/no-floating-decimal": "error",
|
|
585
585
|
"stylistic/no-mixed-operators": "error",
|
|
@@ -590,21 +590,25 @@ export default tseslint.config({
|
|
|
590
590
|
"stylistic/no-trailing-spaces": "error",
|
|
591
591
|
"stylistic/no-whitespace-before-property": "error",
|
|
592
592
|
"stylistic/nonblock-statement-body-position": "error",
|
|
593
|
-
"stylistic/object-curly-newline": "error",
|
|
593
|
+
"stylistic/object-curly-newline": ["error", { multiline: true, consistent: true }],
|
|
594
594
|
"stylistic/object-curly-spacing": ["error", "always"],
|
|
595
595
|
"stylistic/object-property-newline": "error",
|
|
596
596
|
"stylistic/one-var-declaration-per-line": "error",
|
|
597
597
|
"stylistic/operator-linebreak": "error",
|
|
598
598
|
"stylistic/padded-blocks": ["error", "never"],
|
|
599
599
|
"stylistic/padding-line-between-statements": "error",
|
|
600
|
-
"stylistic/quote-props": "error",
|
|
600
|
+
"stylistic/quote-props": ["error", "as-needed"],
|
|
601
601
|
"stylistic/quotes": "error",
|
|
602
602
|
"stylistic/rest-spread-spacing": "error",
|
|
603
603
|
"stylistic/semi": "error",
|
|
604
604
|
"stylistic/semi-spacing": "error",
|
|
605
605
|
"stylistic/semi-style": "error",
|
|
606
606
|
"stylistic/space-before-blocks": "error",
|
|
607
|
-
"stylistic/space-before-function-paren": "error",
|
|
607
|
+
"stylistic/space-before-function-paren": ["error", {
|
|
608
|
+
anonymous: "always",
|
|
609
|
+
named: "never",
|
|
610
|
+
asyncArrow: "always"
|
|
611
|
+
}],
|
|
608
612
|
"stylistic/space-in-parens": "error",
|
|
609
613
|
"stylistic/space-infix-ops": "error",
|
|
610
614
|
"stylistic/space-unary-ops": "error",
|
|
@@ -624,15 +628,15 @@ export default tseslint.config({
|
|
|
624
628
|
"stylistic/jsx-equals-spacing": "error",
|
|
625
629
|
"stylistic/jsx-first-prop-new-line": "error",
|
|
626
630
|
"stylistic/jsx-function-call-newline": "error",
|
|
627
|
-
"stylistic/jsx-indent-props": "error",
|
|
631
|
+
"stylistic/jsx-indent-props": ["error", 2],
|
|
628
632
|
"stylistic/jsx-max-props-per-line": "error",
|
|
629
|
-
"stylistic/jsx-newline": "error",
|
|
633
|
+
"stylistic/jsx-newline": ["error", { prevent: true }],
|
|
630
634
|
"stylistic/jsx-one-expression-per-line": "error",
|
|
631
635
|
"stylistic/jsx-pascal-case": "error",
|
|
632
636
|
"stylistic/jsx-props-no-multi-spaces": "error",
|
|
633
637
|
"stylistic/jsx-self-closing-comp": "error",
|
|
634
638
|
"stylistic/jsx-tag-spacing": "error",
|
|
635
|
-
"stylistic/jsx-wrap-multilines": "error",
|
|
639
|
+
"stylistic/jsx-wrap-multilines": ["error", { declaration: "parens-new-line" }],
|
|
636
640
|
"stylistic/member-delimiter-style": "error",
|
|
637
641
|
"stylistic/type-annotation-spacing": "error",
|
|
638
642
|
"stylistic/indent-binary-ops": "error",
|