|
| 1 | +import eslint from '@eslint/js'; |
| 2 | +import tseslint from 'typescript-eslint'; |
| 3 | +import liteslint from 'eslint-plugin-lit'; |
| 4 | +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; |
| 5 | +import globals from 'globals'; |
| 6 | +import { globalIgnores } from 'eslint/config'; |
| 7 | + |
| 8 | +export default [ |
| 9 | + eslint.configs.recommended, |
| 10 | + ...tseslint.configs.recommended, |
| 11 | + ...tseslint.configs.stylistic, |
| 12 | + eslintPluginPrettierRecommended, |
| 13 | + liteslint.configs['flat/recommended'], |
| 14 | + globalIgnores(['dist/**/*']), |
| 15 | + { |
| 16 | + files: ['**/*.{js,ts}'], |
| 17 | + languageOptions: { |
| 18 | + ecmaVersion: 'latest', |
| 19 | + sourceType: 'module', |
| 20 | + globals: { |
| 21 | + ...globals.browser, |
| 22 | + }, |
| 23 | + }, |
| 24 | + plugins: {}, |
| 25 | + rules: { |
| 26 | + // Prettier |
| 27 | + 'prettier/prettier': 'error', |
| 28 | + // Typescript |
| 29 | + '@typescript-eslint/consistent-type-definitions': 'off', |
| 30 | + '@typescript-eslint/no-explicit-any': 'warn', |
| 31 | + '@typescript-eslint/no-inferrable-types': 'off', |
| 32 | + '@typescript-eslint/explicit-function-return-type': 'error', |
| 33 | + '@typescript-eslint/prefer-for-of': 'off', |
| 34 | + // Lit |
| 35 | + 'lit/no-legacy-template-syntax': 'error', |
| 36 | + 'lit/no-template-arrow': 'off', |
| 37 | + }, |
| 38 | + }, |
| 39 | + { |
| 40 | + files: ['tests/**/*.{js,ts}'], |
| 41 | + rules: {}, |
| 42 | + }, |
| 43 | +]; |
0 commit comments