2022-12-02 14:03:29 +03:00
|
|
|
module.exports = {
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
parserOptions: {
|
|
|
|
project: 'tsconfig.json',
|
2022-12-05 00:59:30 +03:00
|
|
|
tsconfigRootDir: __dirname,
|
2023-04-20 12:44:47 +03:00
|
|
|
sourceType: 'module',
|
2022-12-02 14:03:29 +03:00
|
|
|
},
|
2023-07-26 07:58:57 +03:00
|
|
|
plugins: ['@typescript-eslint/eslint-plugin', 'unused-imports', 'simple-import-sort', 'twenty'],
|
2023-04-20 12:44:47 +03:00
|
|
|
extends: [
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
'plugin:prettier/recommended',
|
|
|
|
'plugin:storybook/recommended',
|
|
|
|
'react-app',
|
|
|
|
],
|
2022-12-02 14:03:29 +03:00
|
|
|
root: true,
|
|
|
|
env: {
|
|
|
|
node: true,
|
2023-04-20 12:44:47 +03:00
|
|
|
jest: true,
|
2022-12-02 14:03:29 +03:00
|
|
|
},
|
2023-06-04 12:23:09 +03:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
|
|
|
|
rules: {
|
2023-08-13 06:28:33 +03:00
|
|
|
'no-control-regex': 0,
|
2023-06-04 12:23:09 +03:00
|
|
|
'simple-import-sort/imports': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
groups: [
|
|
|
|
['^react', '^@?\\w'],
|
|
|
|
['^(@|~)(/.*|$)'],
|
|
|
|
['^\\u0000'],
|
|
|
|
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
|
|
|
|
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
|
|
|
|
['^.+\\.?(css)$']
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
ignorePatterns: ['.eslintrc.js', 'codegen.js', '**/generated/*', '*.config.js'],
|
2022-12-02 14:03:29 +03:00
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/interface-name-prefix': 'off',
|
|
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
2023-04-20 12:44:47 +03:00
|
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
2023-06-04 12:23:09 +03:00
|
|
|
'simple-import-sort/imports': 'error',
|
2023-06-14 08:59:16 +03:00
|
|
|
'simple-import-sort/exports': 'error',
|
2023-06-14 17:56:29 +03:00
|
|
|
'twenty/sort-css-properties-alphabetically': 'error',
|
2023-06-29 21:19:03 +03:00
|
|
|
'twenty/no-hardcoded-colors': 'error',
|
|
|
|
'func-style':['error', 'declaration', { 'allowArrowFunctions': true }],
|
2023-07-26 03:18:25 +03:00
|
|
|
"@typescript-eslint/no-unused-vars": "off",
|
2023-07-26 07:58:57 +03:00
|
|
|
"no-unused-vars": "off",
|
|
|
|
"unused-imports/no-unused-imports": "warn",
|
|
|
|
"unused-imports/no-unused-vars": [
|
|
|
|
"warn",
|
|
|
|
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
|
|
|
|
]
|
2023-06-14 17:56:29 +03:00
|
|
|
}
|
2023-04-20 12:44:47 +03:00
|
|
|
};
|