-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy patheslint.config.js
More file actions
51 lines (50 loc) · 1.19 KB
/
Copy patheslint.config.js
File metadata and controls
51 lines (50 loc) · 1.19 KB
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
const nextConfig = require('eslint-config-next');
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
const tsParser = require('@typescript-eslint/parser');
const i18next = require('eslint-plugin-i18next');
module.exports = [
...nextConfig,
i18next.configs['flat/recommended'],
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': typescriptEslint,
},
rules: {
...typescriptEslint.configs.recommended.rules,
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
},
},
{
files: [
'next.config.js',
'next-i18next.config.js',
'tailwind.config.js',
'postcss.config.js',
'jest.config.js',
'*.config.js',
'*.config.cjs',
'*.config.mjs',
],
plugins: {
'@typescript-eslint': typescriptEslint,
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
];