1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 12:26:40 +07:00
vault-frontend/.eslintrc.js
Fedor Katurov a26e4168fd fix eslint
2023-10-30 21:49:10 +06:00

55 lines
1.5 KiB
JavaScript

module.exports = {
extends: ['plugin:react/recommended', 'plugin:@next/next/recommended'],
rules: {
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
'react/prop-types': 0,
'react/display-name': 0,
'react/react-in-jsx-scope': 0,
'@next/next/no-img-element': 0,
'unused-imports/no-unused-imports': 'warn',
// 'no-unused-vars': 'warn',
'quotes': [2, 'single', { 'avoidEscape': true }],
'import/order': [
'error',
{
alphabetize: { order: 'asc' },
'newlines-between': 'always',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'unknown'],
pathGroups: [
{
pattern: 'react',
group: 'builtin',
position: 'before',
},
{ pattern: '~/**', group: 'internal' },
{ pattern: './**', group: 'sibling' },
],
pathGroupsExcludedImportTypes: ['react'],
},
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'ramda',
message:
'import from \'~/utils/ramda\' instead',
},
],
},
]
},
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
},
plugins: ['import', 'react-hooks', 'unused-imports'],
parser: '@typescript-eslint/parser',
settings: {
react: {
version: '17',
},
},
};