@ethang/eslint-config 18.3.5 → 18.4.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.
- package/.gitattributes +1 -0
- package/README.md +8 -0
- package/config.astro.js +58 -58
- package/config.react.js +79 -76
- package/config.solid.js +26 -26
- package/eslint.config.js +125 -24
- package/package.json +4 -9
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text eol=lf
|
package/README.md
CHANGED
|
@@ -79,3 +79,11 @@ This config will also lint for browserslist features. Make sure to set this in p
|
|
|
79
79
|
"maintained node versions"
|
|
80
80
|
]
|
|
81
81
|
```
|
|
82
|
+
|
|
83
|
+
**.gitattributes**
|
|
84
|
+
|
|
85
|
+
Line breaks are enforced for Unix style. (\n, not \r\n). It's highly recommended reflecting this in .gitattributes
|
|
86
|
+
|
|
87
|
+
```githubexpressionlanguage
|
|
88
|
+
* text eol=crlf
|
|
89
|
+
```
|
package/config.astro.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
import astro from "eslint-plugin-astro";
|
|
2
2
|
import tseslint from "typescript-eslint";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {ignores, languageOptions} from "./eslint.config.js";
|
|
5
5
|
|
|
6
6
|
export default tseslint.config({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
7
|
+
"files": ["**/*.{astro}"],
|
|
8
|
+
ignores,
|
|
9
|
+
languageOptions,
|
|
10
|
+
"plugins": {astro},
|
|
11
|
+
"rules": {
|
|
12
|
+
"astro/jsx-a11y/alt-text": "error",
|
|
13
|
+
"astro/jsx-a11y/anchor-ambiguous-text": "error",
|
|
14
|
+
"astro/jsx-a11y/anchor-has-content": "error",
|
|
15
|
+
"astro/jsx-a11y/anchor-is-valid": "error",
|
|
16
|
+
"astro/jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
17
|
+
"astro/jsx-a11y/aria-props": "error",
|
|
18
|
+
"astro/jsx-a11y/aria-proptypes": "error",
|
|
19
|
+
"astro/jsx-a11y/aria-role": "error",
|
|
20
|
+
"astro/jsx-a11y/aria-unsupported-elements": "error",
|
|
21
|
+
"astro/jsx-a11y/autocomplete-valid": "error",
|
|
22
|
+
"astro/jsx-a11y/click-events-have-key-events": "error",
|
|
23
|
+
"astro/jsx-a11y/control-has-associated-label": "error",
|
|
24
|
+
"astro/jsx-a11y/heading-has-content": "error",
|
|
25
|
+
"astro/jsx-a11y/html-has-lang": "error",
|
|
26
|
+
"astro/jsx-a11y/iframe-has-title": "error",
|
|
27
|
+
"astro/jsx-a11y/img-redundant-alt": "error",
|
|
28
|
+
"astro/jsx-a11y/interactive-supports-focus": "error",
|
|
29
|
+
"astro/jsx-a11y/label-has-associated-control": "error",
|
|
30
|
+
"astro/jsx-a11y/lang": "error",
|
|
31
|
+
"astro/jsx-a11y/media-has-caption": "error",
|
|
32
|
+
"astro/jsx-a11y/mouse-events-have-key-events": "error",
|
|
33
|
+
"astro/jsx-a11y/no-access-key": "error",
|
|
34
|
+
"astro/jsx-a11y/no-aria-hidden-on-focusable": "error",
|
|
35
|
+
"astro/jsx-a11y/no-autofocus": "error",
|
|
36
|
+
"astro/jsx-a11y/no-distracting-elements": "error",
|
|
37
|
+
"astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
38
|
+
"astro/jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
39
|
+
"astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
40
|
+
"astro/jsx-a11y/no-noninteractive-tabindex": "error",
|
|
41
|
+
"astro/jsx-a11y/no-redundant-roles": "error",
|
|
42
|
+
"astro/jsx-a11y/no-static-element-interactions": "error",
|
|
43
|
+
"astro/jsx-a11y/prefer-tag-over-role": "error",
|
|
44
|
+
"astro/jsx-a11y/role-has-required-aria-props": "error",
|
|
45
|
+
"astro/jsx-a11y/role-supports-aria-props": "error",
|
|
46
|
+
"astro/jsx-a11y/scope": "error",
|
|
47
|
+
"astro/jsx-a11y/tabindex-no-positive": "error",
|
|
48
|
+
"astro/missing-client-only-directive-value": "error",
|
|
49
|
+
"astro/no-conflict-set-directives": "error",
|
|
50
|
+
"astro/no-deprecated-astro-canonicalurl": "error",
|
|
51
|
+
"astro/no-deprecated-astro-fetchcontent": "error",
|
|
52
|
+
"astro/no-deprecated-astro-resolve": "error",
|
|
53
|
+
"astro/no-deprecated-getentrybyslug": "error",
|
|
54
|
+
"astro/no-exports-from-components": "error",
|
|
55
|
+
"astro/no-set-text-directive": "error",
|
|
56
|
+
"astro/no-unused-css-selector": "error",
|
|
57
|
+
"astro/no-unused-define-vars-in-style": "error",
|
|
58
|
+
"astro/prefer-class-list-directive": "error",
|
|
59
|
+
"astro/prefer-object-class-list": "error",
|
|
60
|
+
"astro/prefer-split-class-list": "error",
|
|
61
|
+
"astro/semi": "error",
|
|
62
|
+
"astro/valid-compile": "error",
|
|
63
|
+
},
|
|
64
64
|
});
|
package/config.react.js
CHANGED
|
@@ -2,83 +2,86 @@ 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 {
|
|
5
|
+
import {ignores, languageOptions} from "./eslint.config.js";
|
|
6
6
|
|
|
7
7
|
export default tseslint.config({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
8
|
+
"files": ["**/*.{jsx,tsx}"],
|
|
9
|
+
ignores,
|
|
10
|
+
languageOptions,
|
|
11
|
+
"plugins": {
|
|
12
|
+
react,
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
14
|
+
"react-hooks": reactHooks,
|
|
15
|
+
},
|
|
16
|
+
"rules": {
|
|
17
|
+
"react-hooks/exhaustive-deps": "error",
|
|
18
|
+
"react-hooks/rules-of-hooks": "error",
|
|
19
|
+
"react/dom/no-children-in-void-dom-elements": "error",
|
|
20
|
+
"react/dom/no-dangerously-set-innerhtml": "error",
|
|
21
|
+
"react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
22
|
+
"react/dom/no-find-dom-node": "error",
|
|
23
|
+
"react/dom/no-missing-button-type": "error",
|
|
24
|
+
"react/dom/no-missing-iframe-sandbox": "error",
|
|
25
|
+
"react/dom/no-namespace": "error",
|
|
26
|
+
"react/dom/no-render-return-value": "error",
|
|
27
|
+
"react/dom/no-script-url": "error",
|
|
28
|
+
"react/dom/no-unsafe-iframe-sandbox": "error",
|
|
29
|
+
"react/dom/no-unsafe-target-blank": "error",
|
|
30
|
+
"react/ensure-forward-ref-using-ref": "error",
|
|
31
|
+
"react/hooks-extra/ensure-custom-hooks-using-other-hooks": "error",
|
|
32
|
+
"react/hooks-extra/ensure-use-callback-has-non-empty-deps": "error",
|
|
33
|
+
"react/hooks-extra/ensure-use-memo-has-non-empty-deps": "error",
|
|
34
|
+
"react/hooks-extra/no-direct-set-state-in-use-effect": "error",
|
|
35
|
+
"react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
|
|
36
|
+
"react/hooks-extra/prefer-use-state-lazy-initialization": "error",
|
|
37
|
+
"react/naming-convention/component-name": "error",
|
|
38
|
+
"react/naming-convention/filename": [
|
|
39
|
+
"error",
|
|
40
|
+
{"rule": "kebab-case"},
|
|
41
|
+
],
|
|
42
|
+
"react/naming-convention/filename-extension": "error",
|
|
43
|
+
"react/naming-convention/use-state": "error",
|
|
44
|
+
"react/no-access-state-in-setstate": "error",
|
|
45
|
+
"react/no-array-index-key": "error",
|
|
46
|
+
"react/no-children-count": "error",
|
|
47
|
+
"react/no-children-for-each": "error",
|
|
48
|
+
"react/no-children-map": "error",
|
|
49
|
+
"react/no-children-only": "error",
|
|
50
|
+
"react/no-children-prop": "error",
|
|
51
|
+
"react/no-children-to-array": "error",
|
|
52
|
+
"react/no-class-component": "error",
|
|
53
|
+
"react/no-clone-element": "error",
|
|
54
|
+
"react/no-comment-textnodes": "error",
|
|
55
|
+
"react/no-component-will-mount": "error",
|
|
56
|
+
"react/no-component-will-receive-props": "error",
|
|
57
|
+
"react/no-component-will-update": "error",
|
|
58
|
+
"react/no-create-ref": "error",
|
|
59
|
+
"react/no-default-props": "error",
|
|
60
|
+
"react/no-direct-mutation-state": "error",
|
|
61
|
+
"react/no-duplicate-key": "error",
|
|
62
|
+
"react/no-implicit-key": "error",
|
|
63
|
+
"react/no-leaked-conditional-rendering": "error",
|
|
64
|
+
"react/no-missing-component-display-name": "error",
|
|
65
|
+
"react/no-missing-key": "error",
|
|
66
|
+
"react/no-nested-components": "error",
|
|
67
|
+
"react/no-prop-types": "error",
|
|
68
|
+
"react/no-redundant-should-component-update": "error",
|
|
69
|
+
"react/no-set-state-in-component-did-mount": "error",
|
|
70
|
+
"react/no-set-state-in-component-did-update": "error",
|
|
71
|
+
"react/no-set-state-in-component-will-update": "error",
|
|
72
|
+
"react/no-string-refs": "error",
|
|
73
|
+
"react/no-unsafe-component-will-mount": "error",
|
|
74
|
+
"react/no-unsafe-component-will-receive-props": "error",
|
|
75
|
+
"react/no-unsafe-component-will-update": "error",
|
|
76
|
+
"react/no-unstable-context-value": "error",
|
|
77
|
+
"react/no-unstable-default-props": "error",
|
|
78
|
+
"react/no-unused-class-component-members": "error",
|
|
79
|
+
"react/no-unused-state": "error",
|
|
80
|
+
"react/no-useless-fragment": "error",
|
|
81
|
+
"react/prefer-destructuring-assignment": "error",
|
|
82
|
+
"react/prefer-read-only-props": "error",
|
|
80
83
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
"react/prefer-shorthand-boolean": "error",
|
|
85
|
+
"react/prefer-shorthand-fragment": "error",
|
|
86
|
+
},
|
|
84
87
|
});
|
package/config.solid.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import solid from "eslint-plugin-solid";
|
|
2
2
|
import tseslint from "typescript-eslint";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {ignores, languageOptions} from "./eslint.config.js";
|
|
5
5
|
|
|
6
6
|
export default tseslint.config({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
7
|
+
"files": ["**/*.{jsx,tsx}"],
|
|
8
|
+
ignores,
|
|
9
|
+
languageOptions,
|
|
10
|
+
"plugins": {solid},
|
|
11
|
+
"rules": {
|
|
12
|
+
"solid/components-return-once": "error",
|
|
13
|
+
"solid/event-handlers": "error",
|
|
14
|
+
"solid/imports": "error",
|
|
15
|
+
"solid/jsx-no-duplicate-props": "error",
|
|
16
|
+
"solid/jsx-no-script-url": "error",
|
|
17
|
+
"solid/jsx-no-undef": "error",
|
|
18
|
+
"solid/jsx-uses-vars": "error",
|
|
19
|
+
"solid/no-array-handlers": "error",
|
|
20
|
+
"solid/no-destructure": "error",
|
|
21
|
+
"solid/no-innerhtml": "error",
|
|
22
|
+
"solid/no-proxy-apis": "error",
|
|
23
|
+
"solid/no-react-deps": "error",
|
|
24
|
+
"solid/no-react-specific-props": "error",
|
|
25
|
+
"solid/no-unknown-namespaces": "error",
|
|
26
|
+
"solid/prefer-for": "error",
|
|
27
|
+
"solid/prefer-show": "error",
|
|
28
|
+
"solid/reactivity": "error",
|
|
29
|
+
"solid/self-closing-comp": "error",
|
|
30
|
+
"solid/style-prop": "error",
|
|
31
|
+
},
|
|
32
32
|
});
|
package/eslint.config.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import parser from "@typescript-eslint/parser";
|
|
3
3
|
import a11y from "eslint-plugin-jsx-a11y/lib/index.js";
|
|
4
4
|
import n from "eslint-plugin-n";
|
|
5
|
-
import eslintPluginPrettier from "eslint-plugin-prettier/recommended";
|
|
6
5
|
import unicorn from "eslint-plugin-unicorn";
|
|
7
6
|
import tseslint from "typescript-eslint";
|
|
8
7
|
import sonar from "eslint-plugin-sonarjs";
|
|
@@ -13,18 +12,19 @@ import barrel from "eslint-plugin-barrel-files";
|
|
|
13
12
|
import compat from "eslint-plugin-compat";
|
|
14
13
|
import lodashConfig from "eslint-plugin-lodash";
|
|
15
14
|
import tailwind from "eslint-plugin-tailwindcss";
|
|
15
|
+
import stylistic from "@stylistic/eslint-plugin";
|
|
16
16
|
|
|
17
17
|
export const languageOptions = {
|
|
18
18
|
parser,
|
|
19
19
|
parserOptions: {
|
|
20
20
|
project: true,
|
|
21
|
-
tsconfigRootDir: import.meta.dirname
|
|
22
|
-
}
|
|
21
|
+
tsconfigRootDir: import.meta.dirname
|
|
22
|
+
}
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export const ignores = ["eslint.config.js", "node_modules", "dist"];
|
|
26
26
|
|
|
27
|
-
export default tseslint.config(
|
|
27
|
+
export default tseslint.config({
|
|
28
28
|
files: ["**/*.{js,ts,jsx,tsx,cjs,mjs}"],
|
|
29
29
|
ignores,
|
|
30
30
|
languageOptions,
|
|
@@ -39,8 +39,9 @@ export default tseslint.config(eslintPluginPrettier, {
|
|
|
39
39
|
n,
|
|
40
40
|
perfectionist,
|
|
41
41
|
sonar,
|
|
42
|
+
stylistic,
|
|
42
43
|
tailwind,
|
|
43
|
-
unicorn
|
|
44
|
+
unicorn
|
|
44
45
|
},
|
|
45
46
|
rules: {
|
|
46
47
|
"depend/ban-dependencies": ["error", { allowed: ["lodash"] }],
|
|
@@ -62,8 +63,8 @@ export default tseslint.config(eslintPluginPrettier, {
|
|
|
62
63
|
"error",
|
|
63
64
|
"declaration",
|
|
64
65
|
{
|
|
65
|
-
allowArrowFunctions: true
|
|
66
|
-
}
|
|
66
|
+
allowArrowFunctions: true
|
|
67
|
+
}
|
|
67
68
|
],
|
|
68
69
|
"getter-return": "error",
|
|
69
70
|
"grouped-accessor-pairs": "error",
|
|
@@ -297,8 +298,8 @@ export default tseslint.config(eslintPluginPrettier, {
|
|
|
297
298
|
caughtErrorsIgnorePattern: "^_",
|
|
298
299
|
destructuredArrayIgnorePattern: "^_",
|
|
299
300
|
ignoreRestSiblings: true,
|
|
300
|
-
varsIgnorePattern: "^_"
|
|
301
|
-
}
|
|
301
|
+
varsIgnorePattern: "^_"
|
|
302
|
+
}
|
|
302
303
|
],
|
|
303
304
|
"@typescript-eslint/no-useless-constructor": "error",
|
|
304
305
|
"@typescript-eslint/no-useless-empty-export": "error",
|
|
@@ -538,12 +539,112 @@ export default tseslint.config(eslintPluginPrettier, {
|
|
|
538
539
|
"tailwind/no-contradicting-classname": "error",
|
|
539
540
|
"tailwind/no-unnecessary-arbitrary-value": "error",
|
|
540
541
|
|
|
542
|
+
"stylistic/array-bracket-newline": "error",
|
|
543
|
+
"stylistic/array-bracket-spacing": "error",
|
|
544
|
+
"stylistic/array-element-newline": "error",
|
|
545
|
+
"stylistic/arrow-parens": "error",
|
|
546
|
+
"stylistic/arrow-spacing": "error",
|
|
547
|
+
"stylistic/block-spacing": "error",
|
|
548
|
+
"stylistic/brace-style": "error",
|
|
549
|
+
"stylistic/comma-dangle": ["error", "always-multiline"],
|
|
550
|
+
"stylistic/comma-spacing": "error",
|
|
551
|
+
"stylistic/comma-style": "error",
|
|
552
|
+
"stylistic/computed-property-spacing": "error",
|
|
553
|
+
"stylistic/dot-location": "error",
|
|
554
|
+
"stylistic/eol-last": "error",
|
|
555
|
+
"stylistic/func-call-spacing": "error",
|
|
556
|
+
"stylistic/function-call-argument-newline": "error",
|
|
557
|
+
"stylistic/function-call-spacing": "error",
|
|
558
|
+
"stylistic/function-paren-newline": "error",
|
|
559
|
+
"stylistic/generator-star-spacing": "error",
|
|
560
|
+
"stylistic/implicit-arrow-linebreak": "error",
|
|
561
|
+
"stylistic/indent": "error",
|
|
562
|
+
"stylistic/jsx-quotes": "error",
|
|
563
|
+
"stylistic/key-spacing": "error",
|
|
564
|
+
"stylistic/keyword-spacing": "error",
|
|
565
|
+
"stylistic/linebreak-style": "error",
|
|
566
|
+
"stylistic/lines-around-comment": "error",
|
|
567
|
+
"stylistic/lines-between-class-members": "error",
|
|
568
|
+
"stylistic/max-len": ["error", {
|
|
569
|
+
"ignoreComments": true,
|
|
570
|
+
"ignoreTrailingComments": true,
|
|
571
|
+
"ignoreUrls": true,
|
|
572
|
+
"ignoreStrings": true,
|
|
573
|
+
"ignoreTemplateLiterals": true,
|
|
574
|
+
"ignoreRegExpLiterals": true
|
|
575
|
+
}],
|
|
576
|
+
"stylistic/max-statements-per-line": "error",
|
|
577
|
+
"stylistic/multiline-comment-style": "error",
|
|
578
|
+
"stylistic/multiline-ternary": "error",
|
|
579
|
+
"stylistic/new-parens": "error",
|
|
580
|
+
"stylistic/newline-per-chained-call": "error",
|
|
581
|
+
"stylistic/no-confusing-arrow": "error",
|
|
582
|
+
"stylistic/no-extra-parens": "error",
|
|
583
|
+
"stylistic/no-extra-semi": "error",
|
|
584
|
+
"stylistic/no-floating-decimal": "error",
|
|
585
|
+
"stylistic/no-mixed-operators": "error",
|
|
586
|
+
"stylistic/no-mixed-spaces-and-tabs": "error",
|
|
587
|
+
"stylistic/no-multi-spaces": "error",
|
|
588
|
+
"stylistic/no-multiple-empty-lines": "error",
|
|
589
|
+
"stylistic/no-tabs": "error",
|
|
590
|
+
"stylistic/no-trailing-spaces": "error",
|
|
591
|
+
"stylistic/no-whitespace-before-property": "error",
|
|
592
|
+
"stylistic/nonblock-statement-body-position": "error",
|
|
593
|
+
"stylistic/object-curly-newline": "error",
|
|
594
|
+
"stylistic/object-curly-spacing": "error",
|
|
595
|
+
"stylistic/object-property-newline": "error",
|
|
596
|
+
"stylistic/one-var-declaration-per-line": "error",
|
|
597
|
+
"stylistic/operator-linebreak": "error",
|
|
598
|
+
"stylistic/padded-blocks": "error",
|
|
599
|
+
"stylistic/padding-line-between-statements": "error",
|
|
600
|
+
"stylistic/quote-props": "error",
|
|
601
|
+
"stylistic/quotes": "error",
|
|
602
|
+
"stylistic/rest-spread-spacing": "error",
|
|
603
|
+
"stylistic/semi": "error",
|
|
604
|
+
"stylistic/semi-spacing": "error",
|
|
605
|
+
"stylistic/semi-style": "error",
|
|
606
|
+
"stylistic/space-before-blocks": "error",
|
|
607
|
+
"stylistic/space-before-function-paren": "error",
|
|
608
|
+
"stylistic/space-in-parens": "error",
|
|
609
|
+
"stylistic/space-infix-ops": "error",
|
|
610
|
+
"stylistic/space-unary-ops": "error",
|
|
611
|
+
"stylistic/spaced-comment": "error",
|
|
612
|
+
"stylistic/switch-colon-spacing": "error",
|
|
613
|
+
"stylistic/template-curly-spacing": "error",
|
|
614
|
+
"stylistic/template-tag-spacing": "error",
|
|
615
|
+
"stylistic/wrap-iife": "error",
|
|
616
|
+
"stylistic/wrap-regex": "error",
|
|
617
|
+
"stylistic/yield-star-spacing": "error",
|
|
618
|
+
"stylistic/jsx-child-element-spacing": "error",
|
|
619
|
+
"stylistic/jsx-closing-bracket-location": "error",
|
|
620
|
+
"stylistic/jsx-closing-tag-location": "error",
|
|
621
|
+
"stylistic/jsx-curly-brace-presence": "error",
|
|
622
|
+
"stylistic/jsx-curly-newline": "error",
|
|
623
|
+
"stylistic/jsx-curly-spacing": "error",
|
|
624
|
+
"stylistic/jsx-equals-spacing": "error",
|
|
625
|
+
"stylistic/jsx-first-prop-new-line": "error",
|
|
626
|
+
"stylistic/jsx-function-call-newline": "error",
|
|
627
|
+
"stylistic/jsx-indent-props": "error",
|
|
628
|
+
"stylistic/jsx-max-props-per-line": "error",
|
|
629
|
+
"stylistic/jsx-newline": "error",
|
|
630
|
+
"stylistic/jsx-one-expression-per-line": "error",
|
|
631
|
+
"stylistic/jsx-pascal-case": "error",
|
|
632
|
+
"stylistic/jsx-props-no-multi-spaces": "error",
|
|
633
|
+
"stylistic/jsx-self-closing-comp": "error",
|
|
634
|
+
"stylistic/jsx-tag-spacing": "error",
|
|
635
|
+
"stylistic/jsx-wrap-multilines": "error",
|
|
636
|
+
"stylistic/member-delimiter-style": "error",
|
|
637
|
+
"stylistic/type-annotation-spacing": "error",
|
|
638
|
+
"stylistic/indent-binary-ops": "error",
|
|
639
|
+
"stylistic/type-generic-spacing": "error",
|
|
640
|
+
"stylistic/type-named-tuple-spacing": "error",
|
|
641
|
+
|
|
541
642
|
"perfectionist/sort-array-includes": "error",
|
|
542
643
|
"perfectionist/sort-astro-attributes": [
|
|
543
644
|
"error",
|
|
544
645
|
{
|
|
545
|
-
groups: ["astro-shorthand", "shorthand", "multiline"]
|
|
546
|
-
}
|
|
646
|
+
groups: ["astro-shorthand", "shorthand", "multiline"]
|
|
647
|
+
}
|
|
547
648
|
],
|
|
548
649
|
"perfectionist/sort-classes": "error",
|
|
549
650
|
"perfectionist/sort-enums": "error",
|
|
@@ -559,15 +660,15 @@ export default tseslint.config(eslintPluginPrettier, {
|
|
|
559
660
|
["parent-type", "sibling-type", "index-type"],
|
|
560
661
|
["parent", "sibling", "index"],
|
|
561
662
|
"object",
|
|
562
|
-
"unknown"
|
|
663
|
+
"unknown"
|
|
563
664
|
],
|
|
564
|
-
newlinesBetween: "always"
|
|
565
|
-
}
|
|
665
|
+
newlinesBetween: "always"
|
|
666
|
+
}
|
|
566
667
|
],
|
|
567
668
|
"perfectionist/sort-interfaces": "error",
|
|
568
669
|
"perfectionist/sort-jsx-props": [
|
|
569
670
|
"error",
|
|
570
|
-
{ groups: ["shorthand", "multiline"] }
|
|
671
|
+
{ groups: ["shorthand", "multiline"] }
|
|
571
672
|
],
|
|
572
673
|
"perfectionist/sort-maps": "error",
|
|
573
674
|
"perfectionist/sort-named-exports": "error",
|
|
@@ -577,28 +678,28 @@ export default tseslint.config(eslintPluginPrettier, {
|
|
|
577
678
|
"perfectionist/sort-svelte-attributes": [
|
|
578
679
|
"error",
|
|
579
680
|
{
|
|
580
|
-
groups: ["svelte-shorthand", "shorthand", "multiline"]
|
|
581
|
-
}
|
|
681
|
+
groups: ["svelte-shorthand", "shorthand", "multiline"]
|
|
682
|
+
}
|
|
582
683
|
],
|
|
583
684
|
"perfectionist/sort-intersection-types": "error",
|
|
584
685
|
"perfectionist/sort-switch-case": [
|
|
585
686
|
"error",
|
|
586
687
|
{
|
|
587
688
|
type: "alphabetical",
|
|
588
|
-
order: "asc"
|
|
589
|
-
}
|
|
689
|
+
order: "asc"
|
|
690
|
+
}
|
|
590
691
|
],
|
|
591
692
|
"perfectionist/sort-union-types": "error",
|
|
592
693
|
"perfectionist/sort-variable-declarations": [
|
|
593
694
|
"error",
|
|
594
695
|
{
|
|
595
696
|
type: "alphabetical",
|
|
596
|
-
order: "asc"
|
|
597
|
-
}
|
|
697
|
+
order: "asc"
|
|
698
|
+
}
|
|
598
699
|
],
|
|
599
700
|
"perfectionist/sort-vue-attributes": [
|
|
600
701
|
"error",
|
|
601
|
-
{ groups: ["shorthand", "multiline"] }
|
|
702
|
+
{ groups: ["shorthand", "multiline"] }
|
|
602
703
|
],
|
|
603
704
|
|
|
604
705
|
"a11y/alt-text": "error",
|
|
@@ -635,6 +736,6 @@ export default tseslint.config(eslintPluginPrettier, {
|
|
|
635
736
|
"a11y/role-has-required-aria-props": "error",
|
|
636
737
|
"a11y/role-supports-aria-props": "error",
|
|
637
738
|
"a11y/scope": "error",
|
|
638
|
-
"a11y/tabindex-no-positive": "error"
|
|
639
|
-
}
|
|
739
|
+
"a11y/tabindex-no-positive": "error"
|
|
740
|
+
}
|
|
640
741
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethang/eslint-config",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.4.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/eglove/eslint-config-ethang.git"
|
|
6
6
|
},
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"@tanstack/eslint-plugin-query": "^5.51.15",
|
|
22
22
|
"@typescript-eslint/parser": "^8.0.1",
|
|
23
23
|
"eslint": "^9.8.0",
|
|
24
|
-
"eslint-config-prettier": "^9.1.0",
|
|
25
24
|
"eslint-plugin-astro": "^1.2.3",
|
|
26
25
|
"eslint-plugin-barrel-files": "^2.1.0",
|
|
27
26
|
"eslint-plugin-compat": "^6.0.0",
|
|
@@ -29,14 +28,12 @@
|
|
|
29
28
|
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
30
29
|
"eslint-plugin-lodash": "^8.0.0",
|
|
31
30
|
"eslint-plugin-n": "^17.10.2",
|
|
32
|
-
"eslint-plugin-perfectionist": "^3.1.
|
|
33
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
31
|
+
"eslint-plugin-perfectionist": "^3.1.3",
|
|
34
32
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
35
33
|
"eslint-plugin-solid": "^0.14.1",
|
|
36
34
|
"eslint-plugin-sonarjs": "1.0.4",
|
|
37
35
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
38
36
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
39
|
-
"prettier": "^3.3.3",
|
|
40
37
|
"typescript": "^5.5.4",
|
|
41
38
|
"typescript-eslint": "^8.0.1"
|
|
42
39
|
},
|
|
@@ -46,7 +43,6 @@
|
|
|
46
43
|
"@tanstack/eslint-plugin-query": "^5.51.15",
|
|
47
44
|
"@typescript-eslint/parser": "^8.0.1",
|
|
48
45
|
"eslint": "^9.8.0",
|
|
49
|
-
"eslint-config-prettier": "^9.1.0",
|
|
50
46
|
"eslint-plugin-astro": "^1.2.3",
|
|
51
47
|
"eslint-plugin-barrel-files": "^2.1.0",
|
|
52
48
|
"eslint-plugin-compat": "^6.0.0",
|
|
@@ -54,19 +50,18 @@
|
|
|
54
50
|
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
55
51
|
"eslint-plugin-lodash": "^8.0.0",
|
|
56
52
|
"eslint-plugin-n": "^17.10.2",
|
|
57
|
-
"eslint-plugin-perfectionist": "^3.1.
|
|
58
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
53
|
+
"eslint-plugin-perfectionist": "^3.1.3",
|
|
59
54
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
60
55
|
"eslint-plugin-solid": "^0.14.1",
|
|
61
56
|
"eslint-plugin-sonarjs": "1.0.4",
|
|
62
57
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
63
58
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
64
|
-
"prettier": "^3.3.3",
|
|
65
59
|
"typescript": "^5.5.4",
|
|
66
60
|
"typescript-eslint": "^8.0.1"
|
|
67
61
|
},
|
|
68
62
|
"devDependencies": {
|
|
69
63
|
"@ethang/project-builder": "^1.2.2",
|
|
64
|
+
"@stylistic/eslint-plugin": "^2.6.1",
|
|
70
65
|
"@tsconfig/node-lts": "^20.1.3",
|
|
71
66
|
"@tsconfig/strictest": "^2.0.5"
|
|
72
67
|
}
|