|
1 | 1 | module.exports = {
|
2 |
| - ignorePatterns: ['vite.*.js', 'src/**/*'], |
| 2 | + ignorePatterns: ['vite.*.js', 'packages/**/*.js', 'src/**/*'], |
3 | 3 | root: true,
|
4 |
| - parser: '@typescript-eslint/parser', |
5 |
| - plugins: ['@typescript-eslint', 'html', 'import'], |
6 |
| - extends: [ |
7 |
| - 'eslint:recommended', |
8 |
| - 'plugin:import/recommended', |
9 |
| - 'plugin:import/typescript', |
10 |
| - 'plugin:@typescript-eslint/recommended', |
11 |
| - 'plugin:lit/recommended', |
12 |
| - 'plugin:lit-a11y/recommended', |
13 |
| - 'plugin:storybook/recommended', |
14 |
| - ], |
15 |
| - rules: { |
16 |
| - // disable the rule for all files |
17 |
| - '@typescript-eslint/explicit-module-boundary-types': 'off', |
18 |
| - '@typescript-eslint/no-non-null-assertion': 'off', |
19 |
| - '@typescript-eslint/no-explicit-any': 'off', |
20 |
| - '@typescript-eslint/no-inferrable-types': 'off', |
21 |
| - '@typescript-eslint/ban-ts-comment': 'off', //TODO: Remove (maybe) |
22 |
| - '@typescript-eslint/ban-types': 'off', //TODO: Remove (maybe) |
23 |
| - }, |
24 |
| - settings: { |
25 |
| - 'import/resolver': { |
26 |
| - typescript: {}, |
| 4 | + plugins: ['html', 'import'], |
| 5 | + overrides: [ |
| 6 | + { |
| 7 | + files: ['*.ts', '*.tsx'], |
| 8 | + parser: '@typescript-eslint/parser', |
| 9 | + plugins: ['@typescript-eslint'], |
| 10 | + extends: [ |
| 11 | + 'plugin:import/typescript', |
| 12 | + 'plugin:@typescript-eslint/recommended', |
| 13 | + 'plugin:wc/recommended', |
| 14 | + 'plugin:lit/recommended', |
| 15 | + 'plugin:lit-a11y/recommended', |
| 16 | + 'plugin:storybook/recommended', |
| 17 | + ], |
| 18 | + rules: { |
| 19 | + // disable the rule for all files |
| 20 | + '@typescript-eslint/explicit-module-boundary-types': 'off', |
| 21 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 22 | + '@typescript-eslint/no-explicit-any': 'off', |
| 23 | + '@typescript-eslint/no-inferrable-types': 'off', |
| 24 | + '@typescript-eslint/ban-ts-comment': 'off', //TODO: Remove (maybe) |
| 25 | + '@typescript-eslint/ban-types': 'off', //TODO: Remove (maybe) |
| 26 | + 'lit/no-useless-template-literals': 'error', |
| 27 | + 'lit/prefer-nothing': 'error', |
| 28 | + }, |
| 29 | + parserOptions: { |
| 30 | + project: './tsconfig.json', |
| 31 | + tsconfigRootDir: './', |
| 32 | + }, |
| 33 | + settings: { |
| 34 | + 'import/resolver': { |
| 35 | + typescript: {}, |
| 36 | + }, |
| 37 | + wc: { |
| 38 | + elementBaseClasses: ['LitElement'], // Recognize `LitElement` as a Custom Element base class |
| 39 | + }, |
| 40 | + }, |
27 | 41 | },
|
28 |
| - }, |
29 |
| - parserOptions: { |
30 |
| - project: './tsconfig.json', |
31 |
| - tsconfigRootDir: './', |
32 |
| - }, |
| 42 | + ], |
33 | 43 | env: {
|
34 | 44 | browser: true,
|
35 | 45 | node: true,
|
| 46 | + es6: true, |
36 | 47 | },
|
37 | 48 | };
|
0 commit comments