@ethang/eslint-config 18.4.4 → 18.4.6
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 +4 -4
- package/config.react.js +5 -5
- package/config.solid.js +4 -4
- package/eslint.config.js +7 -7
- package/package.json +1 -1
package/config.astro.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import astro from "eslint-plugin-astro";
|
|
2
2
|
import tseslint from "typescript-eslint";
|
|
3
3
|
|
|
4
|
-
import {ignores, languageOptions} from "./eslint.config.js";
|
|
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
|
@@ -2,18 +2,18 @@ import react from "@eslint-react/eslint-plugin";
|
|
|
2
2
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
3
3
|
import tseslint from "typescript-eslint";
|
|
4
4
|
|
|
5
|
-
import {ignores, languageOptions} from "./eslint.config.js";
|
|
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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import solid from "eslint-plugin-solid";
|
|
2
2
|
import tseslint from "typescript-eslint";
|
|
3
3
|
|
|
4
|
-
import {ignores, languageOptions} from "./eslint.config.js";
|
|
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",
|
|
@@ -590,14 +590,14 @@ 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",
|
|
594
|
-
"stylistic/object-curly-spacing": "error",
|
|
593
|
+
"stylistic/object-curly-newline": ["error", { multiline: true, consistent: true }],
|
|
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",
|