|
1 | 1 | import js from "@eslint/js"; |
| 2 | +import eslintConfigPrettier from "eslint-config-prettier/flat"; |
| 3 | +import eslintPluginUnicorn from "eslint-plugin-unicorn"; |
| 4 | +import { defineConfig, globalIgnores } from "eslint/config"; |
2 | 5 | import globals from "globals"; |
3 | 6 | import tseslint from "typescript-eslint"; |
4 | | -import { defineConfig } from "eslint/config"; |
5 | 7 |
|
6 | 8 | export default defineConfig([ |
| 9 | + js.configs.recommended, |
| 10 | + tseslint.configs.recommended, |
| 11 | + eslintPluginUnicorn.configs.all, |
| 12 | + eslintConfigPrettier, |
7 | 13 | { |
8 | | - ignores: ["**/dist/**"], |
9 | | - }, |
10 | | - { |
11 | | - files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], |
12 | | - plugins: { js }, |
13 | | - extends: ["js/recommended"], |
14 | | - }, |
15 | | - { |
16 | | - files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], |
17 | | - languageOptions: { globals: { ...globals.browser, ...globals.node } }, |
| 14 | + languageOptions: { |
| 15 | + globals: { ...globals.browser, ...globals.node }, |
| 16 | + }, |
| 17 | + rules: { |
| 18 | + "formatjs/no-offset": "error", |
| 19 | + "formatjs/enforce-description": "warn", |
| 20 | + |
| 21 | + // "unicorn/prefer-top-level-await": "off", |
| 22 | + "unicorn/filename-case": "off", |
| 23 | + "unicorn/custom-error-definition": "off", |
| 24 | + }, |
18 | 25 | }, |
19 | 26 | tseslint.configs.recommended, |
| 27 | + globalIgnores(["**/__generated/**", "**/dist/**", "**/coverage/**"]), |
20 | 28 | ]); |
0 commit comments