Adrià Vilanova Martínez | 673abe7 | 2024-05-11 12:21:01 +0200 | [diff] [blame] | 1 | const js = require('@eslint/js'); |
| 2 | const globals = require('globals'); |
Adrià Vilanova Martínez | a7b300c | 2024-05-31 20:58:14 +0200 | [diff] [blame] | 3 | const tseslint = require('typescript-eslint'); |
Adrià Vilanova Martínez | 673abe7 | 2024-05-11 12:21:01 +0200 | [diff] [blame] | 4 | |
| 5 | module.exports = [ |
| 6 | js.configs.recommended, |
Adrià Vilanova Martínez | a7b300c | 2024-05-31 20:58:14 +0200 | [diff] [blame] | 7 | ...tseslint.configs.recommended, |
Adrià Vilanova Martínez | 673abe7 | 2024-05-11 12:21:01 +0200 | [diff] [blame] | 8 | { |
Adrià Vilanova Martínez | a7b300c | 2024-05-31 20:58:14 +0200 | [diff] [blame] | 9 | ignores: [ |
| 10 | '**/*.js', |
| 11 | '**/*.mjs', |
| 12 | 'dist/', |
| 13 | 'out/', |
| 14 | 'src/lit-locales/generated/', |
| 15 | ], |
| 16 | }, |
| 17 | { |
| 18 | ignores: ['webpack.config.js'], |
Adrià Vilanova Martínez | 673abe7 | 2024-05-11 12:21:01 +0200 | [diff] [blame] | 19 | languageOptions: { |
| 20 | ecmaVersion: 'latest', |
| 21 | sourceType: 'module', |
| 22 | globals: { |
| 23 | PRODUCTION: 'readonly', |
| 24 | ...globals.browser, |
| 25 | ...globals.webextensions, |
| 26 | }, |
| 27 | }, |
Adrià Vilanova Martínez | 673abe7 | 2024-05-11 12:21:01 +0200 | [diff] [blame] | 28 | }, |
| 29 | { |
Adrià Vilanova Martínez | a7b300c | 2024-05-31 20:58:14 +0200 | [diff] [blame] | 30 | files: ['**/*.test.ts'], |
| 31 | languageOptions: { |
| 32 | globals: { |
| 33 | ...globals.jest, |
| 34 | }, |
Adrià Vilanova Martínez | 673abe7 | 2024-05-11 12:21:01 +0200 | [diff] [blame] | 35 | }, |
| 36 | }, |
| 37 | ]; |