-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
53 lines (52 loc) · 1.41 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import tsEsLint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import jest from 'jest';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintConfigPrettier from 'eslint-config-prettier';
import licenseHeader from 'eslint-plugin-license-header';
export default [
{
files: ['**/*.ts', '**/*.tsx'], // Adjust the file patterns as needed
languageOptions: {
globals: {
browser: false,
es6: true,
node: true,
// Add any global variables here
},
ecmaVersion: 2020,
sourceType: 'module',
parser: tsParser,
parserOptions: {
project: 'tsconfig.json',
},
},
plugins: {
tsEsLint,
jest,
licenseHeader,
},
ignores: [
// '__tests__/**',
'src/**/*.test.ts',
'src/**/*.spec.ts',
'dist',
'node_modules',
'**/*.js',
'**/*.d.ts',
'tmp',
'package*.json',
'tsconfig*.json',
'commitlint.config.ts',
],
rules: {
'tsEsLint/explicit-function-return-type': 'warn',
'tsEsLint/no-var-requires': 'off',
'licenseHeader/header': ['error', './resources/license-header.js'],
// Add other rules here
},
},
eslintPluginPrettierRecommended,
eslintConfigPrettier,
// You can add more configuration objects if needed for different file patterns or environments
];