67 lines
1.7 KiB
JavaScript
67 lines
1.7 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
node: true,
|
|
},
|
|
extends: [
|
|
'airbnb',
|
|
'airbnb/hooks',
|
|
'airbnb-typescript',
|
|
'plugin:prettier/recommended',
|
|
],
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
project: true,
|
|
},
|
|
plugins: ['prettier'],
|
|
rules: {
|
|
'consistent-return': 'off',
|
|
'import/prefer-default-export': 'off',
|
|
'prettier/prettier': 'warn',
|
|
'react/react-in-jsx-scope': 'off',
|
|
'no-param-reassign': 'off',
|
|
'react/require-default-props': 'off',
|
|
'@typescript-eslint/no-use-before-define': 'off',
|
|
'import/extensions': 'off',
|
|
'react/jsx-props-no-spreading': 'off',
|
|
'import/order': [
|
|
'error',
|
|
{
|
|
pathGroups: [
|
|
{ pattern: 'react', group: 'builtin' },
|
|
{ pattern: '~shared/**', group: 'internal', position: 'before' },
|
|
{ pattern: '~entitiy/**', group: 'internal', position: 'before' },
|
|
{ pattern: '~feature/**', group: 'internal', position: 'before' },
|
|
{ pattern: '~widget/**', group: 'internal', position: 'before' },
|
|
{ pattern: '~page/**', group: 'internal', position: 'before' },
|
|
],
|
|
pathGroupsExcludedImportTypes: ['builtin'],
|
|
groups: [
|
|
'builtin',
|
|
'external',
|
|
'internal',
|
|
'parent',
|
|
'sibling',
|
|
'index',
|
|
],
|
|
'newlines-between': 'never',
|
|
alphabetize: { order: 'asc', caseInsensitive: true },
|
|
},
|
|
],
|
|
},
|
|
overrides: [
|
|
{
|
|
files: [
|
|
'src/shared/lib/test/**/*.{js,ts,jsx,tsx}',
|
|
'cypress.config.ts',
|
|
'cypress/**',
|
|
],
|
|
rules: {
|
|
'import/no-extraneous-dependencies': ['off'],
|
|
},
|
|
},
|
|
],
|
|
ignorePatterns: ['.eslintrc.js'],
|
|
}
|