-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
38 lines (33 loc) · 1.05 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
import path from "node:path";
import { fileURLToPath } from "node:url";
import { mainConfig as lasalefamineConfig } from '@lasalefamine/eslint-config';
import { reactHooksConfig } from '@lasalefamine/eslint-config/hooks.mjs';
import tsParser from '@typescript-eslint/parser';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const languageOptions = {
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'script',
parserOptions: {
project: ['./tsconfig.eslint.json'],
ecmaVersion: 2020,
sourceType: 'module',
tsconfigRootDir: __dirname,
},
};
const jsFiles = ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'];
export default [{
ignores: ["**/dist"],
},
...lasalefamineConfig.map(config => ({ ...config, files: jsFiles, languageOptions })),
...reactHooksConfig,
{
rules: {
"import/no-extraneous-dependencies": "off",
"react/require-default-props": "off",
'require-await': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/promise-function-async': 'off'
},
}];