@ethang/eslint-config 18.0.0 → 18.0.1

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [View Config](https://eslint-config-ethang.pages.dev/rules)
4
4
 
5
- * 468 errored rules.
5
+ * 469 errored rules.
6
6
  * 142 rules from vanilla EsLint
7
7
  * 113 rules from [sindresorhus/eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
8
8
  * 104 rules from [@typescript/eslint](https://github.com/typescript-eslint/typescript-eslint)
@@ -11,14 +11,14 @@
11
11
  * 20 rules from [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n/tree/67bbfdf3c6862dcbfe455a4afbd83fa60f9d1ea4)
12
12
  * 19 rules from [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist)
13
13
  * 3 rules from [@tanstack/eslint-plugin-query](https://tanstack.com/query/latest/docs/eslint/eslint-plugin-query)
14
- * Includes Prettier built in (do NOT use this with a separate Prettier config.)
14
+ * Includes Prettier built-in (do NOT use this with a separate Prettier config.)
15
15
 
16
16
  # Add Even More!
17
- * 51 rules for **Astro**.
18
- * install [@ethang/eslint-config-astro](https://github.com/eglove/eslint-config-ethang-astro)
17
+ * 51 rules for **Astro**
18
+ * pnpm i -D [@ethang/eslint-config-astro](https://github.com/eglove/eslint-config-ethang-astro)
19
19
  * 51 rules from [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro)
20
- * 77 rules for **React**.
21
- * install [@ethang/eslint-config-react](https://github.com/eglove/eslint-config-ethang-react)
20
+ * 77 rules for **React**
21
+ * pnpm i -D [@ethang/eslint-config-react](https://github.com/eglove/eslint-config-ethang-react)
22
22
  * 75 rules from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react)
23
23
  * 2 rules from [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks)
24
24
 
@@ -0,0 +1,64 @@
1
+ import astro from "eslint-plugin-astro";
2
+ import tseslint from "typescript-eslint";
3
+
4
+ import { ignores, languageOptions } from "./eslint.config.js";
5
+
6
+ export default tseslint.config({
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
+ });
package/eslint.config.js CHANGED
@@ -9,7 +9,7 @@ import sonar from "eslint-plugin-sonarjs";
9
9
  import tanstack from "@tanstack/eslint-plugin-query";
10
10
  import perfectionist from "eslint-plugin-perfectionist";
11
11
 
12
- const languageOptions = {
12
+ export const languageOptions = {
13
13
  parser,
14
14
  parserOptions: {
15
15
  project: true,
@@ -17,7 +17,7 @@ const languageOptions = {
17
17
  },
18
18
  };
19
19
 
20
- const ignores = ["eslint.config.js", "node_modules", "dist"];
20
+ export const ignores = ["eslint.config.js", "node_modules", "dist"];
21
21
 
22
22
  export default tseslint.config(eslintPluginPrettier, {
23
23
  files: ["**/*.{js,ts,mjs,jsx,tsx}"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethang/eslint-config",
3
- "version": "18.0.0",
3
+ "version": "18.0.1",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/eglove/eslint-config-ethang.git"
6
6
  },
@@ -21,6 +21,7 @@
21
21
  "@typescript-eslint/parser": "^8.0.0",
22
22
  "eslint": "^9.8.0",
23
23
  "eslint-config-prettier": "^9.1.0",
24
+ "eslint-plugin-astro": "^1.2.3",
24
25
  "eslint-plugin-jsx-a11y": "^6.9.0",
25
26
  "eslint-plugin-n": "^17.10.1",
26
27
  "eslint-plugin-perfectionist": "^3.1.0",
@@ -37,6 +38,7 @@
37
38
  "@typescript-eslint/parser": "^8.0.0",
38
39
  "eslint": "^9.8.0",
39
40
  "eslint-config-prettier": "^9.1.0",
41
+ "eslint-plugin-astro": "^1.2.3",
40
42
  "eslint-plugin-jsx-a11y": "^6.9.0",
41
43
  "eslint-plugin-n": "^17.10.1",
42
44
  "eslint-plugin-perfectionist": "^3.1.0",