blob: 83d391eeecba4b495be082c7ec9b9789d5ea916b [file] [log] [blame]
Adrià Vilanova Martínez673abe72024-05-11 12:21:01 +02001const js = require('@eslint/js');
2const globals = require('globals');
Adrià Vilanova Martíneza7b300c2024-05-31 20:58:14 +02003const tseslint = require('typescript-eslint');
Adrià Vilanova Martínez673abe72024-05-11 12:21:01 +02004
5module.exports = [
6 js.configs.recommended,
Adrià Vilanova Martíneza7b300c2024-05-31 20:58:14 +02007 ...tseslint.configs.recommended,
Adrià Vilanova Martínez673abe72024-05-11 12:21:01 +02008 {
Adrià Vilanova Martíneza7b300c2024-05-31 20:58:14 +02009 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ínez673abe72024-05-11 12:21:01 +020019 languageOptions: {
20 ecmaVersion: 'latest',
21 sourceType: 'module',
22 globals: {
23 PRODUCTION: 'readonly',
24 ...globals.browser,
25 ...globals.webextensions,
26 },
27 },
Adrià Vilanova Martínez673abe72024-05-11 12:21:01 +020028 },
29 {
Adrià Vilanova Martíneza7b300c2024-05-31 20:58:14 +020030 files: ['**/*.test.ts'],
31 languageOptions: {
32 globals: {
33 ...globals.jest,
34 },
Adrià Vilanova Martínez673abe72024-05-11 12:21:01 +020035 },
36 },
37];