2023-02-17 10:33:32 +03:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
version: '18',
|
|
|
|
},
|
|
|
|
next: {
|
|
|
|
rootDir: 'apps/web',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:react/recommended',
|
2023-02-18 07:52:14 +03:00
|
|
|
'plugin:react/jsx-runtime',
|
2023-02-17 10:33:32 +03:00
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
],
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
parserOptions: {
|
|
|
|
ecmaFeatures: {
|
|
|
|
globalReturn: false,
|
|
|
|
impliedStrict: true,
|
|
|
|
jsx: true,
|
|
|
|
},
|
|
|
|
ecmaVersion: 'latest',
|
|
|
|
sourceType: 'module',
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
'react',
|
|
|
|
'@typescript-eslint',
|
|
|
|
'simple-import-sort',
|
|
|
|
'import',
|
|
|
|
'unused-imports',
|
|
|
|
],
|
|
|
|
rules: {
|
|
|
|
'no-undef': 'off',
|
|
|
|
'no-empty': 'off',
|
|
|
|
'no-func-assign': 'off',
|
|
|
|
'no-cond-assign': 'off',
|
2023-03-01 10:40:01 +03:00
|
|
|
'react/prop-types': 'off',
|
2023-03-15 19:58:43 +03:00
|
|
|
'@typescript-eslint/consistent-type-imports': 'error',
|
2023-02-17 10:33:32 +03:00
|
|
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
2023-02-18 07:52:14 +03:00
|
|
|
'unused-imports/no-unused-imports': 'error',
|
2023-02-17 10:33:32 +03:00
|
|
|
'simple-import-sort/imports': 'error',
|
|
|
|
'simple-import-sort/exports': 'error',
|
|
|
|
'@typescript-eslint/ban-ts-comment': 0,
|
|
|
|
'@typescript-eslint/no-restricted-imports': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
patterns: [
|
|
|
|
{
|
|
|
|
group: ['**/dist'],
|
|
|
|
message: "Don't import from dist",
|
|
|
|
allowTypeImports: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
group: ['**/src'],
|
|
|
|
message: "Don't import from src",
|
|
|
|
allowTypeImports: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|