@eset-gdd/code-styleguide-eslint-astro 1.1.11

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.
Files changed (2) hide show
  1. package/index.js +38 -0
  2. package/package.json +44 -0
package/index.js ADDED
@@ -0,0 +1,38 @@
1
+ import astro from "eslint-plugin-astro";
2
+ import tseslint from "typescript-eslint";
3
+ import prettierPlugin from "eslint-plugin-prettier";
4
+ import { BASE_PRETTIER_OPTIONS } from "@eset-gdd/code-styleguide-eslint-prettier";
5
+ import { getRules as getTsRules } from "@eset-gdd/code-styleguide-eslint-base-typescript";
6
+
7
+ export default [
8
+ ...astro.configs["flat/recommended"],
9
+ {
10
+ files: ["**/*.astro"],
11
+ languageOptions: {
12
+ parserOptions: {
13
+ parser: tseslint.parser,
14
+ extraFileExtensions: [".astro"],
15
+ sourceType: "module",
16
+ },
17
+ },
18
+ plugins: {
19
+ "@typescript-eslint": tseslint.plugin,
20
+ prettier: prettierPlugin,
21
+ },
22
+ rules: {
23
+ ...getTsRules({ strict: false }),
24
+ "prettier/prettier": [
25
+ "error",
26
+ {
27
+ ...BASE_PRETTIER_OPTIONS,
28
+ parser: "astro",
29
+ /**
30
+ * import.meta.resolve(), because we must resolve the plugin relative to this package, not relative to the working directory.
31
+ * some older Node versions are not supported (see "engines" in package.json).
32
+ */
33
+ plugins: [import.meta.resolve("prettier-plugin-astro")],
34
+ },
35
+ ],
36
+ },
37
+ },
38
+ ];
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@eset-gdd/code-styleguide-eslint-astro",
3
+ "type": "module",
4
+ "version": "1.1.11",
5
+ "description": "Astro ESLint configuration for ESET's Frontend Coding Styleguide",
6
+ "author": "ESET GWD Team",
7
+ "license": "ISC",
8
+ "homepage": "https://github.com/esetweb/code-styleguide#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/esetweb/code-styleguide.git",
12
+ "directory": "packages/eslint-astro"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/esetweb/code-styleguide/issues"
16
+ },
17
+ "keywords": [
18
+ "eslint",
19
+ "eslint-config",
20
+ "astro",
21
+ "astrojs",
22
+ "code-style"
23
+ ],
24
+ "main": "index.js",
25
+ "files": [
26
+ "README.md",
27
+ "index.js"
28
+ ],
29
+ "engines": {
30
+ "node": "^18.19.0 || ^20.6.0 || >=21.1.0"
31
+ },
32
+ "peerDependencies": {
33
+ "astro": ">=4.0.0",
34
+ "eslint": "^9.37.0"
35
+ },
36
+ "dependencies": {
37
+ "@eset-gdd/code-styleguide-eslint-base-typescript": "^1.1.10",
38
+ "@eset-gdd/code-styleguide-eslint-prettier": "^1.1.10",
39
+ "eslint-plugin-astro": "^1.7.0",
40
+ "eslint-plugin-prettier": "^5.5.4",
41
+ "prettier-plugin-astro": "^0.14.1",
42
+ "typescript-eslint": "^8.47.0"
43
+ }
44
+ }