|
1 | | -import js from "@eslint/js"; |
2 | | -import typescript from "@typescript-eslint/eslint-plugin"; |
3 | | -import typescriptParser from "@typescript-eslint/parser"; |
4 | | -import astro from "eslint-plugin-astro"; |
| 1 | +import js from '@eslint/js'; |
| 2 | +import typescript from '@typescript-eslint/eslint-plugin'; |
| 3 | +import typescriptParser from '@typescript-eslint/parser'; |
| 4 | +import astro from 'eslint-plugin-astro'; |
5 | 5 |
|
6 | 6 | export default [ |
7 | 7 | js.configs.recommended, |
8 | 8 | { |
9 | | - files: ["**/*.{js,ts,astro}"], |
| 9 | + files: ['**/*.{js,ts,astro}'], |
10 | 10 | plugins: { |
11 | | - "@typescript-eslint": typescript, |
| 11 | + '@typescript-eslint': typescript, |
12 | 12 | }, |
13 | 13 | languageOptions: { |
14 | 14 | parser: typescriptParser, |
15 | 15 | parserOptions: { |
16 | | - ecmaVersion: "latest", |
17 | | - sourceType: "module", |
| 16 | + ecmaVersion: 'latest', |
| 17 | + sourceType: 'module', |
18 | 18 | }, |
19 | 19 | }, |
20 | 20 | rules: { |
21 | | - "@typescript-eslint/no-unused-vars": "error", |
22 | | - "@typescript-eslint/no-explicit-any": "warn", |
23 | | - "prefer-const": "error", |
24 | | - "no-var": "error", |
| 21 | + '@typescript-eslint/no-unused-vars': 'error', |
| 22 | + '@typescript-eslint/no-explicit-any': 'warn', |
| 23 | + 'prefer-const': 'error', |
| 24 | + 'no-var': 'error', |
25 | 25 | }, |
26 | 26 | }, |
27 | 27 | { |
28 | | - files: ["**/*.astro"], |
| 28 | + files: ['**/*.astro'], |
29 | 29 | plugins: { |
30 | 30 | astro: astro, |
31 | 31 | }, |
32 | 32 | languageOptions: { |
33 | 33 | parser: astro.parser, |
34 | 34 | parserOptions: { |
35 | | - parser: "@typescript-eslint/parser", |
36 | | - extraFileExtensions: [".astro"], |
| 35 | + parser: '@typescript-eslint/parser', |
| 36 | + extraFileExtensions: ['.astro'], |
37 | 37 | }, |
38 | 38 | }, |
39 | 39 | rules: { |
40 | 40 | ...astro.configs.recommended.rules, |
41 | | - "astro/no-conflict-set-directives": "error", |
42 | | - "astro/no-unused-define-vars-in-style": "error", |
| 41 | + 'astro/no-conflict-set-directives': 'error', |
| 42 | + 'astro/no-unused-define-vars-in-style': 'error', |
43 | 43 | }, |
44 | 44 | }, |
45 | 45 | { |
46 | | - files: ["scripts/**/*.js"], |
| 46 | + files: ['scripts/**/*.js'], |
47 | 47 | languageOptions: { |
48 | | - ecmaVersion: "latest", |
49 | | - sourceType: "module", |
| 48 | + ecmaVersion: 'latest', |
| 49 | + sourceType: 'module', |
50 | 50 | }, |
51 | 51 | rules: { |
52 | | - "no-console": "off", // Allow console.log in scripts |
| 52 | + 'no-console': 'off', // Allow console.log in scripts |
53 | 53 | }, |
54 | 54 | }, |
55 | 55 | ]; |
0 commit comments