1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

(nextjs) added eslint and import sorting

This commit is contained in:
Fedor Katurov 2022-01-19 12:30:04 +07:00
parent e5f8d5a551
commit 0838bf7ee6
330 changed files with 1576 additions and 896 deletions

33
.eslintrc.js Normal file
View file

@ -0,0 +1,33 @@
module.exports = {
extends: ['plugin:react/recommended', 'plugin:@next/next/recommended'],
rules: {
'react/prop-types': 0,
'react/display-name': 0,
'react/react-in-jsx-scope': 0,
'@next/next/no-img-element': 0,
'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'],
},
],
},
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
},
plugins: ['import', 'react-hooks'],
parser: '@typescript-eslint/parser',
};